Click to return to the XML (Extensible Markup Language) home page    
xsl:choose Element     xsl:copy Element     XSL Elements    
Web Workshop  |  XML (Extensible Markup Language)

xsl:comment Element


Generates a comment in the output.

Syntax

<xsl:comment  >

Element Information

Number of occurrences Unlimited
Parent elements xsl:copy, xsl:element, xsl:for-each, xsl:if, xsl:otherwise, xsl:template, xsl:when, output elements
Child elements xsl:apply-templates, xsl:choose, xsl:copy, xsl:eval, xsl:for-each, xsl:if, xsl:value-of
Requires closing tag Yes. XSL is an XML grammar and, like all XML grammars, all tags must have closing tags to satisfy the definition of well-formed.

Remarks

The text generated by the children of xsl:comment appears between the starting characters <!-- and the closing characters -->.

Example

The following example transforms a source element "notes" into a comment.

<xsl:template match="notes">
  <xsl:comment>
    <xsl:value-of />
  </xsl:comment>
</xsl:template>

See Also

Generating More Sophisticated XML Output



Back to topBack to top

Did you find this topic useful? Suggestions for other topics? Write us!

© 1999 Microsoft Corporation. All rights reserved. Terms of use.