I have the following simple XSL style sheet:
<?xml version="1.0" encoding="windows-1252"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns="http://www.w3.org/1999/xhtml" version="1.0">
<xsl:output encoding="utf-8" method="html" />
<xsl:template match="/">
<xsl:text disable-output-escaping="yes">
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"&gt;
</xsl:text>
<html>
<head><title>hello world</title></head>
<body>
<p>hello world</p>
</body>
</html>
</xsl:template>
</xsl:stylesheet>
When I use it, Internet Explorer 7 and Safari 5.0.2 both simply display "hello world", as expected. However, Firefox 3.6.10 displays something different:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
hello world
I'm guessing that Firefox is taking the first xsl:text command literally, while IE and Safari are treating it as part of the page. Are IE and Safari correctly rendering this, or is Firefox?
(I'm doing the xsl:text thing to make the MSXML library output the correct tags for HTML5 compliance.)