<xslTutorial creator="nicmila@idoox.com">
<index keywords='xsl:sort @data-type'/>

<description><stylesheet id='id2'/> sorts in text and <stylesheet id='id3'/> in numeric mode. Notice the important difference. 2 is after 1 in alphabet so 2 goes after 10 in text mode.</description>

<xmlSource id="id1">
<car id="11"/>
<car id="6"/>
<car id="105"/>
<car id="28"/>
<car id="9"/>
</xmlSource>

<attValues>
<value match="">
</value>
</attValues>

<xslStylesheet id="id2">
<xsl:template match="/">
<TABLE> 
 <xsl:for-each select="//car"> 
 <xsl:sort data-type="text" select="@id"/> 
 <TR><TH><xsl:text>Car-</xsl:text><xsl:value-of
 select="@id"/></TH></TR> 
 </xsl:for-each> 
 </TABLE> 
</xsl:template>

</xslStylesheet>

<xslStylesheet id="id3">
<xsl:template match="/">
<TABLE> 
 <xsl:for-each select="//car"> 
 <xsl:sort data-type="number" select="@id"/> 
 <TR><TH><xsl:text>Car-</xsl:text><xsl:value-of
 select="@id"/></TH></TR> 
 </xsl:for-each> 
 </TABLE> 
</xsl:template>
</xslStylesheet>

</xslTutorial>