1

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?

Eric
  • 95,302
  • 53
  • 242
  • 374
  • @Dimitre: You appear to be in the enviable scenario of never having developed for IE – Eric Jun 07 '11 at 13:50

1 Answers1

4

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 ;) )

Lucero
  • 59,176
  • 9
  • 122
  • 152
  • Yep, that does the trick. But what if I want an HTML5 doctype? – Eric Jun 07 '11 at 13:51
  • nvm, there's an answer to [that question](http://stackoverflow.com/questions/3387127/set-html5-doctype-with-xslt) elsewhere. Thanks! – Eric Jun 07 '11 at 13:52
  • You're welcome. Which solution did you pick for HTML5 doctype? Since Firefox doesn't support `disable-output-escaping`, you shouldn't use the top rated answer IMHO. Maybe you shouldn't use XSLT to produce HTML5 anyways, see [this discussion](http://markmail.org/message/er7ilpszibhmtene). – Lucero Jun 07 '11 at 16:42
  • I did just go for the top answer. I might try some of the others, but at the moment, I'm not seeing any problems. The file will only bee seen by a small group anyway, most of them running IE8. – Eric Jun 08 '11 at 08:41