[Bug 891] Semicolon should terminate blockless at-rule

http://www.w3.org/Bugs/Public/show_bug.cgi?id=891


bert@w3.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |INVALID




------- Comment #1 from bert@w3.org  2006-04-25 09:22 -------
The intention of the generic grammar and the parsing rules is to allow
additional @-rules in the future, should the need arise. Those @-rules must all
be of the form

    ATKEYWORD S* any* [ block | ';' S* ]                    (1)

However, "@chars [.-;abc];" *isn't* of that form. The non-terminal "any" cannot
contain a semicolon and square brackets must be paired; those two requirements
cannot be met by the example.

There is no way to match that input to the grammar, therefore the input isn't
an invalid @-rule, it simply isn't CSS.

There are voices that say that eventually CSS should specify exactly how to
parse any stream of bytes, so that every UA does exactly the same, no matter
how little the input looks like CSS. But for the moment, CSS doesn't yet say
how to treat this particular example.

I think the task of the validator is to say that this input is invalid (of
course), but how it recovers from the parsing error is mostly arbitrary.

Received on Tuesday, 25 April 2006 09:23:03 UTC