- From: Kirmse, Daniel <daniel.kirmse@sap.com>
- Date: Mon, 22 Mar 2004 13:04:47 +0100
- To: www-xpath-comments@w3.org
Hi, Maybe it's not the right place for this question, but no one in comp.text.xml could/would provide an answer. I've a certain lack of understanding the semantics of the following-sibling axis. Well not in the sense of what it returns. More in terms of evaluating it properly when interpreting a XQuery expression by means of software. Suppose this document: <a> <b/> <c/> <d/> </a> and the expression: /a/b/following-sibling::* according to XPath 2.0 section 3.2.1.1 the element nodes for c and d are the result of the expression. So far so good. But to compute the result I'd use the XQuery 1.0 and XPath 2.0 Formal Semantics paper section 4.2.1.1. There an expression for evaluating the following-sibling axis is given: [following-sibling:: NodeTest]Axis == [let $e := . in parent::node()/child:: NodeTest [.<<$e]]Expr and that is the problem. How do I evaluate the left side of the equation? let $e := . in parent::node()/child::* [.<<$e] In my understanding parent::node()/child::* would describe the sequence (b,c,d) But the predicate has to be considered too. What is the context item expression in the predicate is refering to? What values/nodes will $e hold? What is the context item expression left of "in" is refering to? And what would be the exact value of $e at the end of the evaluation? Will it just be the sequence of the two element nodes "c" and "d"? Thanks for help & Cheers, Daniel
Received on Monday, 22 March 2004 07:05:33 UTC