summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Veillard <veillard@src.gnome.org>2006-11-23 16:46:39 +0000
committerDaniel Veillard <veillard@src.gnome.org>2006-11-23 16:46:39 +0000
commit53064a5e620ea475d5c6beb63d5b5d8dec1a0f20 (patch)
tree0fb7fb9855dc207859510ea8edc023d989c82980
parent125ed037a933cc9c3901675018c98ba6fb95e5ec (diff)
downloadlibxslt-53064a5e620ea475d5c6beb63d5b5d8dec1a0f20.tar.gz
libxslt-53064a5e620ea475d5c6beb63d5b5d8dec1a0f20.tar.bz2
libxslt-53064a5e620ea475d5c6beb63d5b5d8dec1a0f20.zip
applied patch from Mike Hommey about saving the current in-scope namespace
* libxslt/transform.c: applied patch from Mike Hommey about saving the current in-scope namespace list when calling a template, fixes bug #377579 Daniel
-rw-r--r--ChangeLog6
-rw-r--r--libxslt/transform.c7
2 files changed, 12 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 42240c73..0d4ff51c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+Thu Nov 23 17:49:31 CET 2006 Daniel Veillard <daniel@veillard.com>
+
+ * libxslt/transform.c: applied patch from Mike Hommey about saving
+ the current in-scope namespace list when calling a template, fixes
+ bug #377579
+
Thu Nov 23 15:36:28 CET 2006 Daniel Veillard <daniel@veillard.com>
* configure.in: fix a python detection problem pointed out by
diff --git a/libxslt/transform.c b/libxslt/transform.c
index 7c0461d1..95f598a6 100644
--- a/libxslt/transform.c
+++ b/libxslt/transform.c
@@ -4638,11 +4638,12 @@ xsltApplyTemplates(xsltTransformContextPtr ctxt, xmlNodePtr node,
xmlNodePtr cur, delNode = NULL, oldContextNode;
xmlNodeSetPtr list = NULL, oldList;
xsltStackElemPtr withParams = NULL;
- int oldXPProximityPosition, oldXPContextSize;
+ int oldXPProximityPosition, oldXPContextSize, oldXPNsNr;
const xmlChar *oldMode, *oldModeURI;
xmlDocPtr oldXPDoc;
xsltDocumentPtr oldDocInfo;
xmlXPathContextPtr xpctxt;
+ xmlNsPtr *oldXPNamespaces;
if (comp == NULL) {
xsltTransformError(ctxt, NULL, inst,
@@ -4676,6 +4677,8 @@ xsltApplyTemplates(xsltTransformContextPtr ctxt, xmlNodePtr node,
oldXPContextSize = xpctxt->contextSize;
oldXPProximityPosition = xpctxt->proximityPosition;
oldXPDoc = xpctxt->doc;
+ oldXPNsNr = xpctxt->nsNr;
+ oldXPNamespaces = xpctxt->namespaces;
/*
* Set up contexts.
@@ -4993,6 +4996,8 @@ error:
/*
* Restore context states.
*/
+ xpctxt->nsNr = oldXPNsNr;
+ xpctxt->namespaces = oldXPNamespaces;
xpctxt->doc = oldXPDoc;
xpctxt->contextSize = oldXPContextSize;
xpctxt->proximityPosition = oldXPProximityPosition;