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

Re: Paper on symmetry of XPath axes

From: Holger Meuss <meuss@cis.uni-muenchen.de>
Date: Wed, 27 Feb 2002 10:06:09 +0100 (CET)
Message-ID: <15484.41345.693015.691039@loihi.cis.uni-muenchen.de>
To: Michael Dyck <michaeldyck@shaw.ca>
Cc: Holger Meuss <meuss@cis.uni-muenchen.de>, www-xpath-comments@w3.org
Hello,

Michael Dyck writes:
 > 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.
 > 

You are absolutely right. Thanks for correcting me. I have to admit
that I don't have an ad-hoc remedy against this, but still, I'm
optimistic to solve the problem. Somehow we have to make sure that
position() is evaluated for *each* <a> separately...

I hope to send you good news soon,
Holger
Received on Wednesday, 27 February 2002 04:06:13 GMT

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