Re: [Inkscape-devel] path effect grammar
attributes are a folly for data, they confuise too much. I'm glad my xml in programming never has them outside ids.
On Thu, 27 Apr 2006 11:05:42 -0400 , MenTaLguY <mental@...3...> wrote:
On Wed, 2006-04-26 at 22:40 -0300, bulia byak wrote:
SVG paths use attribute grammar and work just fine.
Why? Because they are flat.
XML is good for hierarchical structures. I do not foresee any hierarchy in a chain of sequentially applied effects, each with its own parameters.
That was just one example; XML nodes have other desirable properties like being addressable via URIs (I'm thinking mostly local references at the moment, like #id).
I need to check, but if I remember correctly some of the original SVG filter and vector effect proposals used flat attributes as you propose, but obviously they decided not to do that. Our path effects have similar design considerations, so I'd rather not repeat old mistakes.
Among other things, non-sequential composition of filters/effects of seem to be frequently desired for these sorts of things once they come into widespread use (e.g. many interesting uses of SVG filters involve trees rather than linear chains). I'd rather not close that door early by making the filter stuff non-addressable in the document.
So, I remain opposed to the approach involving non-SVG child elements.
I'm not fond of adding children to svg:path either, actually.
I'd almost like to see something like:
svg:svg ...
<defs> ... <inkscape:path-effect xlink:href="x-inkscape-plugin:org.inkscape.effect.foo" id="path-effect2"> <inkscape:param name="blah" value="foo" /> </inkscape:path-effect> ... </defs> ... <svg:path ... inkscape:path-effects="#path-effect2 ..." /> ... </svg:svg>
This is just a rough idea, though. I'm going to have a look at how SVG vector effects are done; the architecture is very similar in some respects; I think we basically want to mirror that approach.
IMO it's a case of overengineering, and given the general fragility of our XML tree, it's much more trouble than it's worth.
Fragility? Howso?
-mental
participants (1)
-
Martin Owens