xsl:merge-key¶
Used to define the merge keys on which the input sequences of a merging operation are sorted.
Available in XSLT 3.0. From Saxon 9.8, available in all editions. Implemented in Saxon-PE and Saxon-EE since Saxon 9.6.
- Content: sequence-constructor
- Permitted parent elements:
xsl:merge-source
Attributes¶
select?- expression
- The merge key can be defined either by a string expression in a select attribute, or by an enclosed sequence constructor.
lang?- { language }
- Declares the algorithm used for alphabetic collating, as an ISO language code such as
en(English) orde(German). The default is based on the Java system locale. order?{ "ascending" | "descending" }- Declares the sort order; the default is
ascending. collation?- { uri }
- Declares the collation, by the name of a collating sequence.
case-order?{ "upper-first" | "lower-first" }- Relevant only for
data-type="text"; it declares whether uppercase letters are sorted before their lowercase equivalents, or vice-versa. data-type?{ "text" | "number" | eqname }- Declares whether collating is based on alphabetic sequence or numeric sequence. The permitted values are either
textornumber, or a built-in type in XML Schema, such asxs:dateorxs:decimal.
Details¶
The syntax and semantics of an xsl:merge-key element are closely based on the rules for the xsl:sort element (the only exception being the absence of the stable attribute); the difference is that xsl:merge-key elements do not cause a sort to take place, they merely declare the existing sort order of the input sequence.
For details and examples, see xsl:merge.