I want to transform an input XML document into XHTML via XSLT. In my stylesheet I'm using xsl:output with the following attributes:
<xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes"
doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"
doctype-public="-//W3C//DTD XHTML 1.0 Strict//EN" />
The transformation into XTHML 1.0 Strict works fine when I use the XSLT Processor in editors like XML Copy Editor or Editix. It works as expected when I use the command line xsltproc, too.
But when I link my stylesheet ("myfile.xsl") into the original XML document ("myfile.xml") like this:
<?xml-stylesheet type="text/xsl" href="myfile.xsl"?>
if I try to watch now "myfile.xml" in the major browsers (Chrome, IE or Mozilla), none of them is capable of transforming the XML document in the expected XHTML. With Opera, however, it works perfectly.
Is there something wrong in my XSLT (namely in the xsl:output) or is this a flaw in the XSLT implementation of the major browsers (IE, Chrome, Mozilla)?
The problem occurs only when I use the attribute method="xml" in . If I use method="html", it works in all browsers. But I need to generate XHTML, not HTML, that's why I use method="xml" along with the doctype-system & doctype-public attributes in xsl:output