[libxslt] Reuse XPath context in saxon:expression



commit 01f8317dd8ffe2141fae0348edd9fd51037ee41b
Author: Nick Wellnhofer <wellnhofer aevum de>
Date:   Tue Apr 16 13:24:44 2019 +0200

    Reuse XPath context in saxon:expression
    
    Compile XPath expression using the current context to propagate
    information like maxParserDepth and in-scope namespaces.

 libexslt/saxon.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/libexslt/saxon.c b/libexslt/saxon.c
index 00b74a48..e8b64406 100644
--- a/libexslt/saxon.c
+++ b/libexslt/saxon.c
@@ -105,7 +105,7 @@ exsltSaxonExpressionFunction (xmlXPathParserContextPtr ctxt, int nargs) {
     ret = xmlHashLookup(hash, arg);
 
     if (ret == NULL) {
-        ret = xmlXPathCompile(arg);
+        ret = xmlXPathCtxtCompile(tctxt->xpathCtxt, arg);
         if (ret == NULL) {
              xmlFree(arg);
               xmlXPathSetError(ctxt, XPATH_EXPR_ERROR);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]