Re: HTML normalization question wrt DOM

Space Cowboy wrote:
> 
> Actually, the rule is that it must be a valid HTML, which is always properly
> nested. If it isn't I believe it errors (obviously since it's very clear
> that XML must nest correctly, there's not problem there). If the text
> doesn't nest right, the browser is at fault for interpretting it
> incorrectly. Netscape and Microsoft don't worry about nesting order, but the
> spec does.

This is partially true (or at least I think it is. I couldn't completely parse
the entire response). 

It is true that the spec currently only discusses well-formed HTML and XML. Our
supposition was that most of the content that uses the DOM will be new and,
hence, forcing the markup to be well-formed is a reasonable constraint. This
doesn't address scripts or applications that attempt to deal with (potentially
illegal) legacy content. It also doesn't address cases (like FORM tags that
don't have clean nesting boundaries) which are acceptable based on current
practice. The issue of having a cannonical way to deal with non well-formed
content (at least for HTML) has been brought up in the working group. We haven't
come to a resultion on how or if it should be done.

--Vidur

Received on Tuesday, 13 January 1998 19:45:50 UTC