Order of attributes is inverted on each save
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Inkscape |
Fix Released
|
Low
|
Mental-users |
Bug Description
Inkscape-version 0.41
OS: MS Windows XP Pro, SP2
-------------------
When saving an SVG-file in Inkscape the order in the
file is different every time.
This makes it difficult to look at changelogs on a
SVN-file in a file revision system, since a lot of
lines has moved for no visible reason.
I tried to reproduce the case in two files (attached to
bug).
This is what I did.
1) created a SVG-file and saved it.
2) Closed inkscape and opened the file with double-click.
3) Moved the blue rectangle.
4) Saved the file and closed inkscape
5) Made a copy ("before move")
6) Opened the same file with double-click.
7) moved the blue rectangle i little bit.
8) Saved the file and closed inkscape
9) Made a copy ("after move")
then making a diff between "before move" and "after
move" reveals that lots of rows has been swapped.
----- Example from "before move" ----
sodipodi:
sodipodi:
inkscape:
sodipodi:
id="svg2"
height="297mm"
width="210mm">
---------------
----- The same example from "after move" ----
width="210mm"
height="297mm"
id="svg2"
sodipodi:
inkscape:
sodipodi:
sodipodi:
---------------
// Albin Sunnanbo (albin [at] sunnanbo [dot] com )
In XML, the order of attributes is not significant, so
strictly speaking it's not a bug. But it's still interesting
to find out why this happens, and fix if possible. Maybe
attributes are added by prepend when read but written via a
forward loop, hence the order is inversed.