- From: Kirmse, Daniel <daniel.kirmse@sap.com>
- Date: Mon, 22 Mar 2004 16:53:46 +0100
- To: "'Michael Kay'" <mhk@mhk.me.uk>, www-xpath-comments@w3.org
Hi Michael, thanks fort he hint to the lists. I will post my questions there. With that coreection I do understand the expression. But may it be that there is another typo in it? What about the "<<" operator? Shouldn't it be ">>" instead for following-sibling? Considering the example again: <a> <b/> <c/> <d/> </a> and the expression: /a/b/following-sibling::* after your correction we have: let $e = . return parent::node()/child::*[. << $e] or in the context of the example: let $e = "b" return parent::node()/child::*[. << "b"] with parent::node()/child::* = (b,c,d) and the result being a sequence (parent::node()/child::*["b" << "b"], parent::node()/child::*["c" << "b"], parent::node()/child::*["d" << "b"]) that would be empty. If "<<" would be replaced by ">>" we would get: (parent::node()/child::*["b" >> "b"], parent::node()/child::*["c" >> "b"], parent::node()/child::*["d" >> "b"]) what would yield (c,d) If you confirm this, I would post the typo report to the list you provided (public-qt-comments@w3.org) BTW: The same applies for preceding-sibling definition Cheers, Daniel Kirmse -----Ursprüngliche Nachricht----- Von: Michael Kay [mailto:mhk@mhk.me.uk] Gesendet: Montag, 22. März 2004 14:34 An: Kirmse, Daniel; www-xpath-comments@w3.org Betreff: RE: evaluating the following-sibling axis # # Maybe it's not the right place for this question, but no one # in comp.text.xml could/would provide an answer. A good place for such questions is the xsl-list at mulberrytech.com However, I think you've actually found a typo in the formal semantics which should be reported to public-qt-comments@w3.org ... 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. I think this should read: let $e := . return parent::node()/child:: NodeTest [.<<$e]] This is simply saying that the following siblings of a node are the children of the parent of that node that follow that node in document order. Michael Kay
Received on Monday, 22 March 2004 10:55:23 UTC