Generates a comment in the output.
<xsl:comment> </xsl:comment>
Number of occurrences | Unlimited |
Parent elements | xsl:copy, xsl:element, xsl:for-each, xsl:if, xsl:otherwise, xsl:param, xsl:template, xsl:variable, xsl:when, xsl:with-param, output elements |
Child elements | xsl:apply-templates, xsl:choose, xsl:copy, xsl:copy-of, xsl:for-each, xsl:if, xsl:text, xsl:value-of, xsl:variable |
The text generated by the children of <xsl:comment> appears between the starting characters <!-- and the closing characters -->.
The following example transforms a source element, "notes", into a comment:
<xsl:template match="notes"> <xsl:comment> <xsl:value-of /> </xsl:comment> </xsl:template>
Generating More Sophisticated Output