W3C home > Mailing lists > Public > www-html@w3.org > April 2007

Re: Semicolon after entities

From: Jukka K. Korpela <jkorpela@cs.tut.fi>
Date: Tue, 1 May 2007 00:00:20 +0300 (EEST)
To: www-html@w3.org
Message-ID: <Pine.GSO.4.64.0704302350220.6389@hopeatilhi.cs.tut.fi>

On Mon, 30 Apr 2007, David Woolley wrote:

> Lachlan Hunt wrote:
>
>> Wrong!  Error handling is one of the most important things to do 
>> interoperably.  Consider CSS, which does define precisely how to handle 
>> errors gracefully.  That is one case where the spec got it right and 
>
> CSS doesn't define how to handle errors.

It does. For example, if you write
body { width: 600; }
then this is an error (missing unit after number), and browsers are 
required to ignore the rule. And modern browsers do, except perhaps in 
Quirks Mode. There are quite a many pages that use unitless values where 
units are required, and error processing rules in CSS specifications 
require that those pages be broken, instead of making the sensible 
assumption (which e.g. IE makes in Quirks Mode) that the user meant 
pixels.

It's definitely an error handling requirement. Whether it's a good 
requirement is a different issue. Along the principles outlined for HTML 
5, it would be obvious that the rules need to be changed to comply with 
existing practice - except that this is CSS, not HTML, but I guess HTML 5 
would soon be accompanied by CSS 3.2, which would be effectively CSS 2.1 
with error handling requirements transmogrified and some cool new 
features thrown in. :-)

> It defines how to successfully ignore future extensions.

That might be the motivation behind the rules, but the rules and their 
implementations exist independently of that. (I won't even imagine what 
possible extension to CSS would allow pure numbers as values for e.g. the 
width property, given the fact that such values have widely been used to 
denote pixels.)

> If people start authoring CSS that falls within 
> the invalid CSS space, they risk finding their documents breaking in the 
> future.

That's a risk with any use of extended features (i.e. features not in 
specifications) and doesn't depend on error processing rules.

-- 
Jukka "Yucca" Korpela, http://www.cs.tut.fi/~jkorpela/
Received on Monday, 30 April 2007 21:00:29 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 27 March 2012 18:16:09 GMT