Re: [CSS2.1] Parsing Selectors with Brackets

David Woolley wrote:
> 
> Christof Hoeke wrote:
>>
> 
>> Just a thought, but is CSS really so different to other languages and 
>> specs (like e.g. XML) that it is so difficult to actually state these 
>> precise rules (no offense)?
> 
> XML doesn't really have error recovery (although it is possible that 
> some applications of XML have error recovery for content model 
> violations (most cases where actual error recovery would be used in 
> other languages are well formedness errors and therefore recovery is 
> forbidden)).
> CSS needs error recovery defining for two reasons:

Oops, absolutely, I totally ignored this...

> 
> 1) the original one was that the "error" may no longer be an error in 
> some future version, and parsers are expected to recover the compatible 
> content from future version documents.  (Future versions can rely on 
> this part of the error recovery being applied by implementations of 
> previous versions.)
> 
> 2) for certain web technologies, the normal garbage in garbage out rule 
> is suspended and all viewers are supposed to behave the same in response 
> to the same, invalid input.  These include HTML, CSS and SVG, so errors 
> that, by their nature, can never be exploited for future versions of CSS 
> are still required to be recovered, by recent and future browsers, in 
> the same way.  (In traditional programming languages, although you might 
> have debugging compilers that use error recovery to try to find as many 
> errors as possible in one pass, one is expected to use error free source 
> code for the final build.  This can result in invalid input producing 
> compiler dependent results (particularly with production compilers). 
> That is considered unacceptable for web authors.)

HTML and CSS (and SVG - being XML? I mean only the syntactical level, 
not ) seem to be the only languages with the requirement or error 
recovery then? Or are there any other examples? Sorry for sounding (any 
maybe being) naive but this requirement should then be defined as simple 
and precise as possible with a set of rules, does it not? I know CSS3 
makes an effort in this direction, I was just wondering why it took so 
long. Looking at all the discussions what should behave how one may 
think a "proper" versioning (one could see browsers standards and quirks 
modes as a step in this direction almost) would simplify the task 
instead of trying to describe a grammar which is almost too difficult to 
describe? Or even a combination of a versioning system and still being 
backwards compatible would be possible?

Christof

(I hope I am not bothering this list with questions maybe discussed for 
years. I followed CSS for some years now but never as closely as in the 
last months and still do not had/have the time it probably deserves for 
being not just a nuisance)

Received on Wednesday, 26 December 2007 23:48:04 UTC