johndoe31415/pyradium

Make SVG images templatable

Closed this issue · 0 comments

We want to have SVG images which have certain text pieces which should be changed before rendering. For example, there could be a text ${foo} inside the SVG document and the rendering command could look like

<s:img src="foo.svg">
    <s:imgvar name="foo" value="bar" />
</s:img>

This would parse the SVG, change all occurrences of ${foo} to "bar" and then render the SVG. It would allow for multiple inclusion of the same SVG file with slightly changed content (e.g., different input to cryptographic building blocks and such where only a hex value changes).