<p>I'm trying to order items based on an attribute value:</p>

<pre><code>&lt;xsl:apply-templates select="Question"&gt;
    &lt;xsl:sort order="ascending" select="@Value"&gt;&lt;/xsl:sort&gt;
&lt;/xsl:apply-templates&gt;
</code></pre>

<p>This does order them, but I could have values like 1,2,3, ... 10, 11, ... 20 and it will order them 1,10,11, ... 2,20... 3. etc.<br>
I could also have values like 1.A, 1.B, 2.A, 2.B etc.</p>

<p>How can I order these values to take into account the numeric content and the alphabetic, in that priority?</p>

You can sort in numeric order using the
```
data-type
```
attribute:
```
```
<xsl:sort order="ascending" select="@Value" data-type="number"></xsl:sort>
```
```
The built-in sort function does not have support for more complex ordering (such as the multipart keys you mention).