xsl:on-empty
Used to allow conditional content construction to be made streamable. Outputs the enclosed content only if the containing sequence also generates "ordinary" content.
Category: instruction
Content:
sequence-constructor
Permitted parent elements:
any XSLT element whose content model is
sequence-constructor; any literal result element
Attributes
|
|
Notes on the Saxon implementation
New in XSLT 3.0, and implemented since Saxon 9.7.
Examples
The following code generates substitute text when there is no content,
however it is not guaranteed-streamable because it processes child
item-for-sale
elements more than once:
To make this streamable, it can be rewritten using the
xsl:on-empty
instruction: