XSLT TutorialLesson 58Free preview
XSLT <sort>
This lesson is part of XML · All levels
Summary
<xsl:sort> is used in <xsl:for-each> or <xsl:apply-templates> to change the order of iterations based on the value of an element or attribute. You can set the data type, the ascending/descending direction, the case order, and the language for the rules of comparison. More than one <xsl:sort> may be stacked for a tiered sequence.
Key points
- <xsl:sort> is only valid as a child <xsl:for-each> or <xsl:apply-templates>
- Data-type="number" for numbers, default "text" for text
- Order="ascending" (default) or order="descending"
- Case-order determines the capital letters first or the lower case
- Some have made multi-criteria sequencing
Full lesson
Code examples and quizzes
Full lessons, code examples, and quizzes are available to subscribers. 5 questions.