XSLT xsl:sort Element
XSLT Element Reference Manual
Definition and Usage
xsl:sort The element is used to sort the output result.
Note:xsl:sort It is always located inside the xsl:for-each or xsl:apply-templates element.
Syntax
lang="language-code" data-type="text|number|qname" order="ascending|descending" case-order="upper-first|lower-first"/> | order | ascending
The following example sorts by artist as the key: xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> Try it »property
property
Value
Description
select
XPath-expression
Optional. Specifies the sort key of the nodes, that is, which node or node-set to sort by.
lang
language-code
Optional. Specifies the language used for sorting.
data-type
text
number
qname | 可选。规定被排序的数据的数据类型。默认是 "text"。 |
descending | Optional. Specifies the sort order. Default is "ascending". | | case-order | upper-first
lower-first | Optional. Specifies whether to sort uppercase letters first or lowercase letters first. |
Example
Example
My CD Collection
Title
Artist
XSLT Element Reference Manual