[Home] [By Thread] [By Date] [Recent Entries]
David Carlisle wrote:
On 18/08/2010 12:09, Martin Honnen wrote:I don't see any problem with that code Are we talking about the same code? It does try to serialize with a mode="comment": <xsl:template match="spec">
<xsl:comment>
<xsl:apply-templates select="self::*" mode="comment"/>
</xsl:comment>
</xsl:template> <xsl:template match="*" mode="comment">
<xsl:value-of select="'<'"/>
<xsl:value-of select="name()"/>
<xsl:value-of select="'>'"/>
<xsl:apply-templates select="@*|node()" mode="comment" />
<xsl:value-of select="'</'"/>
<xsl:value-of select="name()"/>
<xsl:value-of select="'>'"/>
</xsl:template> <xsl:template match="text()" mode="comment">
<xsl:value-of select="."/>
</xsl:template> <xsl:template match="@*" mode="comment">
<xsl:value-of select="name()"/>
<xsl:text>="</xsl:text>
<xsl:value-of select="."/>
<xsl:text>" </xsl:text>
</xsl:template>So where does that code try to put an element into a comment? -- Martin Honnen http://msmvps.com/blogs/martin_honnen/
|

Cart



