The <index> element

The patternOptimization element may contain one or more index children defining schemes for indexation of template rules. The index element has the following attributes:

Attribute

Applies to

Values

Effect

index.expr

EE

a pattern string

An expression to generate an indexation value from a node under test. Variable values bound during the match of @pattern will be in scope for evaluation of this expression.

index.value

EE

a pattern string

An expression to generate an indexation key for the matched template rule. Variable values bound during the match of @pattern will be in scope for evaluation of this expression.

mode

EE

xsl:modes

Modes for which this directive is relevant. Default #all.

pattern

EE

a pattern string

A pattern to match against a template match pattern!

when

EE

expression

Qualification expression on expression variables from the pattern. Default true().

For details of the @pattern, @when and @mode properties, see Configurable rule optimization.