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

RE: Positions

Subject: RE: Positions
From: TSchutzerWeissmann@xxxxxxxxxxxxxxxx
Date: Tue, 13 Nov 2001 11:51:32 -0000
RE:  Positions
Tanz,

As Trevor says, you need to set up an alternative sort, instead of scripting
exceptions to the alphabetic order of 'lang' attributes, which could get
quite clunky.
Trevor's method appends an f to every lang apart from ES which gets a t for
True, so it's always last alphabetically.

Another way would be to pass a parameter, or make a variable, holding the
ordered list of languages:
	<xsl:variable name="sortOrder" select="AR:CH:EN:FR:ES"/>
	<xsl:sort
	   select="string-length(substring-before($sortOrder, @lang))"
	   data-type="number"
	   order="ascending"/>
It's more flexible but you have to forsee all the @lang values that are
going to come up if you don't want ones that aren't in $sortOrder heading
your list.

____
tom

 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.