- From: fantasai <fantasai.lists@inkedblade.net>
- Date: Mon, 08 Dec 2008 19:56:49 -0800
- To: Bert Bos <bert@w3.org>
- CC: W3C style mailing list <www-style@w3.org>
Bert Bos wrote:
> The WG accepted the proposal[1] to change "declaration" to "statement"
> in http://www.w3.org/TR/CSS21/syndata.html#parsing-errors
>
> # Malformed declarations. User agents must handle unexpected tokens
> # encountered while parsing a declaration by reading until the end
> # of the declaration, while observing the rules for matching pairs
> # of (), [], {}, "", and '', and correctly handling escapes.
>
> But after reading the resulting text (below), I think it is not right.
>
> # Malformed statements. User agents must handle unexpected tokens
> # encountered while parsing a statement by reading until the end
> # of the statement, while observing the rules for matching pairs
> # of (), [], {}, "", and '', and correctly handling escapes.
>
> As the examples in 4.2 right after this paragraph show, user agents do
> *not* have to read until the end of the statement. E.g.:
>
> p { color:red; color:; color:green }
>
> has a malformed declaration in the middle and should be interpreted as
>
> p { color:red; color:green }
>
> There is no reason to read any further than the second ";".
Would replacing "statement" with "statement or declaration" fix this?
Or duplicating the rule, once for "statement" and once for "declaration".
~fantasai
Received on Tuesday, 9 December 2008 03:57:29 UTC