Lachlan Hunt wrote:
>
> Shane McCarron wrote:
>> In general, XHTML 2 does not define the behavior of erroneous usage...
>> This is either defined by an underlying specification (e.g., [XML]) or
>> left to the implementor.
>
> How can you possibly achieve any interoperable implementations without
> relying on browsers reverse engineering each other when you simply fail
> to define what UAs should do with the documents they receive?
You don't need interoperability for incorrect documents, just for
correct ones. The specification defines what a correct document is, and
how that should behave. If you then send a correct document to a
browser, it is part of a contract between you and the browser, and if
the browser fails to correctly deal with the document it is then a bug
in the browser.
If you send an incorrect document to a browser, there is no agreement on
how it should behave. If the browser does something you didn't intend,
it is your fault, not the browser's.
Classically browsers have tried to work out what the user intended, in
my opinion a grave error that has made a mess of the web, and done most
web authors a disservice. Having written browsers myself, I know that it
is extremely easy to display a warning to the user that there is
something wrong with a document, such as a grumpy face in the status bar.
But trying to document what should happen in every case of error is
doomed to be unfinished work. What should a browser do if you send it a
Fortran program with media type text/html? Sniff the content and execute
it? The answer should be: who cares what it does? It's an error, and we
don't need interoperability in these cases.
Steven Pemberton