It’s just data

SVG and MathML Annexes to HTML5

As Anne previewed, HTML5 has recently added support for data attributes and MathML and SVG vocabularies.

The former feels OPMLish to me.  I predict it won’t be long before we see escaped HTML inside data attributes “in order to validate”.  And the RDF/A proponents will (correctly) point out that this isn’t enough information to reliably identify subjects, predicates, and objects.

The latter is of more interest to me.  It isn’t full distributed extensibility, nor is it entirely consistent with the direction that IE8 says they are going, but it is substantial progress.

By my read of the document, a typical standalone SVG document would be rendered correctly if served as text/html to a browser that supports this specification.  Of which, there are none, but more on that in a minute.  An HTML5 parser would insert implicit <html> and <body> elements, would ignore the XML prolog (but likely would sniff the page correctly).  <metadata> would be placed in the wrong namespace, and likely would not validate, but would not cause any rendering issues.  There may be some edge cases with CSS and attribute-value normalization rules and characters like form feeds, but these are likely to be minor.  I’m not clear at all yet on how <scripts> would be handled and if there would be any differences.  I suspect there will be.  Update: Anne assures me that this is not a concern.

As near as I can tell, my weblog would be considered valid HTML5 if served as text/html, with one exception: xml:lang.  But again, none of the current browsers would render the SVG content.  On one hand that’s entirely understandable as it has only been a few dozen hours since the spec updates were made.  But it is troublesome in that these requirements seem entirely author driven and no browser vendors have been very active in the discussion (to be fair, it is clear that Anne has been monitoring the discussion).

I do think an implementation or two at this point would be very helpful.  There’s enough documents to throw at such a prototype that we could quickly shake out any spec or implementation bugs.