Re: Understanding HTML5 parsing

On Thu, 06 Jan 2011 19:14:56 +0100, Kurt Cagle <>  
> Anne, what's the html5 parser behavior for <a:foo bar="bat" b:bin="beer"
> xmlns:a="nsa" xmlns:b="nsb">text</a:foo>? How would that be interpreted?

If you try in a  
recent nightly of Gecko or Chrome it is easy to find out. (Although I  
suppose it does not explicitly list the namespace of attributes as they  
are almost always in no namespace. Only in SVG and MathML context is this  
different and only for a limited amount of scenarios.)

You get an element "a:foo" in no namespace with four attributes named  
"bar", "b:bin", "xmlns:a", and "xmlns:b", also all in no namespace with  
the values you specified. The contents of the element are a single text  
node with as value "text".

Anne van Kesteren

Received on Thursday, 6 January 2011 18:36:27 UTC