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.

FWIW, script element parsing is still the same. You can use <![CDATA[, ]]> inside it (as anywhere else in the foreign lands). I’m not entirely sure this is a good idea as it introduces yet another internal inconsistency for text/html, but it’s probably better for existing tool output.

Posted by Anne van Kesteren at

Even if the parsing is the same, is the object model presented to such scripts the same?  I honestly don’t know.

Posted by Sam Ruby at

Possible use case? I took a valid XHTML+SVG+MathMl page, replaced the head with an HTML5 head using the ISO-8859-1 encoding our Apache sends with text/html, and used the .html extension. For the first SVG on that page, I deleted the namespaces, the second SVG keeps the SVG namespace declaration. The result degraded to the text in the SVG in both FireFox 3 Beta 5 and in Opera 9.5 beta. To my surprise, Amaya 10, displayed both SVG images. Can SVG be dropped into text/html and rendered? I guess the Amaya answer is yes. I would note that the page is not exactly “tag soup” as the code was valid using

Posted by Dana Lee Ling at

Sam, yes. They share the same global object. (More or less identical to doing XHTML+SVG.)

Posted by Anne van Kesteren at


MathML and SVG come to HTML5....

Excerpt from Musings at

SVG in HTML5 all gone now.

I feel I should break out the crayons.

Posted by Shelley at

SVG will be back.

And xml:lang will be sorted out in due course. Not sure how to fix it yet, but we’ll figure something out.

Posted by Ian Hickson at

Here you will learn what is important, it gives you a link to an interesting web page:

Posted by Preventivo ristrutturazione at

I have express a few of the articles on your website now, and I really like your style of blogging. I added it to my favorite’s blog site list and will be checking back soon… Calcium Complex

Posted by MerckSEO at

I feel extremely cheerful to have seen your site page and anticipate such a large number of all the more engaging circumstances perusing here. Much appreciated yet again for every one of the points of interest. best anti-aging creams

Posted by jackrobert at

I wear t have sufficient energy right now to completely read your site however I have bookmarked it and furthermore include your RSS channels. I will return in a day or two. much obliged for an extraordinary site. ride one for kids

Posted by jackrobert at

Gangaur Realtech is a professionally administered affiliation invest noteworthy energy in arrive organizations where consolidated organizations are given by specialists to its clients searching for extended a motivating force by owning, having or placing assets into arrive. christian site

Posted by S E O Experts at

A very awesome blog post. We are really grateful for your blog post. combat, law enforcement You will find a lot of approaches after visiting your post. I was exactly searching for. Thanks for such post and please keep it up. Great work. Manual Handling Training

Posted by Merck SEO at

The matter you we highlighted above is surely value able for anyone to workout. the concept of your article is very true and It will result in a positive way. Online manual handling course

Posted by S E O Experts at

Thanks for the nice blog. It was very useful for me. I m happy I found this blog. Thank you for sharing with us,I too always learn something new from your post. Fire Survey

Posted by Merck SEO at

Add your comment