24 Sep
2005
24 Sep
'05
9:32 p.m.
Subject: Re: [Inkscape-devel] Templated SVG?
Bryce Harrington wrote:
What would be involved in making Inkscape able to handle templated SVG? I.e., something like:
[% i = 1 %] [% FOREACH foo IN bar %] <rect x="[% foo.x %]" y="[% foo.y %]" width="100%" height="100%" fill="[% foo.color %]" id="rect[% i %]" /> [% i = i + 1 %] [% END %]
The stuff in the [% %] brackets is Template::Toolkit macro syntax.
(Similar to <? in PHP, and so forth in other templating languages.)
They aren't just php as you should know from <?xml ?> they are procesing instructions
Does Inkscape round-trip processing instructions and <!-- comments --> yet?
With support for those you could probably embed a wide range of other things.
- Alan