W3C home > Mailing lists > Public > www-svg@w3.org > January 2013

Re: grammars and parsing for regular and presentation attributes

From: Robert Longson <longsonr@gmail.com>
Date: Tue, 22 Jan 2013 10:13:22 +0000
Message-ID: <CAOu7Uv41jOnO05xd-fK9q+6Q-m1GCupAS0_t512JiWgr83Bz=g@mail.gmail.com>
To: www-svg@w3.org
> I couldn't see an issue in the tracker about allowing all CSS syntax in
> presentation attributes, e.g. fill="/**/red", although I'm sure we've
> brought it up before.  IE and Chrome both support this, while Opera and
> Firefox do not.  (Chrome also supports fill="re\64", while IE does not.)
>   I think it's a natural progression to parse these attributes entirely
> with the CSS parser.  What are people's current thoughts on this?

I think that's a bad idea. Let's consider a SMIL animation:

values="rgb(100, 100, 100);rgb(200, 200, 200);rgb(100, 100, 100)"

Are you proposing we could write this and have it parse just the same?

values="rgb(100, 100, /*;*/100);rgb(200, /*;*/200, 200);rgb(100, /*;*/100, 100)"

That's rather more difficult for a SMIL parser to parse don't you think?

Currently Gecko tokenises the individual elements by looking for ;
characters and hands each token to the CSS parser.

If you're proposing to exclude SMIL values from having comments then
that makes things more inconsistent.

The other things you propose seem fine though.

Best regards

Received on Tuesday, 22 January 2013 10:13:49 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 22:54:40 UTC