[xsl] Sorting alpha numeric values

Subject: [xsl] Sorting alpha numeric values
From: "Hugh Dixon" <hugh.dixon@xxxxxxxxxxxxxx>
Date: Fri, 9 May 2003 15:07:00 +1000
I have a data set:
<Elem val = "A1"/>
<Elem val = "A2"/>
<Elem val = "A21"/>
<Elem val = "A3"/>

And a template:

<xsl:template match="/">
  <xsl:for-each select="./Root/Elem">
    <xsl:sort select="@val"/>
    <xsl:value-of select="./@val"/>

I was hoping to sort the Elems into

But I cannot get a hybrid alpha/numeric sort happening.  Is there some
setting I'm missing, or could someone suggest how I can do this.  The
ability to create a custom routine on which to compare the values would
be handy, although I suspect the performance could be an issue.

Thanks in Advance!!

Hugh Dixon

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

Current Thread