Although I’m not a web developer, I like to stay on top of how web technologies work together to construct all the wonderful sites out there. Knowing the small amount that I know, I have to say that I am truly glad that I don’t have to deal with the numerous issues that web developers face. Setting Internet Explorer aside and the various bugs in the other major so called standards compliant browsers, there is one big architectural problem that bugs the hell out of me. I’m talking about MathML, SVG, HTML, HTML5, XHTML and text/html vs application/xml+xhtml.
Several of these seemingly disjoint items are (by decree of the omnipotent W3 Consortium) completely incompatible with each other. I love MathML, but using it in a web page, even when you confine yourself to just one platform (Firefox), is an endless chore. It seems that in order to display math on your web page, you have to use XHTML. In order for Firefox to display the math correctly however, the code needs to be served with the MIME type application/xml+xhtml. This is where the fun starts. There is apparently no CMS or blog platform which supports this setup. Even though plenty of sites (including my WordPress blog) proudly carry the XHTML DTD, they are not served as application/xml+xhtml. If they were, no browser would be able to display them correctly simply because the code is invalid XHTML. Rather, it’s some weird mix between XHTML and HTML which happens to work in all browsers. I really have no idea why sites choose that DTD when they are not compliant with it. Why not use the HTML 4.01 one? Perhaps it wouldn’t work on all browsers? I don’t know.
Along comes Jacques Distler. He is a physics professor in the University of Texas, Austin, and has a blog, which he uses to share, among other things, his musings on string theory. Hats off to him for being able to understand all that algebra. As you can imagine, a lot of his musings are math heavy and he chose to use MathML rather than pictures to display his equations and math symbols. Accomplishing that task was a bear from what I gather. It involved hacking on Movable Type to produce a patch of about 2000 lines. Moreover, he hacked on the previous generation of the software (3.x) and the newer ones are apparently much harder to deal with.
I’m happy to say that it looks and works great! It even allows the comments to contain MathML and they oftentimes do. However, this is where that incompatibility I was talking about comes in. XHTML is a discontinued standard. It will see no more updates and is no longer the recommended way to code web pages. The W3C decided to drop it in favor of HTML5, so once that gets widespread adoption, there would be no standards compliant way to insert MathML into the code. That worries me a lot because 10 years weren’t enough for MathML to pick up steam (very few sites use it) when there was a standards compliant way to use it. I really don’t want it to die, but if it’s not a standard, then other browsers will have an even smaller incentive to catch up with Firefox’s implementation of MathML. I hear there’s talk of modifying the HTML5 spec to include the possibility of inserting MathML code, but I wouldn’t hold my breath just yet. These things move at glacial paces. In the meantime, MathML is left in limbo.
Unfortunately, SVG has a very similar fate. After years of work, browsers are finally getting close to having a decent implementation of the entire spec, and without XHTML, the only way to insert SVG into a document is to use the <object> tag which doesn’t seem like it would offer a good enough integration with the rest of the site. You might as well convert the SVG to a PNG file, insert it in an <img> and be done with it.
I really hope that I’m missing something here; i.e. I hope that most of what I just said is plain false. I guess I can hope that even though XHTML is dead, support for it won’t be removed from the browsers that already support it, at least in the near future. The fact that Firefox still has support for the Gopher protocol makes me think that there is a good chance of that at least.