Hi Emzic,
emzic <[EMAIL PROTECTED]> wrote on 07/31/2008 05:26:05 AM:
> some svgs that i manipulate with batik have their attribute
> xml:space="preserve" changed to a0:space="preserve" which leads to them
not
> being valid svgs anymore.
>
> does anyone know why this happens and how it can be avoided?
My guess would be as a result of serializing an SVG that
had it's xml:space attribute set like this:
e.setAttributeNS(XML_NS, "space", "preserve");
The serializer is probably creating the namespace
prefix 'a0' since you didn't provide one. If I'm right you
should set the xml:space attribute with:
e.setAttributeNS(XML_NS, "xml:space", "preserve");
This is of course a wild guess but I can't think where
Batik would add 'a0'. BTW the Batik Serializer won't do
this (but it will also break the content ;).