Pages

Friday, February 18, 2011

Handling Comments and processing-instruction in XSLT

    <xsl:template match="//comment()">
<xsl:comment>
<xsl:value-of select="."/>
</xsl:comment>
</xsl:template>
<xsl:template match="//processing-instruction()">
<xsl:processing-instruction name="{name()}">
<xsl:value-of select="."/>
</xsl:processing-instruction>
</xsl:template>

No comments: