|
Posted by Jukka K. Korpela on 06/19/07 07:57
Scripsit Chaddy2222:
> But what about if the document in question has a full document type
> (which has the URL) but the document still has errors.
Then it's invalid, but that doesn't mean much per se.
> Would a standards conforming browser not pass the HTML and notice it has
> errors and render it accordingly.
First, there is no standards-conforming browser. Some browsers are just less
broken than others.
Second, SGML and classic HTML rules do not specify any particular error
processing. If a document is not valid or otherwise violates the
specifications, the specifications do say how it shall be processed. And in
practice, browsers will apply their tag processing rules and do what the
author meant, or something slightly different, or something completely
different.
In XHTML, the idea is more or less that if a document is not valid, it
should not be rendered at all. The first parse error should be reported, and
that's it. Your mileage may vary, e.g. depending on whether you serve your
XHTML as HTML as virtually everyone does (making it effectively tag soup
HTML with odd ingredients) or as XHTML, which makes IE choke on it.
At no point will Quirks vs. Standards Mode selection come into the picture.
> I always thaught that the web
> browser would try and correct the rendering of a document if it had
> errors.
It doesn't really try to correct anything. "Error correction" is an
euphemism. It will just eat the tag soup the ordinary way. This has nothing
to do with Quirks Mode, which means acting intentionally wrong in different
undocumented or poorly document ways
--
Jukka K. Korpela ("Yucca")
http://www.cs.tut.fi/~jkorpela/
[Back to original message]
|