What is use of xsl:text element in XSLT

In this article, we are describing xsl:text element.
  • 2003
The xsl:text element generates text in the output. It may contain #PCDATA, literal text, and entity references. It support to IE 5.0 and FF 1.0 but it is not supported to Netscape 6.

Syntax of xsl:text element
 

<xsl:text

  disable-output-escaping = "yes"|"no">

  <!-- Templete-->

</xsl:text>


It has one attribute-
  • disable-output-escaping

    In the disable-output-escaping attribute, "Yes" indicates that special characters and his output is "is" and "no" indicates that special characters and his output is "&gt".

Example of xsl:text element
 

<xsl:template match = "/">

  <html>

    <head>

      <title>Authors and Their Books</title>

    </head>

    <body>

      <intro>Books in stock are listed here.</intro>

      <xsl:text>List of books</xsl:text>

    </body>

  </html>

</xsl:template>


Further Readings

You may also want to read these related articles :

Ask Your Question

Got a programming related question? You may want to post your question here

Programming Answers here

© 2020 DotNetHeaven. All rights reserved.