### MathML in HTML5

Roger Sidje (the moving force behind Mozilla’s MathML support) is experimenting with MathML in HTML. There’s an interesting discussion in the Mozilla newsgroup. The idea is to relax the requirement that MathML be embedded in XHTML^{1}, with an eye, ultimately, to using MathML as the mathematical markup for HTML5.

I think this, if done right, is a wonderful idea. But I have a few comments

- Today, XHTML is a
*huge*barrier. I know of lots of people who would be all too happy to use MathML (generated by tools like itex2MML), but are stymied by the exigencies of XHTML. CMS’s that support XHTML are nearly nonexistent. Few people are crazy enough to either write their own, or to hack an existing one into producing XHTML. And, even if they did have an XHTML-capable CMS, many users don’t have access to their server configuration to do the required content-negotiation, to sent`application/xhtml+xml`

to capable browsers. So MathML-in-HTML would lower the barrier tremendously. - MathPlayer 2.0 already allows IE/6 to consume MathML in tag soup. If I understand correctly, Mozilla’s implementation will be
~~better~~similar to MathPlayer’s (except that the latter actually processes the MathML as XML), in that the MathML nodes will be part of the DOM. That’s very important if, like me, you’d like to apply CSS styling or Javascript to MathML content. - On the other hand, I think we want to avoid having two incompatible markup languages, both named MathML. Rather than creating some incompatible markup language, confusingly called MathML, I think the Mozilla people should create a profile of MathML 2.0 (along the lines of XHTML’s Appendix C) which is safe to be consumed by the HTML5 parser.
- Roger Sidje and Ian Hickson disagree about whether to support the 2000+ MathML named entities. I side with Hickson. Sending named entites over the web is unsafe in an XML context. Hence the existence of tools to convert them to NCR’s or utf-8, before sending them over the wire. Allowing MathML named entities in HTML5 will break interop with existing HTML documents, and cause problems if the same MathML content is served as XML. Not worth the trouble.

If there are stumbling blocks to creating a suitable profile of MathML 2.0, now is the time to find out. Then you can pass on suggested changes to the MathML 3.0 Working group.

^{1} Real XHTML, served as `application/xhtml+xml`

.

## Re: MathML in HTML5

Would this also include SVG?