W3C home > Mailing lists > Public > www-xpath-comments@w3.org > January to March 2002

Re: Paper on symmetry of XPath axes

From: Michael Dyck <MichaelDyck@shaw.ca>
Date: Tue, 26 Feb 2002 21:49:25 -0800
To: Holger Meuss <meuss@cis.uni-muenchen.de>
Cc: www-xpath-comments@w3.org
Message-id: <3C7C7365.2CE38E1C@shaw.ca>
Holger Meuss wrote:
> 
> On a syntactic level it is easy to see that e.g.
> 
> descendant::a/preceding-sibling::b[position()<=3]
> 
> is equivalent to
> 
> descendant::b[following-sibling::a][position()>last()-3].

Are you sure? Consider the document

   <foo>
      <b/>
      <b/>
      <b/>
      <a/>

      <b/>
      <b/>
      <b/>
      <a/>
   </foo>

I think the first expression selects all the <b/> elements, whereas the
second selects just the 4th through 6th.

-Michael Dyck
Received on Wednesday, 27 February 2002 00:55:48 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 3 October 2007 16:05:54 GMT