<xsl:text disable-output-escaping=”yes” | “no” >


The xsl:text element is used to add literal text to the output. This element cannot contain any other XSLelements. It can only contain text.
Normally, any text that occurs in a stylesheet will be copied to the output regardless if it is enclosed by an xsl:text element. However, there are two primary reasons for using the xsl:text element:
The first is to control white-space. Extra white-space is preserved by using this element. In other words, a text will be displayed as it really is without any extra white-spaces being removed.
The second is to handle special characters such as an ampersand (&) or a greater-than sign (>). For example, you may wish a > to be displayed as a >. This is referred to as controlling output escaping.
This is not a self-closing element. The separate closing element is mandatory.
disable-output-escaping=”yes” | “no”
The optional disable-output-escaping attribute turns on or off the ability to escape special characters. If set to no, a > will appear as a > in the text. If set to yes, a > will appear as a >. (This attribute should be used with care.
Remember that XML requires a well-formed code in that all tags or elements must be closed. If set to yes, you could accidentally create a non-well-formed document.)
Scroll to Top