May 28, 2021 XSL T
The XSLT and xsl:sort elements are used to sort the output.
The element is used to sort the output results.
Note: slt;xsl:sort> always located inside slt;xsl:for-each;or slt;xsl:apply-templates?gt;
属性 | 值 | 描述 |
---|---|---|
select | XPath-expression | 可选。规定节点的排序关键字,即根据哪个节点或节点集来排序。 |
lang | language-code | 可选。规定排序所用的语言。 |
data-type |
text
number qname |
可选。规定被排序的数据的数据类型。默认是 "text"。
|
order |
ascending
descending |
可选。规定排序顺序。默认是 "ascending"。 |
case-order |
upper-first
lower-first |
可选。规定是首先按大写字母顺序还是小写字母顺序进行排序。 |
The following example will be sorted by artist as a keyword: