[html5] embedded xml parsing rules

Ian Hickson ian at hixie.ch
Fri Jul 15 10:52:10 PDT 2011


On Fri, 15 Jul 2011, Rand McRanderson wrote:
>
> One of the original promises of HTML5 was that arbitrary xml could be embedded
> without losing the data structure.

I don't think that's ever been of goal of HTML.

If you want to embed XML with the HTML vocabulary, you should use the 
XHTML syntax (i.e. XML).


> A. If xml is embedded in an HTML5 document or an XHTML5 document, would 
> it be better to always use empty tags or not?

You can't embed arbitrary XML in an HTML document.

If you want to use non-HTML vocabularies in an XHTML document, you can use 
whichever XML syntax you like, since it's just XML.


> Part of my concern is if we have such a document and say it has a tag 
> <data-source> and HTML5 adds such a tag sometime in the future, could my 
> old tag break?

Yes. For that reason, it is non-conforming to add proprietary elements to 
HTML documents.



> B. If xml is embedded within a <script> tag is it parsed?

What do you mean by "parsed"?


> C. Is it possible to give instructions to a parser outside of a 
> javascript-context instructions to parse the contents of a script-tag as 
> xml (obviously I could devise my own way, but I'm asking if there's a 
> standard way)

I'm not sure what you mean.

-- 
Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'



More information about the Help mailing list