Re: (Offtopic) Allowing use of CSS syntax in SVG presentation attributes

On Thu, 2012-06-14 at 15:20 +1000, Peter Moulder wrote:
> On Wed, May 23, 2012 at 01:24:04PM +1000, Cameron McCormack wrote:
> > Bjoern Hoehrmann:
> 
> > >And as far as I can tell from a brief look at "current" specifications,
> > >   fill="url(o\000308)"

> > >   background-image: url(o\000308);
> > >
> > >refer to different resources [because \000308 in the latter involves CSS
> > >escape interpretation, whereas the former is a literal string: XML uses &
> > >escapes, and assigns no special meaning to backslashes in attribute strings].

XML does not forbid an application from interpreting \ in attribute
values. There's no a priori reason to treat these two values differently
that I can see, although fill="url(ö);" would presumably only
work in the XML version (for some definition of "work" since the escape
is handled by the XML parser and the value is expanded before the
SVG/CSS parser gets to see it).

Liam

> (Given the context of the o\000308 example, I'm taking "CSS syntax" to mean CSS
> lexing.  I believe that SVG uses already shares the same grammar with CSS and
> XSL for properties like font-family, and that it currently shares lexical
> definitions with XSL rather than CSS.)

Note that XSL allows expressions in values, without the need for calc(),
so the grammar is different.

Best,

Liam

-- 
Liam Quin - XML Activity Lead, W3C, http://www.w3.org/People/Quin/
Pictures from old books: http://fromoldbooks.org/
Ankh: irc.sorcery.net irc.gnome.org freenode/#xml

Received on Thursday, 14 June 2012 05:55:03 UTC