Re: [CSS21] response to issue 40

Bert Bos wrote:
> Your e-mail:
>     http://www.w3.org/mid/200309281922.h8SJMG9O014121@nerd-xing.mit.edu
> 
>     Section 4.1.1... CDO and CDC...
> 
> CSS WG response:
> 
>     It's odd but it works and we're happy with it, so, let's keep it.

I'm afraid that it does not in fact work.  Per that grammar, the 
following is a valid stylesheet production:

   <!--
   font { color: red } -->
   <-- div { display: block }
   --> --> --> span { display: inline }
   <!--

which should result in three rules being parsed.  That can't really be 
what's intended, and I doubt any UA will implement it that way; 
unfortunately we'll need a CSS2.1 test suite testcase for this if things 
stay as they are (I'm volunteering to take the above and modify it into 
a testcase following the suite guidelines if needed).

In my opinion, changing the stylesheet production to:

   stylesheet  : CDO? [ S | statement ]* CDC?;

would be a big step up.  Further specifying that CDO and CDC don't 
belong in sheets that are not embedded in a *ML document is still a good 
idea, I think....

-Boris

Received on Monday, 9 February 2004 13:58:58 UTC