Re: Detecting XHTML

On 04/01/2011 22:39, Kurt Cagle wrote:
> I'm guessing that the tbody example et al. is particularly significant
> in the progressive rendering case?
>

not necessarily, for example you can style a table by applying a css 
rule to tbody and it should work in text/html whether or not the tbody 
is explicit in the markup. If you changed the html parser so that
<table><tr><td>aaa</td></tr></table>
parsed as it does for xhtml, then any number of things would break as 
the tbody element would no longer be in the dom so not usable from css 
or script.

tbody isn't the only example, as Henri has pointed out in a parallel 
thread, the html rules around force-closing the p element will similarly 
cause even well formed xml documents to have radically different parse 
trees when parsed as HTML. I may have disagreed with Henri over some 
edge cases with new (to html) elements where I think there could have 
been less differences, but I even I wouldn't suggest changing the 
parsing here to be xml-like.


David

Received on Tuesday, 4 January 2011 23:11:57 UTC