|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: XPath 2.0
On Tue, 8 Jan 2002, Jeni Tennison wrote:
You are right. And I have indeed read about "<<" just before
reading about precedes.
It seems that I will personally use a role of thumb :
never use precedes :)
> 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.
>
> Cheers,
>
> Jeni
>
> ---
> Jeni Tennison
> http://www.jenitennison.com/
>
>
> XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
>
--
******************************************
<firstName> Miloslav </firstName>
<surname> Nic </surname>
<mail> nicmila@xxxxxxxxxxxx </mail>
<support> http://www.zvon.org </support>
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








