Re: CSS parser recovery

Bert Bos wrote to <www-style@w3.org> on 23 December 2002 in "CSS parser recovery" (<mid:Pine.LNX.4.05.10212141403570.24256-100000@lanalana.inria.fr>):

> I had started to write a long e-mail about the three stages of CSS parsing
> (tokenization, generic CSS, specific CSS1/2/3/SVG/Mobile/etc. parsing) and
> how the rules for ignoring tokens only apply to the last stage, but David
> Woolley stated it much better.

Meaning no offense to David Wooley, I found his explanation unclear at
first.  I would welcome your comments, Bert.

> A file that fails the generic CSS grammar
> is simply not CSS and the spec says nothing about that case.

You have got it exactly.

> (Whether it should is a whole different debate.)

I favor interpreting malformed data as if they were the maximal
initial sequence of said data
that is parseable according to the 'stylesheet' production.  This
presents an all-or-nothing environment at the level of rules: either a
rule is totally parseable by the core grammar or it is part of the
ignored trailing data.

-- 
Etan Wexler <mailto:ewexler@stickdog.com>

Received on Wednesday, 25 December 2002 05:35:04 UTC