xsl:text
Causes its content to be output. The main reason for enclosing text within an
xsl:text element is to allow whitespace to be output.
Whitespace nodes in the stylesheet are ignored unless they appear immediately
within an xsl:text element.
Category: instruction
Content: sequence-constructor
Permitted parent elements:
any XSLT element whose content model is
sequence-constructor; any literal result element
Attributes
|
| New in XSLT 4.0. The string value of the new
text node can be defined either by a |
|
| New in XSLT 4.0. The separator defaults to a
single space if the |
|
| New in XSLT 4.0. Used to request serialization of a text node as a CDATA section. |
|
| If set to
|
Saxon availability
Available in XSLT 1.0 and later versions. Available in all Saxon editions. Available for all platforms.
Notes on the Saxon implementation
The XSLT 4.0 attributes select, separator
and cdata are implemented since Saxon 13.
Details
In XSLT 3.0, note that generally text value templates (expressions within curly
braces) are NOT recognized within xsl:text. However the standard
attribute expand-text can be used to enable their use. Text value
templates can be used within an xsl:text element if the nearest
ancestor which has an expand-text attribute has the value
yes for this attribute. (See xsl:stylesheet for details on the standard
attribute expand-text.)