Insert comment into HTML output

R

RSG

Hi,

Stupid question: how do I get an XSLT stylesheet to emit a comment
into the HTML output file?

Obviously this won't work; it's interpreted as a comment in the
stylesheet:

<template ...>
...
<!-- My Comment -->
...
</template>

This doesn't either; it ends up displaying the comment when the HTML
file is viewed in a browser:

<template ...>
...
&lt!-- My Comment --&gt
...
</template>

Closer, though, in that it ends up in the HTML file, but verbatim, not
as an actual comment.

I've also tried CDATA, but that doesn't work either. This must be
possible, right? Any ideas?

Thanks!
 
J

Joris Gillis

Hi,
Stupid question: how do I get an XSLT stylesheet to emit a comment
into the HTML output file?
This must be possible, right?

Off course it is :)

use:
<xsl:comment>My Comment</xsl:comment>


regards,
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,999
Messages
2,570,243
Members
46,835
Latest member
lila30

Latest Threads

Top