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

RE: key() and ordering of resulting node-set

Subject: RE: key() and ordering of resulting node-set
From: "Michael Kay" <mike@xxxxxxxxxxxx>
Date: Wed, 15 Nov 2006 19:32:53 -0000
business collaborator xml
In XSLT 1.0, key() returns a node-set - a set of nodes with no intrinsic
order.

Operations like xsl:for-each and xsl:apply-templates, in the absence of
xsl:sort, will always process the nodes of a node-set in document order. (If
they don't it's a bug.)

Michael Kay
http://www.saxonica.com/ 

> -----Original Message-----
> From: Ronan Klyne [mailto:ronan.klyne@xxxxxxxxxxx] 
> Sent: 15 November 2006 18:51
> To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> Subject: Re:  key() and ordering of resulting node-set
> 
> Ah! I was reading the 1.0 spec, and couldn't find an explicit 
> statement of ordering.
> FYI, XT seems to return nodes in reverse document order...
> 
> 	# r
> 
> James A. Robinson wrote:
> >> Is it possible to guarantee the ordering of the node-set 
> returned by key()?
> >> If not, is it possible to force the order to document order?
> >> I have looked to the spec, but to no avail...
> > 
> > According to the 2.0 CR it is document order:
> > 
> >   The result of the function is a sequence of nodes, 
> >   in document order and with duplicates removed
> > 
> > from http://www.w3.org/TR/xslt20/#keys
> > 
> > Jim
> > 
> > - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
> - - - - -
> > James A. Robinson                       jim.robinson@xxxxxxxxxxxx
> > Stanford University HighWire Press      
> http://highwire.stanford.edu/
> > +1 650 7237294 (Work)                   +1 650 7259335 (Fax)
> > 
> > 
> 
> 
> 
> --
> Ronan Klyne
> Business Collaborator Developer
> Tel: +44 (0)870 163 2555
> ronan.klyne@xxxxxxxxxxx
> www.groupbc.com

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