Re: [xsl] XPath 2.0

Subject: Re: [xsl] XPath 2.0
From: David Carlisle <davidc@xxxxxxxxx>
Date: Tue, 8 Jan 2002 21:59:36 GMT
>      xf:id('a1') precedes xf:id('a2')
> would raise an error because xf:id() returns a sequence,

I think not, as there is no distinction in the data model between a
value and a sequence of length one containing that value. (Essentialy,
everything is a sequence in xpath2 as currently spec'd)

> (b) if nodes with ids a1 and a2 exist in the tree being queried,
>      xf:id('a1')[1] precedes xf:id('a2')[1]
> is equivalent to
>      xf:exists( xf:id('a1') intersects xf:id('a2')/preceding::* )

Yes, I think (which means really preceding is just redundant given the
preciding axis.


> And similarly
>      xf:id('a1')[1] << xf:id('a2')[1]
> is equivalent to
>      xf:exists( xf:id('a1') intersects ( xf:id('a2')/preceding::* | xf:id('a2')/ancestor::* ) )
> 
> 
> 
yes if they are in the same tree but not if they are in different trees
(I think)



> because a non-empty sequence would automatically be treated
> as the boolean value true.
somewhat regretably that has gone, as a consequence of the
feature above that a boolean value of false() is equivalenet to a
sequence of length one containing that value, and this is clearly non
empty.


David
(answers just based on my reading of the drafts,  I'm not on the WG so
don't trust me:-)


_____________________________________________________________________
This message has been checked for all known viruses by Star Internet
delivered through the MessageLabs Virus Scanning Service. For further
information visit http://www.star.net.uk/stats.asp or alternatively call
Star Internet for details on the Virus Scanning Service.

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


Current Thread