I run a forum which serves its pages as XHTML+MathML+SVG; in full:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1 plus MathML 2.0 plus SVG 1.1//EN" "http://www.w3.org/2002/04/xhtml-math-svg/xhtml-math-svg-flat.dtd">
Using the MathPlayer plugin, Internet Explorer users can use this site. However, sometimes someone is using the forum from IE and isn't able to install MathPlayer (maybe they're on a public machine somewhere). Then IE (at least 6&7) complains about the XHTML and offers just to download the file.
I read on the w3c site how to get around this using an XSL transformation (http://www.w3.org/MarkUp/2004/xhtml-faq#ie). When I put this in place, I found that Chrome was now complaining vociferously about undefined entities (the specific one was
but testing shows that that's not relevant).
Bizarrely, I can get round this by manually declaring the entities in the DOCTYPE:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1 plus MathML 2.0 plus SVG 1.1//EN" "http://www.w3.org/2002/04/xhtml-math-svg/xhtml-math-svg-flat.dtd" [ <!ENTITY nbsp " "> ]>
but I'd rather not do this for the whole gamut of entities possible. I say "bizarrely" because the XHTML+MathML+SVG dtd does, as far as I can see, declare these entities. So somehow these are getting missed out.
Is there a way around this problem? Can I serve XHTML-with-entities to IE?
In case it matters, the pages are generated by a php script and are served via apache, so if there's a reliable method of sniffing the browser and modifying the start of the document (so only sending the
<?xml-stylesheet ...> bit to IE) then that would be an acceptable alternative.
(I hope I have the right SE site ... please let me know if I'm in the wrong place. Ditto with the tags.)