Re: Proposal: Nesting SVG Graphics Elements

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 UTC