OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

 


 

   Re: [xml-dev] Quick Xpath

[ Lists Home | Date Index | Thread Index ]


> OK, but any union has the same effect of "loosing" the reverse order,
> even (preceding-sibling::*|preceding-sibling::*)[1] and that's pure
> XPath :-)

It's not the union: it's the brackets

(preceding-sibling::*[1]) is the nearest sibling

(preceding-sibling::*)[1] is teh first sibling.

as the parenthesised expression is evaluated as an Xpath value, hence a
node set , so [1] then sorts that node set and takes the first, whereas 
teh first form is a step expression in which the current node list is in
reverse order.

David

_____________________________________________________________________
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.




 

News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 2001 XML.org. This site is hosted by OASIS