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

RE: sorting from a set of values

Subject: RE: sorting from a set of values
From: TSchutzerWeissmann@xxxxxxxxxxxxxxxx
Date: Tue, 10 Dec 2002 18:03:03 -0000
RE:  sorting from a set of values
Hello Isaac

Your approach won't work because the "select" bit of a sort is relative to
the context node being sorted - that's why your primary sort is 
<xsl:sort select="@i54"/>

By handing it a variable instead you're just evaluating the same nodeset
every time, which won't do any sorting.

It looks like you want to do a second sort on @i25, where M & I come after
all the other letters. If so, you could turn the select expression into a
test that evaluated to either true or false, which would give a value to
sort on.

<xsl:sort select="(@i25 = 'M' or @i25 = 'I')" order="descending"/>

Then if you wanted, within the groups, to sort alphabetically, you just use
a third sort on @i25, etc.

Hope it works. Your xml looks fearsome,
Regards,
Tom SW

 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.