W3C home > Mailing lists > Public > www-style@w3.org > February 2010

Re: [css-style-attr] SVG WG comments on CSS Styling Attributes Level 1

From: Peter Linss <peter.linss@hp.com>
Date: Mon, 22 Feb 2010 22:30:48 -0800
Cc: Chris Lilley <chris@w3.org>, "www-style@w3.org" <www-style@w3.org>, Bert Bos <bert@w3.org>
Message-Id: <3034B26B-C37D-4743-BB1E-9426E04D122B@hp.com>
To: fantasai <fantasai.lists@inkedblade.net>

On Feb 22, 2010, at 6:29 PM, fantasai wrote:

> On 02/09/2010 03:26 PM, Chris Lilley wrote:
>> Hello www-style,
>> 
>> These comments relate to CSS Styling Attributes Level 1, W3C Working
>> Draft 21 January 2010 from the perspective of SVG.
>> 
> 
>> 3) In section 3. Syntax and Parsing, the actual grammar for a style
>> attribute, following CSS2.1 chapter 4, appears to be
>> 
>> declaration-list
>>   : C* S* C* declaration? C* [ ';' C* S* C* declaration? C*]* C*
>>   ;
>> 
>> where C is the comment production. Is that correct? (Specifically, are
>> leading and trailing comments allowed, as well as ones between tokens?)
> 
> I'll leave this question to Bert, who's our resident grammar expert.

Per CSS 2.1 ( http://www.w3.org/TR/CSS21/syndata.html#comments ) comments can appear "anywhere between tokens". We don't put the comment tokens anywhere in grammar specifications to keep things simple (they do appear in the tokenizer spec however where they're allowed inside other tokens). Having comments as the first and last tokens should also be allowed, although on re-reading the spec, that isn't really covered by "between tokens"... I don't think that distinction was made intentionally.

So yes, your grammar is correct.
Received on Tuesday, 23 February 2010 06:31:31 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:20:24 GMT