Hi, a side effect of this commit:
http://git.gnome.org/browse/libxslt/commit/?id=0602c535e9c34efca22dba1b1b7465e0618e7bfc is that the str:replace() function is no longer usable without a transform context. I take it from the bug report that it is not supposed to be used from plain XPath but only from XSLT according to the EXSLT specification. However, the previous implementation used to work in XPath and is still registered on an xmlXPathContext by the exsltStrXpathCtxtRegister() function. When called from plain XPath, it results in a memory error in line 526 (exsltStrReturnString()) of strings.c because xsltCreateRVT() returns NULL as an error indicator due to a NULL transform context being passed in, which was the return value from xsltXPathGetTransformContext() a bit further up (and the code doesn't validate that). I see two ways to deal with this. Either fix the error handling in exsltStrReturnString() and deliberately break backwards compatibility by removing the function from exsltStrXpathCtxtRegister(), or rewrite the new function in a way that makes it work in both contexts, i.e. from both XSLT and plain XPath. I have no idea if the latter is possible, but it would certainly be the "friendlier" solution. Stefan _______________________________________________ xslt mailing list, project page http://xmlsoft.org/XSLT/ xslt@gnome.org https://mail.gnome.org/mailman/listinfo/xslt