xsl:text

Adds a text node to the result tree.

Format

<xsl:text [disable-output-escaping="yes|no"]>
               
  text_node_contents
               
</xsl:text>
               

            

Description

The XSLT processor reports an error if instantiating text_node_contents results in anything other than characters.

You can also add text nodes to result documents by embedding the text in elements that you define.

You can specify the disable-output-escaping attribute of the xsl:text instruction. The allowed values are yes or no. The default is no. If the value is yes, the text node generated by instantiating the xsl:text element is output without any escaping. For example:

<xsl:text disable-output-escaping="yes">&lt;</xsl:text>
               

            

This instruction generates the single character <.

Examples

The following fragment adds two text nodes by embedding text.

<xsl:template match = "/">
               
  <html>
               
    <head><title>Authors and Their Books</title></head>
               
    <body>
               
      <intro>Books in stock are listed here.</intro> 
               
      ...
               
    </body>
               
  </html>
               
</xsl:template>
               

            

The next example specifies the xsl:text instruction:

<xsl:text>Following is a list of authors.</xsl:text>
               

            

Support for the Saxon XQuery Processor

Stylus Studio's XQuery tools feature integrated support for the Saxon SA 8.7.3 XQuery and XSLT processor so you can Edit, Debug and Run XQuery using Saxon. Java code generation support lets you deploy Saxon XQuery applications with just one click.

Medical Companies That Use Stylus Studio

Medical companies can't solve every ache and pain. That's why when it comes to the struggle of data integration, they turn to Stylus Studio to simplify their pains. Come see which medical companies are injecting Stylus Studio into their work load!

XML Project

Stylus Studio's Project Window is an intuitive, visual feature for organizing files belonging to a project. It supports different file-type icons and nested folders; many helpful options are available from the context menu.

XPath Query Editor

Stylus Studio's XML Editor has an XPath Query Editor that allows you to easily roubleshoot, test, and debug any XPath expression.

Stylus Most Wanted

 
Free Stylus Studio XML Training:
W3C Member