We Have a Winner!

So the XHTML2 people have judged poor little old HTML and found it wanting. XHTML1 isn’t good enough for them either, because it’s really just a reformulation of HTML, and neither language is “semantic enough”. The Semantic Web is not here yet, but through the technological solution of XHTML2, we’re going to make it happen.

Given that the plan is to make the web a better place by pushing out a “better” markup language, it behooves us to ask: how are we doing on current standards compliance? No, really, stop chuckling, it’s a serious question. XHTML 1.0 has been out for over three years, and the percentage of sites that conform to the XHTML specification is not noticeably different from zero.1 A naive person might wonder whether this failure of XHTML 1 to gain traction could pose a problem.

Then — a revelation. Through rather mysterious circumstances, I found myself at the website of Jacques Distler. After browsing his site for a while, I have come to the inescapable conclusion that Jacques Distler may well be the only person on the planet who understands the XHTML 1 specification and uses it properly.

That is, Distler’s site:

  1. Passes the “Simple Validation Test”: The home page validates as XHTML. (Most sites with a DOCTYPE of XHTML or HTML fail this test.)

  2. Passes the “Laziness Test”: In this test, we try validating two or three random pages deeper in the site. (This test is meant to filter out people who lazily slap a DOCTYPE on all their pages but only bother to actually validate their home page.)

  3. Passes the “MIME-type Test”: The server is serving up the pages with a MIME-Type of application/xhtml+xml, in accordance with the specification.2 (All together, now: “Serving up XHTML as text/html is evil.” Good.)

  4. Passes the (somewhat ad-hoc) “Cluefulness Test”: Distler is actually using XHTML to do something that you can’t do using plain old HTML. Namely, he’s embedding valid MathML markup in order to display equations directly in his blog. (If you’re going to go to all the trouble of getting your site to validate as XHTML, you really ought to do something with it, yes?)

So there you have it folks. One man is knowledgeable enough to implement our latest web standards correctly. The fact that this particular man is a theoretical physicist specializing in string theory and quantum field theory should not dissuade us in the slightest that the technological solution that the W3C has chosen will ultimately prevail.

1. In fact, after some preliminary investigation on my own, I began to worry that the absolute number of sites that conform to the XHTML specification is, in fact, exactly zero. More on this later.

2. Note that Distler’s site comes awfully close to failing the MIME-type test. Distler is serving up his pages as application/xhtml-xml to all browsers that support it (such as Mozilla) and text/html to browsers that don’t, such as Internet Explorer. According to the specification, XHTML 1.0 documents “MAY” under certain circumstances be served up as text/html, but XHTML 1.1 documents “SHOULD NOT”. To wit: “In particular, ‘text/html’ is NOT suitable for XHTML Family document types that adds elements and attributes from foreign namespaces, such as XHTML+MathML.” But we’ll give him a pass on this one.

3. Note that serving application/xhtml-xml to some browsers and text/html to other browsers is the only realistic way to follow the specification as of this date. Serving text/html to all user agents is plainly wrong. How about serving up application/xhtml-xml in all cases? While admirably purist, this approach is suicidal, because IE6 chokes on that MIME-type.