Page 1 of 1

elements inside comment

Posted: Wed Aug 02, 2006 10:57 am
by eHannes
Hi,

How can i get elements inside a comment?
When i say:

Code: Select all

<xsl:comment>
<test><xsl:value-of select="'blabla'"/></test>
</xsl:comment>
i get as result just

Code: Select all

<!---->
When i say:

Code: Select all

<xsl:comment>
<xsl:value-of select="'blabla'"/>
</xsl:comment>
i get:

Code: Select all

<!-- blabla -->
(as expected)

How to get the element inside the comment?

Thanks, Hans

Posted: Wed Aug 02, 2006 11:07 am
by sorin_ristache
Hello,

Use

Code: Select all

<xsl:comment>
<test><xsl:value-of select="'blabla'"/></test>
</xsl:comment>
If xsl:comment tries to create nodes other than text nodes these nodes are ignored.

Regards,
Sorin