Causes its content to be output. The main reason for enclosing text within an xsl:text element is to allow white space to be output. White space nodes in the stylesheet are ignored unless they appear immediately within an xsl:text element.

Category: instruction
Content: #PCDATA
Permitted parent elements: any XSLT element whose content model is sequence constructor; any literal result element




If set to yes, special characters such as "<" and "&" will be output as themselves, not as entities. Be aware that in general this can produce non-well-formed XML or HTML. It is useful, however, when generating things such as ASP or JSP pages. Escaping may not be disabled when writing to a result tree fragment. The default is no.


Note that text value templates (expressions within curly braces) are NOT recognized within xsl:text.

Links to W3C specifications

XSLT 2.0 Specification

XSLT 3.0 Specification

See also