hi,
I would like to submit enhancement for OutputManager. This patch will format the attrib to have new line on the specified
documentWidth and indent the newline according to getTabulationWidth
useful for example to format very long path element d attribute.
There is a problem here. You can't just add newlines to all attributes. For example if you add a newline in the middle of preserveAspectRatio='xMidYMid split' the result is an invalid SVG.
The only solution to this is for the OutputManager to have a list of attributes (namespace qualified) for particular elements (or elements in a particular namespace).
After look at PrettyPrinter and OutputManager more deeply, there is no way to get node/attrib information as in DOM, because the way it works is in SVGTranscoder the DOM document is written into text string then the result string is passed into PrettyPrinter/OutputManager (DOM information is lost here).
If I am not wrong interpreting your suggestion, then PrettyPrinter/OutputManager need to be rewritten in order to preserve the DOM document in order to check namespace,etc. I think something like DOMUtilities.writeNode() with PrettyPrinter formating rule. What is your idea? any suggestion?
Hi Tonny,
Yah, I guess that is what my suggestion would boil down to. Looking at the code I really have to wonder a bit at why it wasn't written that way to start with (it has it's own XML Parser 'lite' built in). One thing is that with a normal XML Parser you lose all information about spaces between the attributes of an element, it may be that they want to preserve this from the source document.
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]