Re: [css3-page] odd grammar for @page rules

On Tuesday 2011-12-06 14:11 -0800, L. David Baron wrote:
> The editor's draft at
> http://dev.w3.org/csswg/css3-page/#syntax-page-selector describes a
> grammar for @page rules that doesn't seem to match any of the other
> wording in the specification.  In particular, it has the following
> two productions:
> 
>   # media : 
>   #      MEDIA_SYM S* medium [ COMMA S* medium ]* LBRACE S* [ page | ruleset ]* '}' S*
>   #      ;
>   # 
>   # page :
>   #      PAGE_SYM S* IDENT? S* pseudo_page? S* 
>   #      '{' S* [ margin_box | ruleset ]? [ ';' S* [ margin_box | ruleset ]? ]* '}' S*
>   #      ;

Oops, I meant to copy the productions for page and margin_box
(rather than media and page):

# page :
#      PAGE_SYM S* IDENT? S* pseudo_page? S* 
#      '{' S* [ margin_box | ruleset ]? [ ';' S* [ margin_box | ruleset ]? ]* '}' S*
#      ;
# 
# margin_box :
#      margin_sym S* '{' ruleset* '}' S*
#      ;

> I believe every use of 'ruleset' in these two productions is
> incorrect, since http://www.w3.org/TR/CSS21/grammar.html defines it
> as:
> 
>   # ruleset
>   #   : selector [ ',' S* selector ]*
>   #     '{' S* declaration? [ ';' S* declaration? ]* '}' S*
>   #   ;
> 
> Nothing else in css3-page leads me to believe that selectors or a
> pair of braces are expected where the above productions have
> 'ruleset'.

-David

-- 
𝄞   L. David Baron                         http://dbaron.org/   𝄂
𝄢   Mozilla                           http://www.mozilla.org/   𝄂

Received on Wednesday, 14 December 2011 17:40:41 UTC