On Dec 26, 2010, at 4:20 PM, Hannes Hochreiner wrote:
*) You could integrate your design into an XSLT stylesheet and combine it with your data through a transformation. However, this way seems quite cumbersome in your case and it would make it hard to edit the design.
*) You could use an external script to fill in the data. To set the font, size, colour and other text-properties you could put some place-holder text in your design. Assigning special XML-attributes to the text (using the Inscape XML-editor) worked really well for me to identify which portions needed to be replaced. This solution is really very similar to option number one, but using an external script might be more convenient, if you want to automate the whole process (e.g. calling Inkscape afterwards in command-line mode to transform the SVG to PDF).
Actually I've found a combination of both of those to be a good approach.
Instead of using XSLT that is SVG or creates SVG, you can use XSLT's "document()" function to pull in an SVG file from outside of an XSLT stylesheet.
The XML file being processed can be a file of the data you want to merge, and you can use full XPath to transform the SVG in an XML-aware fashion.