From 53064a5e620ea475d5c6beb63d5b5d8dec1a0f20 Mon Sep 17 00:00:00 2001 From: Daniel Veillard Date: Thu, 23 Nov 2006 16:46:39 +0000 Subject: [PATCH] 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 --- ChangeLog | 6 ++++++ libxslt/transform.c | 7 ++++++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 42240c7..0d4ff51 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +Thu Nov 23 17:49:31 CET 2006 Daniel Veillard + + * 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 * configure.in: fix a python detection problem pointed out by diff --git a/libxslt/transform.c b/libxslt/transform.c index 7c0461d..95f598a 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; -- 2.7.4