MathML and SVG in HTML 5 with Firefox

I’ve been using MathML for a while now for some of my documentation work on 3D graphics. Unfortunately the only way at the moment is to use XHTML 1.1 modular doctype to include either or both of MathML and SVG. In HTML 5 these have become embedded content parts of the specification. So for example, using MathML would be as simple as doing:

[html]<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<title>MathML test</title>
</head>
<body>
<math>
<mrow>
<mi>y</mi>
<mo>=</mo>
<msup>
<mi>x</mi>
<mn>2</mn>
</msup>
</mrow>
</math>
</body>
</html>[/html]

Unfortunately the only browser to support either MathML or (parts of) HTML 5 at this moment is Firefox 3.5. However, the MathML or SVG embedded content did not render under 3.5. After reading John Resig’s post about a new HTML parsing engine in Mozilla’s Gecko engine I set out to test this engine’s support  by downloading the latest nightly and setting html5.enable to true in about:config and ‘lo and behold, it renders as expected.

The Beauty of Irony

I needed to look up something within a XHTML specification over at the W3 Consortium website. So I went to the XHTML2 Working Group Home Page. I was greeted with various encoding issues. Trademarks showing up as â„¢ character sequences. Now, normally when you see a page with an  or â at the start of a strange sequence you can be fairly certain it is a Unicode encoding, typically UTF-8. So at first I thought my auto-detect within Firefox was not turned on, checked it, no, it was definitely on. Selected unicode as encoding myself and, indeed, the page displayed normally. So I checked the page’s source. I was lovingly greeted by the following:

&lt;?xml version="1.0" encoding="iso-8859-1"?&gt;

I am sure most of you can appreciate the delightful irony that the organization that has a multitude of XML-based standards and specifications, which almost always use UTF-8 as default encoding, encode a page wrongly. Yes, mistakes are human, but to see something like this on the W3C site…

Edit: for some reason WordPress keeps converting my greater and lesser than signs into HTML entities, even when using Unicode entities.

Take back the web!

The standards body we thought would help us get the Internet better in shape is actually dying at the hands of elitist members.

The Internet started with open standards and code that formed the IP stack with the BSD Unix software. Later Tim Berners Lee and other people ensured we were able to work with HTML and all these specifications were open and people actively worked to get innovation and fixes in.

Now, since a number of years the World Wide Web Consortium (W3C) has become the domain where the ones who can pay the membership fees ($50.000 seems normal) get a voice and individuals without such backing are left in the cold.

For some examples, read:

http://lists.w3.org/Archives/Public/public-qa-dev/2006Jul/0011
http://www.zeldman.com/2006/07/17/an-angry-fix/
http://www.alistapart.com/articles/tohellwithwcag2/
http://www.dzr-web.com/people/darren/blog/2006/07/12/is-the-w3c-failing-us/

Internet Explorer

I am getting so tired of the Internet Explorer shows it perfectly, but it fails with browser X or Y rhetoric.

Once and for all people: the Internet has standards. That Microsoft choses not to play nice with this is not the fault of the people developing sites that do play nice with standards.

Instead, bother Microsoft to fix their browser’s dumb behaviour.