Re: parsing issue in the editor's draft of css3-image

On Thu, 16 Jul 2009, fantasai wrote:

> Yves Lafon wrote:
>> In [1], I found the following example:
>> 
>> background-image: image(wavy.svg, 'wavy.png' 150dpi, "wavy.gif"  or blue);
>> 
>> Should it be image( url(wavy.svg), 'wavy.png' 150dpi, "wavy.gif" or blue); 
>> ?
>> 
>> With the CSS21 current parsing rules, function is defined as
>>
>>  FUNCTION S* expr ')' S*
>> 
>> expr
>>   : term [ operator? term ]*
>> 
>> term
>>   : unary_operator?
>>     [ NUMBER S* | PERCENTAGE S* | LENGTH S* | EMS S* | EXS S* | ANGLE S* |
>>       TIME S* | FREQ S* ]
>>   | STRING S* | IDENT S* | URI S* | hexcolor | function
>>   ;
>> 
>> So the unquoted wavy.svg is not a string, not a URI (as url(...) is 
>> missing) and not an ident because of the '.' and a CSS21 Parser based on 
>> the latest CSS21 Candidate Rec is unable to parse this declaration.
>> 
>> Depending of the intent, it would be good to either add a url() or to 
>> require quotes.
>> Thanks,
>
> CSS3 modules are not required to conform to the CSS2.1 Appendix G grammar,
> only to the core grammar in Chapter 4. Therefore this is not an issue. A
> CSS2.1 parser will parse the functional notation as invalid, which is
> expected.

So it means that a CSS3 parser should be different than a CSS21 one. And 
the second point... Where is the consolidated grammar for CSS3 ? (as last 
time I asked about the status of the CSS3 Grammar spec, the answer was 
"abandonned:).
Thanks,

-- 
Baroula que barouleras, au tiéu toujou t'entourneras.

         ~~Yves

Received on Thursday, 16 July 2009 17:45:15 UTC