Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Comment out some code, but retain the original...

Status
Not open for further replies.

montek

Programmer
Jun 13, 2000
27
0
0
US
I would like to transform some original XML that doesn't quite work in HTML using this XSL:

Code:
<xsl:template match=&quot;* | text() | @*&quot;>
     <xsl:copy>
          <xsl:apply-templates select=&quot;@*&quot;/>
          <xsl:apply-templates/>
     </xsl:copy>
</xsl:template>

<xsl:template match=&quot;input[@type = 'group']&quot;>
	<xsl:comment>
		<xsl:value-of select=&quot;.&quot;/>
	</xsl:comment>
</xsl:template>

However, it doesn't seem to be working. I seem to be able to properly trap the <input type=&quot;group&quot;> tag, but it doesn't just put comments around that, which is what I want. It seems to omit it completely.

Here's an example of what I have:

Code:
<input type=&quot;group&quot; min=&quot;0&quot; max=&quot;4&quot;/>

And here's what I want:

Code:
<!--<input type=&quot;group&quot; min=&quot;0&quot; max=&quot;4&quot;/>-->

Any ideas?

Monte Kalisch
Brainbench MVP for ASP

Anti-Spam Email: montek at montekcs dot com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top