Re: [xslt] calling EXSLT function str:replace() without transform context raises memory error in 1.1.27
- From: Nick Wellnhofer <wellnhofer aevum de>
- To: xslt gnome org
- Subject: Re: [xslt] calling EXSLT function str:replace() without transform context raises memory error in 1.1.27
- Date: Fri, 28 Sep 2012 17:44:03 +0200
On 28/09/2012 17:12, Nick Wellnhofer wrote:
The str:tokenize and str:split function do the same thing btw, although
it seems that they don't raise an error, but simply return an empty node
set when used without a transform context.
I just realized that str:tokenize and str:split aren't registered in
exsltStrXpathCtxtRegister for that reason. It seems that
node-set-returning functions simply won't work outside of libxslt. So I
see no other solution than to remove str:replace, too. See the attached
patch.
Nick
diff --git a/libexslt/strings.c b/libexslt/strings.c
index 045cc14..c0c7a18 100644
--- a/libexslt/strings.c
+++ b/libexslt/strings.c
@@ -838,11 +838,7 @@ exsltStrXpathCtxtRegister (xmlXPathContextPtr ctxt, const xmlChar *prefix)
&& !xmlXPathRegisterFuncNS(ctxt,
(const xmlChar *) "concat",
(const xmlChar *) EXSLT_STRINGS_NAMESPACE,
- exsltStrConcatFunction)
- && !xmlXPathRegisterFuncNS(ctxt,
- (const xmlChar *) "replace",
- (const xmlChar *) EXSLT_STRINGS_NAMESPACE,
- exsltStrReplaceFunction)) {
+ exsltStrConcatFunction)) {
return 0;
}
return -1;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]