7.4 Creating Comments
Creating Comments
<
comment>
<-- Content: -->
<
/comment>
The xsl:comment element is instantiated to create a
comment node in the result tree. The content of the
xsl:comment element is a template for the string-value of
the comment node.
For example, this
<xsl:comment>This file is automatically generated. Do not edit!</xsl:comment>
would create the comment
<!--This file is automatically generated. Do not edit!-->
It is an error if instantiating the content of
xsl:comment creates nodes other than text nodes. An
XSLT processor may signal the error; if it does not signal the error,
it must recover by ignoring the offending nodes together with their
content.
It is an error if the result of instantiating the content of the
xsl:comment contains the string -- or ends
with -. An XSLT processor may signal the error; if it
does not signal the error, it must recover by inserting a space after
any occurrence of - that is followed by another
- or that ends the comment.
|