Torna al Thread
<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:output method="xml" indent="yes"/>
<xsl:template match="/">
<output><xsl:apply-templates select="output"/></output>
</xsl:template>
<xsl:template match="node">
<xsl:copy>
<xsl:for-each select="direct">
<xsl:sort order="ascending" select="@rank" data-type="number"/>
<xsl:copy-of select="."/>
</xsl:for-each>
</xsl:copy>
</xsl:template>
</xsl:stylesheet>