changing sodipodi:absref reverses image attributes

Bug #1655613 reported by chrysn
This bug report is a duplicate of:  Bug #1045464: Sort attributes when exporting SVG. Edit Remove
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Inkscape
Confirmed
Undecided
Unassigned

Bug Description

in inkscape 0.91, the sequence of attributes in the image element is roughly reversed whenever the sodipodi:absref is recomputed.

this causes trouble when collaborating over version control systems because every time someone else is editing the file, all sodipodi:absref change, and the sequence of all attributes of the affected image element with it, even though the image was not touched in that editing step at all. reviewing changes thus becomes harder, and merging becomes *much* harder. (it's one thing for the person finishing a merge to remove all 'sodipodi:absref="/home/alice/..." conflcits with sodipodi:absref="/home/bob/..."' style changes, but if the whole image's attributes list is mangled, it becomes impossible to tell at a glance whether something changed there or not).

please consider changing the sodipodi:absref populating code to maintain the sequence of attributes, or alternatively to always store attributes in a deterministic sequence.

Tags: svg
Revision history for this message
Alvin Penner (apenner) wrote :

confirmed on Windows 10, Inkscape 0.92.0 r15299
- first load an image file by linking, not embedding
- save it as the file 'linkBeethoven.svg', attached here

Revision history for this message
Alvin Penner (apenner) wrote :

- then edit in the XML editor to load the file Chopin.gif
- save it as the file 'linkChopin.svg' attached here.
- note the different sequence of parameters for the image

Changed in inkscape:
status: New → Confirmed
Revision history for this message
su_v (suv-lp) wrote :

The order of attributes does not matter for XML and XML-based file formats like SVG (not a requirement per specs).

The request for Inkscape to optionally sort the order of attributes of SVG elements in SVG files written by Inkscape is tracked in
* Bug #1045464 “Sort attributes when exporting SVG”
  https://bugs.launchpad.net/inkscape/+bug/1045464

Proposing to link as duplicate to bug #1045464.

tags: added: svg
Revision history for this message
chrysn (chrysn) wrote :

i'm ok with marking this a duplicate of bug #1045464. i did not file it as one because there could be reasons not to sort the attributes (eg. keep height and width together) that don't apply to this particular situation, but if there is the general intention to do sorting, that would be sufficient to fix this issue too.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.