Re: [lxml-dev] Bus Error in external XPath function

Hi Petr, Petr van Blokland wrote:
Great, finally.
Just interested: what kind of problem was it? Garbage collection?
Sorry, I normally write a bit more about these things, but I was just in a hurry and wanted to get a mail out to have you test it. So here's a longer explanation. It was quite a bit of work to get that fixed. I had replaced the extension function call registry stuff with a generic run-time lookup function in 1.0. However, libxslt seems to have problems with that when the call is coming from an included stylesheet. So the current test case I have is: * a stylesheet that builds a variable value from an extension function call * a second stylesheet that includes and uses the first one * the lxml code that parses the second stylesheet and applies it to a tree The result is that the stylesheet is broken after the first run and subsequent runs no longer work as expected. I have no idea why that happens, no idea at all. I assume that it is a bug in libxslt, but I can't tell for sure. All I know is that it does *not* break when the extension function is registered with libxslt when it is called. So, basically what I did is, I rewrote the code to use pre-registered extension functions as before. So now, there still is a bit of cleanup to be done, also in the XPath code. But the bug should be fixed. Stefan
participants (1)
-
Stefan Behnel