Fixed problem with cascaded predicates (more of bug 119946)
authorWilliam M. Brack <wbrack@src.gnome.org>
Thu, 23 Oct 2003 08:49:52 +0000 (08:49 +0000)
committerWilliam M. Brack <wbrack@src.gnome.org>
Thu, 23 Oct 2003 08:49:52 +0000 (08:49 +0000)
* libxslt/pattern.c: Fixed problem with cascaded predicates
  (more of bug 119946)

ChangeLog
libxslt/pattern.c

index 637f482..8c27dea 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Thu Oct 23 15:48:39 HKT 2003 William Brack <wbrack@mmm.com.hk>
+
+       * libxslt/pattern.c: Fixed problem with cascaded predicates
+         (more of bug 119946)
+
 Thu Oct 23 15:37:26 HKT 2003 William Brack <wbrack@mmm.com.hk>
 
        * restored earliest portion of ChangeLog (was corrupted)
index 404c22f..fa518da 100644 (file)
@@ -656,7 +656,8 @@ xsltTestCompMatch(xsltTransformContextPtr ctxt, xsltCompMatchPtr comp,
                            xmlXPathFreeObject(newlist);
                            return(-1);
                        }
-                       
+                       index = 0;
+
                        if ((parent == NULL) || (node->doc == NULL))
                            nocache = 1;
                        else {
@@ -666,6 +667,7 @@ xsltTestCompMatch(xsltTransformContextPtr ctxt, xsltCompMatchPtr comp,
                                             BAD_CAST " fake node libxslt")))
                                nocache = 1;
                        }
+                       
                        if (nocache == 0) {
                            if (list != NULL)
                                xmlXPathFreeObject(list);
@@ -675,6 +677,8 @@ xsltTestCompMatch(xsltTransformContextPtr ctxt, xsltCompMatchPtr comp,
                                (void *) list;
                            XSLT_RUNTIME_EXTRA(ctxt, select->previousExtra) =
                                (void *) doc;
+                           XSLT_RUNTIME_EXTRA(ctxt, select->indexExtra) =
+                               0;
                            XSLT_RUNTIME_EXTRA_FREE(ctxt, select->lenExtra) =
                                (xmlFreeFunc) xmlXPathFreeObject;
                        } else