XHTML2 mixed metaphors

There’s been a lot of hubbub about XHTML2 being incompatible with XHTML1 and HTML. Of more concern to me (in this post, anyway) is an inconsistency in the XHTML2 spec itself, one that I haven’t seen considered by the hoi polloi.

Several attributes in the current draft of XHTML2 are specified in a form that’s tied to transmission protocols. One example, the type attribute, states that it is a comma-separated list of media ranges… as defined [in the HTTP specification] as the field value of the accept request header.

Why is this bad? Most other attribute values in all versions of HTML or XHTML (XHTML2 included) use space-separated values; among them are the core attribute class, the document properties attribute resource, the object module’s archive and the table module’s headers. The only ones that don’t are used to specify values that may include spaces, which MIME types can’t. Added to this, there’s no way to efficiently parse comma-separated values using CSS selectors, XPath or XSLT, to name but a few of the current golden children of the W3C.

Making these values conform to the format of what is, ultimately, an unrelated specification–not to mention one that’s divergent from current/expected/common practice–is a bizarre choice, and one that seems predicated on making implementation easier for browser makers than authors (and authoring tools). Look at IE7 and Sjoerd Visscher’s XHTML2 sample; if nothing else, they show that the browser isn’t the bottleneck in adoption of new technologies.

The W3C’s making a mistake if it’s making XHTML2 harder on content creators than it already is. The reason HTML took off–and why other things didn’t–can be summed up with a meme: It’s the authors, stupid!

Published by