Cserna, Zsolt \(IT\) wrote:
Yesterday I've discovered that the symbol in question (xsltProcessOneNode) is not exported on windows in libxslt, and also missing from .h files. Is it a public method? In unix .so and in windows static .lib file all the functions are exported so in these situations the dynamic linking is possible.
I just checked the libxslt sources and it is missing from the header files, everywhere back to at least 1.1.11. So it is not a public function. The call was introduced into lxml to implement XSLT extension elements. I don't remember how I found the function at the time, apparently not through the official API docs. Note that it's not static in the libxslt sources, although it is only used in transform.c. So I assume that it was at least considered for being made public at the time it was written. So there is still space for a post to the libxslt list.
So I think the solution for this error would be either: - You could remove the dependency of xsltProcessOneNode from lxml. :)
That would be the right thing to do, as this problem means that we can't currently support older libxslt versions, even if the function becomes public in a new release. I definitely take patches, but failing contributions, I will have to find a different way to implement the apply_templates() method in the XSLTExtension class, or drop the feature all-together for now. Dropping apply_templates() will however reduce the value of custom XSLT elements considerably.
Since libxslt is open source, we can do the modification ourselves and have the "patched" version but I think it could be useful for the other people who want to link dynamically to libxslt.
Yes, this is a temporary solution, but only for users like you who build their own customisable libxslt. Stefan