W3C home > Mailing lists > Public > w3c-wai-ig@w3.org > April to June 2003

RE: Can Browsers Attempt to Render Broken XHTML?

From: Hoffman, Geoffrey <ghoffman@aztrib.com>
Date: Thu, 26 Jun 2003 10:39:31 -0700
Message-ID: <078FF71625E8D4118DCB009027513652028CF03C@tribmail1.aztribune.com>
To: w3c-wai-ig@w3.org

I think this has been covered, but to summarize my understanding:

HTML is much less restrictive than XML/XHTML.

An XML parser _MUST_ fail by definition, thus the same will (should) hold
with XHTML since it must be well-formed XML.

An HTML parser can do whatever it wants... which is (maddeningly) why
certain things 'work' in IE and not in [insertOtherBrowserHere] - IE (read:
thousands of sloppy M$ programmers) can parse your poorly formed HTML and
decide what to do with it (e.g. display it anyway and continue); the reverse
is NOT true for XML/XHTML parsers. A simple example is:

<select name=color>

works fine in most browsers, in a document declared as HTML. 
If the document is declared as XHTML, you should use:

<select name="color">

If the 1st example works in a document declared as XHTML, it would be a
deviation from the 'strictness' that XML is supposed to guarantee.

As long as there are sloppy parsers, people can continue to write sloppy
code that 'works' - I hope eventually the 'Sloppy Code Support' "feature" in
current HTML parsers (browsers) will be eradicated, forcing everybody to
have well-formed markup.

The only impact that can be made on accessibility as we migrate to XHTML is,
for example, a Schema that the XHTML document is validated against can be
made to _FORCE_ attributes like longdesc (althought this would have to be
implemented at the corporate/organizational level as opposed to the internet
in general).


Geoff Hoffman
Received on Thursday, 26 June 2003 13:42:20 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 20:36:16 UTC