A
A.T.
Am trying to sort the following file with the <xsl:sort> function, but
can't get it to work properly. Would like the id column sorted
according both alphabetically & numerically. (e.g. A-01, A-02, B-02).
Currently the output, is a table display.
XML DOCUMENT
<root>
<version>
<id>A-01</id>
<!-- other elements -removed for ease of reading-->
</version>
<version>
<id>B-02</id>
</version>
<version>
<id>A-02</id>
</version>
</root>
STYLESHEET
<xsl:template match="version">
<xsl:for-each select="version">
<xsl:sort select="id" data-type="text"
order="ascending"></xsl:sort>
</xsl:for-each>
</xsl:template>
can't get it to work properly. Would like the id column sorted
according both alphabetically & numerically. (e.g. A-01, A-02, B-02).
Currently the output, is a table display.
XML DOCUMENT
<root>
<version>
<id>A-01</id>
<!-- other elements -removed for ease of reading-->
</version>
<version>
<id>B-02</id>
</version>
<version>
<id>A-02</id>
</version>
</root>
STYLESHEET
<xsl:template match="version">
<xsl:for-each select="version">
<xsl:sort select="id" data-type="text"
order="ascending"></xsl:sort>
</xsl:for-each>
</xsl:template>