Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Re: Question about union operator (|)

From: Art Spasky <art.spasky@-----.--->
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?



transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent