XSLT Element Reference
The <xsl:sort> element is used to sort the output.
Note: <xsl:sort> is always within <xsl:for-each> or <xsl:apply-templates>.
| Attribute | Value | Description |
|---|---|---|
| select | XPath-expression | Optional. Specifies which node/node-set to sort on |
| lang | language-code | Optional. Specifies which language is to be used by the sort |
| data-type | text number qname |
Optional. Specifies the data-type of the data to be sorted. Default is "text" |
| order | ascending descending |
Optional. Specifies the sort order. Default is "ascending" |
| case-order | upper-first lower-first |
Optional. Specifies whether upper- or lowercase letters are to be ordered first |
The example below will sort the output by artist:
XSLT Element Reference
Your message has been sent to W3Schools.