S
Sebastien B.
I've trying to modify an XHTML document, copying everything but replacing
the divs with alternate content (simplified stylesheet below), but they
never get replaced
According to the O'Reilly book I have and the 5-6 examples I've seen, this
is correct; so what am I missing?
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xslutput method="html" indent="yes" />
<xsl:template match="div">
<div style="border: 1px solid red">
blah blah blah
</div>
</xsl:template>
<xsl:template match="*">
<xsl:copy>
<xsl:copy-of select="@*" />
<xsl:apply-templates/>
</xsl:copy>
</xsl:template>
<xsl:template match="comment()|processing-instruction()">
<xsl:copy />
</xsl:template>
</xsl:stylesheet>
the divs with alternate content (simplified stylesheet below), but they
never get replaced
According to the O'Reilly book I have and the 5-6 examples I've seen, this
is correct; so what am I missing?
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xslutput method="html" indent="yes" />
<xsl:template match="div">
<div style="border: 1px solid red">
blah blah blah
</div>
</xsl:template>
<xsl:template match="*">
<xsl:copy>
<xsl:copy-of select="@*" />
<xsl:apply-templates/>
</xsl:copy>
</xsl:template>
<xsl:template match="comment()|processing-instruction()">
<xsl:copy />
</xsl:template>
</xsl:stylesheet>