How complex are your SVG customisations? Unless it's going to be a lot of work, I'd drop HTML::Template, and just do DOM manipulation with XML::LibXML.
Edit your SVGs, and add some xml:id attributes to the elements that need altering. Then in Perl, use XML::LibXML and XPath selectors to find those elements and alter them.
| [reply] |
Perhaps you need to take this as an opportunity to create a more general set of SVG templates. I am assuming you have programmatic elements in the template. So your only choice is to exercise the template using HTML::Template and rendering a set of SVG files unencumbered with programming constructs or place holders. Then, edit them as you wish. Save this general set of templates somewhere safe, then make a copy of the set and "templatize" them. I'd recommend not using any constructs other than the TMPL_VARs. This way, in the future, updating the SVG is as simple as editing the source templates and regenerating the templates from there. | [reply] |