xsl:mode declaration is new in XSLT 3.0. Previously, modes were declared implicitly
by referring to them in the
mode attribute of
XSLT 3.0 introduces an
xsl:mode declaration to allow properties of the mode to be defined.
The element always appears as a child of
and it is empty (has no children).
name attribute identifies the name of this mode; if omitted, the element describes the properties
of the unnamed mode.
streamable="yes" indicates that template rules using this mode must be capable
of being evaluated in a streaming manner. This imposes restrictions on the content of the template rules.
For details, see Streaming of Large Documents. This option is available
in Saxon-EE only.
on-multiple-match indicates what action is taken when a node being processed
xsl:apply-templates in this mode matches more than one template rule (with the same precedence and priority). The values are
fail indicating that a dynamic error is reported, or
that the template rule appearing last in document order is chosen.
on-no-match indicates what action is taken when a node being processed
xsl:apply-templates in this mode matches no template rule. The default value is
text-only-copy. The permitted values are:
text-only-copy: the XSLT 2.0 behaviour (for elements: apply-templates to the children; for text nodes: copy the text node to the output)
shallow-copy: invoke the "identity template", which copies an element node and does apply-templates to its children
shallow-skip: ignores this node, does apply-templates to its children
deep-skip: ignores this node and all its descendants
fail: reports a dynamic error
warning-on-multiple-match="yes" causes a run-time warning when a node is matched
by multiple template rules.
warning-on-no-match="yes" causes a run-time warning when a node is matched
by no template rules.
As at Saxon 9.5, the attributes
are not yet implemented.