HTML versioning

by Edward O’Connor on 3 January 2008

This has been backlogged since April 2007. Like last January, I’m trying to clear my backlog for the new year, and this post is Good Enough For Now™. — EO’C

The HTML WG has been embroiled in a debate on versioning, off and on, for some time now. As the draft now stands, HTML5’s doctype will be simply <!DOCTYPE HTML>, with no version indicator.

The fundamental problem with a version # in a document is that it doesn’t provide for a given document to be valid under more than one version. What we really need is to be able to indicate a “space of versions” that a given document is valid under…

For years now, I’ve been asserting that the best way to do this with XML is to re-use the namespace name for compatible versions and to ignore things it doesn’t understand. That is, there won’t be a change in the namespace name for compatible changes. The space of versions is the single namespace name. The consumer won’t need to distinguish between versions and it will ignore any extra items it doesn’t understand.

Dave Orchard. Emphasis mine. Via Mark Baker.

Even the TAG is reconsidering its position on versioning. As long as such documents are likely to have the same or sufficiently compatible meanings per the different versions, then it may be better to omit any indication of version in the instance, and leave it to the receiving software to decide whether the document can be processed.

So basically, like Mark Baker (and potentially the TAG) say, serving content as text/html is already the sort of “version” indicator we want, since HTML 5 is backwards compatible with the public web. In the application/xhtml+xml world, xmlns="http://www.w3.org/1999/xhtml" fulfills the same role—which is why the XHTML 2 folks should really pick a new namespace URI. Hopefully, they’ll do so as a part of their rebranding effort.

Add a comment

Posting...