I'm trying to create an XML file with a corresponding XSLT stylesheet. Everything sort of works okay, but...
...the nodes I'm outputting contain XHTML text inside them, like so:
<?xml version="1.0" encoding="UTF-8"?>
<root>
<snippet id="user_surname">
<content>
<h1>Some title here</h1>
<p>Blah blah blah...</p>
</content>
</snippet>
...
</root>
Here's the corresponding XSLT stylesheet:
<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="/">
<html>
<body>
<xsl:for-each select="root/snippet">
<div>
<xsl:value-of select="content" disable-output-escaping="yes" />
</div>
</xsl:for-each>
</body>
</html>
</xsl:template>
</xsl:stylesheet>
The issue I'm having, is that the h1 and p tags are not printed as h1 and p tags, but instead, as plain text without the tags.
How can I get my XSLT stylesheet to print these tags as is? I tried wrapping in CDATA tags, but it doesn't seem to help.
Thanks in advance!