[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: xpath union and node set order


xpath union
Thanks. This was good, solid information.
Yes, I was unsteady with my example xpaths. My actual code didn't use the
"//". It was simple one-level a|b|c.
The main question answered: I hoped it would not be implementation
dependent, but I was wrong.
It's good to hear that the behaviour I hoped for is in the next version.
Makes the world fit together...

Now I've got misunderstandings to work on in my code.

-tor

Michael Kay wrote:
> Firstly, //b|c and //c|b don't necessarily return the same nodes. The
> expression parses as (//b)|c, not as //(b|c).
>
> Secondly, the XPath 1.0 specification defines that a path expression
> (or a union expression) returns a node-set, that is, an unordered set
> of nodes. Some host languages, for example XSLT 1.0, specify that
> node-sets are always processed in document order. But you appear (as
> far as I can tell) to be invoking XPath from some Microsoft API, and
> I've no idea what that API says about the processing order: it's up
> to the XPath host language to define it, or it could choose to leave
> it undefined.
>
> This changes in XPath 2.0, which specifies that path expressions and
> union expressions return a sequence of distinct nodes in document
> order.


PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.