From: Daniel Veillard Date: Sun, 18 Feb 2001 16:15:03 +0000 (+0000) Subject: - libxslt/pattern.c: when precompiled pattern is ALL, predicate X-Git-Tag: v1.1.28~1452 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=3d87b3aaa92f113c175a56279c74cb0f2909aeba;p=platform%2Fupstream%2Flibxslt.git - libxslt/pattern.c: when precompiled pattern is ALL, predicate contextual info must be recomputed Daniel --- diff --git a/ChangeLog b/ChangeLog index 683e423..1cbd49e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Sun Feb 18 17:13:00 CET 2001 Daniel Veillard + + * libxslt/pattern.c: when precompiled pattern is ALL, predicate + contextual info must be recomputed + Sun Feb 18 16:39:17 CET 2001 Daniel Veillard * libxslt/xslt.h libxslt/transform.c: defined and exported xsltMaxDepth diff --git a/libxslt/pattern.c b/libxslt/pattern.c index 9e9a407..a6413b2 100644 --- a/libxslt/pattern.c +++ b/libxslt/pattern.c @@ -512,6 +512,22 @@ xsltTestCompMatch(xsltTransformContextPtr ctxt, xsltCompMatchPtr comp, ctxt->xpathCtxt->contextSize = len; ctxt->xpathCtxt->proximityPosition = pos; } + } else if ((select != NULL) && (select->op == XSLT_OP_ALL)) { + xmlNodePtr siblings = node->parent->children; + + while (siblings != NULL) { + if (siblings->type == XML_ELEMENT_NODE) { + len++; + if (siblings == node) { + pos = len; + } + } + siblings = siblings->next; + } + if (pos != 0) { + ctxt->xpathCtxt->contextSize = len; + ctxt->xpathCtxt->proximityPosition = pos; + } } oldNode = ctxt->node; ctxt->node = node;