Jump to content

comment element


paetje
 Share

Recommended Posts

I want to make an alement <comment></comment> within my XML document. This should be transformed by my XSL-T document.

	<xsl:template match="comment">  <!-- 	 <xsl:apply-templates/>  -->	</xsl:template>

This doesn't work. This comment element is used to put comment into my XML document while I'm using XMetal.Does anyone know how I can make this work :) ?

Link to comment
Share on other sites

That's what the <xsl:comment> is used for:

<xsl:template match="comment"> <xsl:comment>  <xsl:apply-templates/> </xsl:comment></xsl:template>

The difference here is that the <!-- and --> mark the coment inside the XSLT document itself. And <xsl:comment> marks that the content inside it suppose to be outputed as a comment marked with the above.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...