diff options
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | xpath.c | 12 | ||||
-rw-r--r-- | xpointer.c | 1 |
3 files changed, 19 insertions, 0 deletions
@@ -1,3 +1,9 @@ +Thu Jan 22 10:43:22 HKT 2004 William Brack <wbrack@mmm.com.hk> + + * xpath.c: fixed problem with union when last() is used + in predicate (bug #131971) + * xpointer.c: minor change to comment for doc generation + Wed Jan 21 17:03:17 CET 2004 Daniel Veillard <daniel@veillard.com> * parser.c: fixed bug #131745 raised by Shaun McCance with the @@ -9846,6 +9846,10 @@ xmlXPathCompOpEvalLast(xmlXPathParserContextPtr ctxt, xmlXPathStepOpPtr op, int total = 0, cur; xmlXPathCompExprPtr comp; xmlXPathObjectPtr arg1, arg2; + xmlNodePtr bak; + xmlDocPtr bakd; + int pp; + int cs; CHECK_ERROR0; comp = ctxt->comp; @@ -9853,6 +9857,10 @@ xmlXPathCompOpEvalLast(xmlXPathParserContextPtr ctxt, xmlXPathStepOpPtr op, case XPATH_OP_END: return (0); case XPATH_OP_UNION: + bakd = ctxt->context->doc; + bak = ctxt->context->node; + pp = ctxt->context->proximityPosition; + cs = ctxt->context->contextSize; total = xmlXPathCompOpEvalLast(ctxt, &comp->steps[op->ch1], last); CHECK_ERROR0; @@ -9869,6 +9877,10 @@ xmlXPathCompOpEvalLast(xmlXPathParserContextPtr ctxt, xmlXPathStepOpPtr op, nodesetval->nodeNr - 1]; } + ctxt->context->doc = bakd; + ctxt->context->node = bak; + ctxt->context->proximityPosition = pp; + ctxt->context->contextSize = cs; cur = xmlXPathCompOpEvalLast(ctxt, &comp->steps[op->ch2], last); CHECK_ERROR0; @@ -2290,6 +2290,7 @@ xmlXPtrRangeToFunction(xmlXPathParserContextPtr ctxt, int nargs) { /** * xmlXPtrAdvanceNode: * @cur: the node + * @level: incremented/decremented to show level in tree * * Advance to the next element or text node in document order * TODO: add a stack for entering/exiting entities |