I'm transforming an XHTML file to XML. I'm having issues that the XHML entity references are all getting swallowed in the process, i.e. entities such as © are disappearing in the output.
My code looks as follows:
<?xml version="1.0" encoding="utf-8"?>
<xsl:output method="xml" indent="yes"/>
<xsl:template match="h1|h2|h3|h4|h5|h6|h7|h8|h9">
<heading>
<xsl:attribute name="name">
<xsl:value-of select="name(.)" />
</xsl:attribute>
<xsl:attribute name="content">
<xsl:value-of select="." />
</xsl:attribute>
</heading>
</xsl:template>
<xsl:template match="/html/body">
<mapping>
<xsl:apply-templates select="h1|h2|h3|h4|h5|h6|h7|h8|h9" />
</mapping>
</xsl:template>
</xsl:stylesheet>
In the output any entity references disappear. I've tried adding the entity definitions into my XSL ... no luck.
Any suggestions ?
Anton