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

Re: Dynamic Sorting

Subject: Re: Dynamic Sorting
From: "Michael H. Semcheski" <mhs-list@xxxxxxxxx>
Date: Thu, 07 Nov 2002 14:58:07 -0500
xsl dynamic sorting


In reality we are not going to hard code the variable values like this,
but rather pull them in from another document by way of the document()
function, but that's not important right now.

The problem is, later on in the XSL we can't have <xsl:sort
select="{$sort-by-element-1}" /> since xsl:sort's select attribute
doesn't accept attribute value templates. You can specify attribute
value templates for xsl:sort's other attributes, for instance the
article at
http://www.biglist.com/lists/xsl-list/archives/200012/msg00392.html
demonstrates how to dynamically specify a descending or ascending sort
order. However you can't do this for the select attribute. Short of
creating nonportable XSL by using saxon:evaluate() or xalan:evaluate() I
can't see a way around this. Any suggestions? Can this kind of dynamic
sorting be done at all?



Rather than pull in the values from an external document, why not create a stylesheet (a) that takes that external document (b) and transforms it into the stylesheet as you have it (c), with the xsl:sort attributes set up as defined in document (b)?




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.