23 Sep
2005
23 Sep
'05
2:26 a.m.
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.)
TALES is an xml friendly templating language that utilizes attributes and standard document element nodes (like <g /> in our case). Bryce, I'm sure you are familiar with TALES from working with Zope.
Aaron Spike