[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: XPath 2.0

Subject: Re: XPath 2.0
From: Jeni Tennison <jeni@xxxxxxxxxxxxxxxx>
Date: Tue, 8 Jan 2002 16:03:21 +0000
Re:  XPath 2.0
Miloslav Nic wrote:
> In:
> http://web3.w3.org/TR/xpath20/#id-order-comparisons
> Order Comparisons
> precedes operator is defined:
> A comparison with the precedes operator returns true if the first
> operand node is reachable from the second operand node using the
> preceding axis; otherwise it returns false.
> Is there any reason why not to use ancestor and preceding axis in
> the comparison?

I might be reading it wrong, but I think that the << operator is
supposed to cover the combination of ancestor and preceding axes. So
if you did:

  id('a1') << id('a2')

then you'd get 'true' because the node with ID a1 comes before the
node with ID a2 in document order.

Presumably the 'precedes' operator is useful in the same kinds of
situations as the 'preceding' axis is useful, although I'm not sure I
could give you any examples.

The subtle difference between 'precedes' and '<<' (and between
'follows' and '>>') will probably cause much head-scratching.



Jeni Tennison

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list

Current Thread


Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
First Name
Last Name
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.