xsl:comment

Adds a comment node to the result tree.

Format

<xsl:comment>
               
  comment_text
               
</xsl:comment>
               

            

Description

The XSLT processor instantiates the contents of the instruction to generate the text of the new comment.

The XSLT processor reports an error if instantiating the contents of the xsl:comment instruction creates anything other than characters, or if the resulting string contains the substring "--" or ends with "-".

Example

The following instruction creates a comment in the result document:

<xsl:comment>Unique Irish band</xsl:comment>
               

            

The comment is

<!--Unique Irish band-->
               

            

 
Free Stylus Studio XML Training: