This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
RE: Positions
- To: xsl-list at lists dot mulberrytech dot com
- Subject: RE: [xsl] Positions
- From: TSchutzerWeissmann at uk dot imshealth dot com
- Date: Tue, 13 Nov 2001 11:51:32 -0000
- Reply-to: xsl-list at lists dot mulberrytech dot com
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