xsl:merge-key

Used to define the merge keys on which the input sequences of a merging operation are sorted.

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) or de (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 text or number, or a built-in type in XML Schema, such as xs:date or xs: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.

Links to W3C specifications

XSLT 3.0 Specification

See also

xsl:merge

xsl:merge-source