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

xsl:sort -- XSLT version 1.1/2.0: document order and

Subject: xsl:sort -- XSLT version 1.1/2.0: document order and request for reverse doc. order
From: vermet@xxxxxxxxxxxxx (Eric Vermetten)
Date: Thu, 3 May 2001 22:52:26 +0200 (MET DST)
xslt document order
XML elements that are already in some kind of order 
in the source document are processed in order they are written in, 
this order is refferred to as document order.  Since WD XSLT v1.1 it is 
stated explicitly that when such elements/nodes are used in the 
select att of an apply-templates/xsl:for-each  --without an xsl:sort as their child--
they are processed in document order (XSLTv1.1 ch. 10). 
Sometimes, however, I want to process these nodes in
*reverse* order.

Q: Is there some deaper reasoning why such a possibility isn't offered?

Suggestion:
Would it be a usable idea to extent the order att of the xsl:sort in the
following manner:

order  [optional]
values:
  ascending
  descending
  document-order
  reverse-document-order

The default remaining ascending. 

On the minus side we now have some redundancy:
<xsl:for-each select="test">
	...
</xsl:for-each>

would now have the same semantics as:
<xsl:for-each select="test">
    <xsl:sort order="document-order" />
	...
</xsl:for-each>

Any ideas?

thanks,
Eric

P.S. I realise that such a reverse-document order can be programmed
with the node-set extension, but that doesn't seem a very concise solution.



 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


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.