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

On Wed, Feb 10, 2010 at 12:26:42AM +0100, Chris Lilley wrote:

> 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?

Peter Linss has already replied regarding the principal question of whether
comments should be allowed at the start or end (rather than just "between
tokens" as the spec currently says);
but in case it's relevant, I'd have thought that each "C* S* C*" and
(distinct) "C*" in that should be

  [ C S* ]*   (i.e. in effect  [ C | S ]* )

i.e. that S and C tokens can be freely mixed [except that a literal reading of
the current text is that C can't be the first or last token] rather than only
allowing one S* run in a given [ C | S ]* run.

I base this on the "may occur anywhere between tokens" text in section 4.1.9
that Peter Linss quoted, and the fact that S is a token (per section 4.1.1)
and S* is not, i.e. the C's can go anywhere within that S* sequence rather than
just either side of that sequence.

(Sorry for the rather late reply, I just happen to be looking at style
attribute parsing at the moment.)

pjrm.

Received on Wednesday, 25 August 2010 11:26:11 UTC