
Hi,
Not sure if I should be bothering this list with this, but it may also be functionality currently missing from Inkscape (?)
I'm using Inkscape to create interactive SVG drawings that allow the viewer colour in the picture, painting by numbers style (I've attached a simple test svg as an example).
The (minor) problems encountered so far are:
1 - Inkscape uses the style attribute on each element to set the fill colour, and I have to manually go through each element changing them for my script code to work. Manipulating the style attribute in code would require parsing to preservation all the other style definitions.
Is there any way to force inkscape to save style attributes of drawing elements as separate elements (as I have altered in the attached example)?
2 - should Inkscape treat script element as CDATA, as it currently treats it as a text node and replaces " with " etc.

On 2/23/07, singlecell <singlecell@...1285...> wrote:
1 - Inkscape uses the style attribute on each element to set the fill colour, and I have to manually go through each element changing them for my script code to work. Manipulating the style attribute in code would require parsing to preservation all the other style definitions.
Is there any way to force inkscape to save style attributes of drawing elements as separate elements (as I have altered in the attached example)?
I have a simple XSLT stylesheet which breaks monolithic style= into style attributes. Worked fine for me. So here's a question for developers: I heard we can use XSLT as input/output filters? If so, adding an output format that filters SVG through such a filter would be trivial.
2 - should Inkscape treat script element as CDATA, as it currently treats it as a text node and replaces " with " etc.
And it also loses script attributes (at least from root svg) when saving as Plain SVG. Could you please file bugs on these problems so they are not forgotten?
participants (2)
-
bulia byak
-
singlecell