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

Re: XPath2.0: Attribute ordering along an ancestor axi

Subject: Re: XPath2.0: Attribute ordering along an ancestor axis
From: David Carlisle <davidc@xxxxxxxxx>
Date: Fri, 24 Nov 2006 13:17:26 GMT
Re:  XPath2.0: Attribute ordering along an ancestor axi
> I'm fully aware that attributes along the attribute:: axis are
> unordered, but is there any partial ordering when they're being
> collected off elements discovered along the ancestor:: axis?  

document order is a _total_ order for all nodes in all documents. Once
the documents are in the system then any two nodes have a defined
ordering relationship.

What is true is that the order of attributes on a single element is
system dependent, it can't be predicted from the source markup, and
similarly the order of nodes in different documents is system
dependent. 

attributes always come after thir parent element, and after that
elements namespace nodes, but before any of its children.

So the end result is that an attribute on an earlier element will be
earlier than an attribute on a later element in document order.

> ancestor-or-self::*/@foo

in xslt1 any xpath expression generates a node set and sets are
unordered (whether they have attributes or not) but most xslt
instructions process the elements of teh set in document order.

in xslt2 the semantics are different, but the end result is the same,
path expressions return a sequence (ie ordered list) of nodes
but they are all defined to return the nodes in document order.

David

Current Thread

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
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-2011 All Rights Reserved.