Re: XML Data Islands

On Dec 20, 2010, at 17:58, David Carlisle wrote:

> On 20/12/2010 15:34, Michael Kay wrote:
>> Can I ask: what's the status of "XML data islands" in HTML5?

There isn't such a feature in HTML5. The XML data islands feature of IE was never cloned by the other browsers, so HTML5 doesn't consider the feature to be part of the canon.

However, HTML5 has textual data islands called "data blocks". They are represented by <script type="something/unsupported">data block here</script>.
http://www.whatwg.org/specs/web-apps/current-work/#script

There are some restrictions on what the data block can contain:
http://www.whatwg.org/specs/web-apps/current-work/#restrictions-for-contents-of-script-elements

This feature is used for WebGL shaders, which are non-XML content. However, with the caveat about the restrictions mentioned above, the data block can contain XML to be parsed by a JS program or a plug-in. Silverlight uses XML data blocks ( http://msdn.microsoft.com/en-us/library/cc189016%28v=vs.95%29.aspx ). As does AmpleSDK ( http://www.amplesdk.com/examples/core/aml/databinding/ ) although AmpleSDK puts invalid xmlns attributes on the script tag itself.

> I don't think <xml> has any defined behaviour in html5.

It sure has. Parsing is defined by the "Any other start tag" and "Any other end tag" entries in the parsing algorithm. The DOM interface is HTMLUnknownElement. The rendering is whatever the defaults of CSS are.

-- 
Henri Sivonen
hsivonen@iki.fi
http://hsivonen.iki.fi/

Received on Tuesday, 21 December 2010 14:56:49 UTC