On Wed, 08 May 2013 15:42:24 +0200 Yannik Völker <yannikv@...266...> wrote:
The first one can't be changed by Inkscape: when you add objects to the same layer in both branches you need to tell the diff tool to insert them after each others so no big deal
I don't understand the preceding, but since you seem to have a handle on it, let's move on.
The second one is that Inkscape saves the zoom and view position; while its a bit annoying and i don’t relay see the advantage of saving those its easy to resolve. The third one is the reason for this mail: the svg format was designed not to waste too much bandwidth for path definitions (http://www.w3.org/TR/SVG/paths.html#PathDataGeneralInformation) so it was allowed to put skip some whitespaces, have relative and absolute formats and so on. While its not necessary to use it Inkscape actually uses some of those optimizations for size. That is where it gets problematic: No line based diff algorithm will ever be able to understand
d="M 94.560583,882.94114 202.33942,447.30755 149.72092,186.54185 C 322.59461,172.3981 497.26518,91.769646 666.84911,199.34693 l 44.50099,59.86379 6.19919,124.61 -138.89214,182.52301
- -292.02038,376.68278 z"
it would be way better if Inkscape would save all the commands in their own line with the correct command in front so you can put other lines in between without breaking everything
If I were going to diff two Inscape files, I think what I would do is get my hands on an XML parser for my computer language of choice, and write myself a generic XML writer to write the elements back. For the most part, they'd simply be written, but in the case of a path, my writer would intervene to put every command at the beginning of the line, while removing all other newlines and finding a uniform space treatment. Somebody else mentioned you can turn off relative coordinates in Inkscape.
This is a lot of work, but sometimes, when I just can't do something in Inkscape, I'll try to do it in the XML itself, and it often helps to add or change something in a diagram and then diff it against the pre-change version.
Please let us all know what you come up with.
Thanks,
SteveT
Steve Litt * http://www.troubleshooters.com/ Troubleshooting Training * Human Performance