Re: [xsl] XPath 2.0

Subject: Re: [xsl] XPath 2.0
From: Miloslav Nic <nicmila@xxxxxxxxxxxx>
Date: Tue, 8 Jan 2002 17:20:42 +0100 (CET)
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


Current Thread