summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog6
-rw-r--r--xpath.c12
-rw-r--r--xpointer.c1
3 files changed, 19 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 1bd1208f..2b512317 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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
diff --git a/xpath.c b/xpath.c
index 4b0ca110..445a24be 100644
--- a/xpath.c
+++ b/xpath.c
@@ -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;
diff --git a/xpointer.c b/xpointer.c
index 145b1344..de098249 100644
--- a/xpointer.c
+++ b/xpointer.c
@@ -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