xsl:sort 语法
<xsl:sort> 总是作为元素<xsl:apply-templates> 或元素<xsl:for-each> 的子元素。包括select , lang, data-type, order, case-order等几个可选属性。
在XSLT中可以对XML源文档的元素进行重新排序,排序的语法就是xsl:sort。举例:下面的代码就是将文档元素按name排序。
<xsl:template match="PEOPLE">
<xsl:apply-templates select="PERSON">
<xsl:sort select="@name"/>
</xsl:apply-templates>
</xsl:template>