W3C home > Mailing lists > Public > public-html@w3.org > May 2007

Re: Support Existing Content

From: Maciej Stachowiak <mjs@apple.com>
Date: Tue, 1 May 2007 13:11:30 -0700
Message-Id: <37D47363-4226-4780-AB55-028AC433321B@apple.com>
Cc: dbaron@dbaron.org, public-html@w3.org
To: "T.V Raman" <raman@google.com>

On May 1, 2007, at 10:33 AM, T.V Raman wrote:

> Somehow this this "does not compute".
> Why aren't we defining Javascript the same way as what you
> describe --i.e. make every failing program "somehow work".

JavaScript clearly defines error handling rules which are largely  
interoperable with legacy practice. Bad syntax or other errors  
require an exception to be thrown. It is also quite lenient compared  
to compiled languages like C. For example, calling a function with  
the wrong number of arguments is not an error. Furthermore,  
JavaScript content is often split into multiple scripts and event  
handlers. An error in one does not make the others fail. However,  
HTML/XML documents are usually a single unit, so truly strict error  
handling would lead to catastrophic failure.

> Why aren't we even defining CSS that way i.e. "somehow make every
> CSS rule parse and mean something."

Actually, the CSS clearly defines error handling. An erroneous CSS  
stylesheet will still be processed with fallback rather than  
resulting in a catastrophic error. That doesn't mean that all invalid  
CSS is accepted as part of the language, just that there are  
requirements on consumers for how to handle invalid content.

> Why is HTML special?

It's not special. We'd like it to have defined error-handling rules,  
just like CSS and JavaScript.

Received on Tuesday, 1 May 2007 20:11:47 UTC

This archive was generated by hypermail 2.3.1 : Thursday, 29 October 2015 10:15:20 UTC