W3C home > Mailing lists > Public > www-style@w3.org > May 2008

Re: [CSS21] parsing invalid syntax and matching brackets

From: Gabriele Romanato <gabriele.romanato@gmail.com>
Date: Wed, 21 May 2008 12:01:24 +0200
Message-ID: <8aec6fbf0805210301s9e7e684i5998c1f718d3e179@mail.gmail.com>
To: fantasai <fantasai.lists@inkedblade.net>
Cc: www-style@w3.org, "Justin Rogers" <justrog@microsoft.com>
I'd like to say that I'll start writing a short review on the current css
2.1 parsing in a few months. this review will take into account also the
actual implementations used in FF and Webkit parser. It should be a long
article that I'll send to Elika when it'll be finished. I'll add many
examples taken from my tests on parsing, plus the most relevant tests from
css 2.1
test suite. largely based on my studies on parsing and university papers.
xxx ^.^

2008/5/21 fantasai <fantasai.lists@inkedblade.net>:

>
>  http://csswg.inkedblade.net/spec/css2.1#issue-24
> CSS2.1 issue 24 questions whether the brackets-and-quotes-matching rules
> should apply to everything or just to declarations within a declaration
> block. I feel very strongly that they should apply to everything and be
> the highest-priority rule for parsing. Without such a rule, new and old
> implementations will scope blocks such as @media blocks differently. A
> new implementation parsing an invalid statement could follow rules that
> end the block early and while older implementations eat until the end
> of the style sheet looking for a matching bracket.
>
> My proposal would be to change the first three instances of "declaration"
> in the malformed declaration rule in 4.2
>
> 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.
>
> to "statement" (which is defined in 4.1.4).
>  http://www.w3.org/TR/CSS21/syndata.html#statements
>
> That would extend the pairs-matching rules to all constructs in the style
> sheet. I hope this matches the behavior Justin Rogers proposes in
>  http://lists.w3.org/Archives/Public/www-style/2008Mar/0096.html
>
> ~fantasai
>
>


-- 
http://www.css-zibaldone.com/
http://www.css-zibaldone.com/test/ (English)
http://mimicry.css-zibaldone.com/
Received on Wednesday, 21 May 2008 10:02:08 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 27 April 2009 13:55:06 GMT