Altova Mailing List Archives>Archive Index >comp.text.xml Archive Home >Recent entries >Thread Prev - Re: Question about union operator (|) >Thread Next - Re: Question about union operator (|) Re: Question about union operator (|)To: NULL Date: 9/1/2007 11:46:00 PM On 1 , 02:30, rich...@cogsci.ed.ac.uk (Richard Tobin) wrote: > In article <fba7ob$n0p$1$8300d...@news.demon.co.uk>, > David Carlisle <david-n...@dcarlisle.demon.co.uk> wrote: > > >which is closer to the xpath2 way. Not just filter expressions, but also > >/ for example need to invoke re-ordering (or removal of duplicates) as > >would |. > > In pure XPath 1, the only way to detect the ordering would be with a > predicate, and predicates are only used in two places: steps and > filter expressions. In steps, node lists would retain their order, so > the only place you would have to re-order them is when evaluating a > filter expression. > > So in preceding-sibling::*[1] the list would not get re-ordered, but > in (preceding-sibling::*)[1] it would, and in (a|b)[1] it would not > have to be re-ordered before the union, but it would probably be much > more convenient to do so. > > I think the difference between path[1] and (path)[1] is one of the > most counter-intuitive bits of XPath. > > -- Richard > -- > "Consideration shall be given to the need for as many as 32 characters > in some alphabets" - X3.4, 1963. I am sorry, but during this long discussion I have not received ground and clear answer for my question As I undertood: 1 XPath evaluates expressions to unordered node-sets. 2 The direction of axis in XPath is significant only when location step contains predicates. 3 In other cases the order of nodes in a node-set defines by external to XPath application (for example XSLT). Am I right? | ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
