W3C home > Mailing lists > Public > www-svg@w3.org > December 2012

Re: Proposal: Nesting SVG Graphics Elements

From: Steve Schafer <steve@fenestra.com>
Date: Sun, 02 Dec 2012 13:20:53 -0500
To: Doug Schepers <schepers@w3.org>
Cc: SVG public list <www-svg@w3.org>
Message-ID: <9m6nb8pih7rtrnqo7rcj19s7t54quc11uk@4ax.com>
On Fri, 30 Nov 2012 23:47:58 -0500, you wrote:

>To a certain extent, it doesn't matter that HTML+CSS is flawed (as if 
>there were a perfect programming language or markup out there)... what 
>matters is that it's a model that millions of people are familiar with, 
>so if we can introduce concepts that are similar enough that it makes it 
>easier for people to understand without introducing new problems, that's 
>a good thing.

See, it's that "similar enough" part that worries me. There are some
profound differences between the SVG and HTML+CSS layout models, and by
making dissimilar things appear similar and thus "friendlier," you end
up creating expectations that can't be fulfilled.

I do agree that a simpler means of expressing relative positioning would
be a Good Thing. But I don't think "artificial" nesting is really the
best way to go. I would greatly prefer something that explicitly
expresses the notion of relative positioning, perhaps something like
this (entirely off the top of my head and most likely fatally flawed):

 <rect id="r3" x="100" y="10" width="40" height="40"/>
 <circle id="c3" position="relative" position-refid="r3" cx="70" cy="20"
   r="20"/>

A substantial part of the problem (that can't practically be overcome)
is the intrinsic awkwardness and verbosity of XML. Any higher-order
concept that relies on XML syntax is going to be a bit of a mess, but I
_really_ wouldn't want to introduce Yet Another Syntax and Parser.

Syntatic sugar that simplifies expression of certain common forms of <g>
+ transform would be great. Overloading existing widely-held semantic
concepts would be not so great.

-Steve Schafer
Received on Sunday, 2 December 2012 18:21:10 GMT

This archive was generated by hypermail 2.3.1 : Friday, 8 March 2013 15:54:53 GMT