I'm using XSLT to create a HTML output page. I need to add a doctype to the output page. I googled and this seems to be able to get it working:
<xsl:output
doctype-public="-//W3C//DTD XHTML 1.0 Strict//EN"
doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"
/>
So I added it to a test transformation file, transform.xsl:
<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:output
doctype-public="-//W3C//DTD XHTML 1.0 Strict//EN"
doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"
/>
<xsl:template match="/">
<html>
<head>
<title>test</title>
</head>
<body>
content!
</body>
</html>
</xsl:template>
</xsl:stylesheet>
But the output HTML does not contain a doctype... . The rest of the example ... comes out fine.
What am I doing wrong, why isn't the doctype added?
Thanks!
EDIT: problem solved, I'm using eXist and it seems the xsl:output instruction will not work, the solution: mailing list