1<?xml version="1.0"?>
2<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 
3version="1.0">
4<xsl:output indent="yes"/>
5
6<xsl:template match="a">
7   <a>
8   Ascending numeric
9   <xsl:for-each select="b">
10     <xsl:sort select="." data-type="number"/>
11     <xsl:copy-of select="."/>
12   </xsl:for-each>
13   Descending numeric
14   <xsl:for-each select="b">
15     <xsl:sort select="." data-type="number" order="descending"/>
16     <xsl:copy-of select="."/>
17   </xsl:for-each>
18   Ascending alpha
19   <xsl:for-each select="b">
20     <xsl:sort select="." data-type="text"/>
21     <xsl:copy-of select="."/>
22   </xsl:for-each>
23   </a>
24</xsl:template>
25
26</xsl:stylesheet>
27
28