Example of a sort within xsl:apply-templates

Source: XML.com: Sorting in XSLT [xml.com]

<xsl:template match="employees">
  <xsl:apply-templates>
    <xsl:sort select="salary"/>
  </xsl:apply-templates>
</xsl:template>

<xsl:template match="employee">
  Last:      <xsl:apply-templates select="last"/>
  First:     <xsl:apply-templates select="first"/>
  Salary:    <xsl:apply-templates select="salary"/>
  Hire Date: <xsl:apply-templates select="@hireDate"/>
  <xsl:text>
</xsl:text>

</xsl:template>

Tags:
Source:
1137hrs.txt
Published:
08-12-2013 11:37