Search code examples
xsltquirks-mode

How do I prevent a locally stored XSLT rendered in IE8 defaulting to quirks mode?


I have some very simple xml and xslt documents, which render in IE8 in quirks mode. However, I can't seem to turn it off. Adding

<meta http-equiv="x-ua-compatible" content="IE=edge" />

seems to have no effect.

Is it possible to make it display in IE8 Standards mode?


Solution

  • Try adding a proper doctype:

    <xsl:output method="html" omit-xml-declaration="yes"
      doctype-system="http://www.w3.org/TR/html4/loose.dtd";
      doctype-public="-//W3C//DTD HTML 4.01 Transitional//EN"/>
    

    (I don't have an IE8 at hand so I cannot try - let me know if it works please ;) )