Wednesday, December 13, 2006

MathML and XHTML vs. HTML and Firefox irritation and Blogger

So I've been dicking around with MathML, trying to figure out why it renders in one context but doesn't render in another. Guess what? Turns out its all about the MIME type, at least as far as Firefox is concerned. Create an XHTML document with some well-formed MathML and give it a .html extension. Load it in Firefox and presto, no rendering. Change the document extension from .html to .xhtml and try loading it again. What's that, you say? It renders now? Fantastic! So what's going on here? Firefox won't render MathML unless the MIME type is application/xhtml+xml. Apparently DOCTYPE has nothing to do with anything, and using an "http-equiv" meta tag doesn't solve the problem either (though the latter can change the character encoding on the fly). Which means that I can't get Blogger to display MathML, because I can't figure out how to make Blogger serve a blog entry as anything other than text/html. Anyone know a workaround for this?

2 Comments:

Blogger PaulTopping said...

Not sure about your particular situation but we document here (www.dessci.com/mathplayer) how to create pages and websites containing MathML equations for best compatibility with both Mozilla/Firefox and Internet Explorer with our free MathPlayer plug-in.

Paul Topping
Design Science, Inc.

1:50 PM  
Blogger GG said...

Paul -

I'm aware of MathPlayer, but its my understanding that its a plugin specifically for IE. Call me a bigot, but I'm more interested in getting Firefox's native MathML rendering to work. The MathML support seems to be pretty good, especially if you install the associated fonts, but it only works if the document is served with the appropriate MIME type, hence my problem with Blogger.

6:39 PM  

Post a Comment

<< Home

Blog Information Profile for gg00