fixed xpath context housekeeping problem on processing 'choose' (bug
authorWilliam M. Brack <wbrack@src.gnome.org>
Fri, 4 May 2007 07:52:38 +0000 (07:52 +0000)
committerWilliam M. Brack <wbrack@src.gnome.org>
Fri, 4 May 2007 07:52:38 +0000 (07:52 +0000)
* libxslt/transform.c: fixed xpath context housekeeping problem
on processing 'choose' (bug 435479).

svn path=/trunk/; revision=1426

ChangeLog
libxslt/transform.c

index d4d82b2..30e885b 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Fri May  4 15:51:58 HKT 2007 William Brack <wbrack@mmm.com.hk>
+
+       * libxslt/transform.c: fixed xpath context housekeeping problem
+         on processing "choose" (bug 435479).
+
 Thu Apr 26 11:10:18 HKT 2007 William Brack <wbrack@mmm.com.hk>
 
        * libxslt/transform.c: fixed (another) problem with cached
index 179e58c..ffafc31 100644 (file)
@@ -5085,6 +5085,8 @@ xsltChoose(xsltTransformContextPtr ctxt, xmlNodePtr contextNode,
        xmlDocPtr oldXPContextDoc = xpctxt->doc;
        int oldXPProximityPosition = xpctxt->proximityPosition;
        int oldXPContextSize = xpctxt->contextSize;
+       xmlNsPtr oldXPNamespaces = xpctxt->namespaces;
+       int oldXPNsNr = xpctxt->nsNr;
        
 #ifdef XSLT_REFACTORED
        xsltStyleItemWhenPtr wcomp = NULL;
@@ -5204,6 +5206,8 @@ xsltChoose(xsltTransformContextPtr ctxt, xmlNodePtr contextNode,
        xpctxt->doc = oldXPContextDoc;
        xpctxt->proximityPosition = oldXPProximityPosition;
        xpctxt->contextSize = oldXPContextSize;
+       xpctxt->namespaces = oldXPNamespaces;
+       xpctxt->nsNr = oldXPNsNr;
        goto exit;
 
 test_is_true:
@@ -5212,6 +5216,8 @@ test_is_true:
        xpctxt->doc = oldXPContextDoc;
        xpctxt->proximityPosition = oldXPProximityPosition;
        xpctxt->contextSize = oldXPContextSize;
+       xpctxt->namespaces = oldXPNamespaces;
+       xpctxt->nsNr = oldXPNsNr;
        goto process_sequence;
     }