xsl:break
Used within xsl:iterate to exit the loop early.
Category: instruction
Content: sequence-constructor
Permitted parent elements:
any XSLT element whose content model is
sequence-constructor; any literal result element
Attributes
|
| The effect of the instruction may be defined
either by a |
Saxon availability
Available in XSLT 3.0 and later versions. From Saxon 9.8, available in all editions. Implemented in Saxon-PE and Saxon-EE since Saxon 9.6. Available for all platforms.
Details
The xsl:break instruction can be used within xsl:iterate, and causes
premature completion before the entire input sequence has been processed. If
there is a select attribute, or a contained sequence constructor,
this is evaluated and added to the result of the containing
xsl:iterate instruction.
The xsl:break instruction must not be followed by further
instructions, though it can occur as the last thing in a branch of a
conditional. It must appear lexically within the xsl:iterate
instruction (and not, for example, in a called template or function).
For details see xsl:iterate.