Open GoogleCodeExporter opened 9 years ago
Attributes in an XML document are, by definition, unordered.
If you want to determine whether an XML document has changed, doing a bit-wise
comparison, of the "old" and "new" documents, is probably not the way you want
to do it.
Instead, compare the XOM trees produced by parsing the two documents. There are
*lots* of utilities for doing that, in every language under the sun. Here, for
instance, is one in Ruby:
http://kallokain.blogspot.com/2006/01/testunitxml-quick-start-tutorial.html
Original comment by jacques....@gmail.com
on 14 Apr 2011 at 4:24
I have noticed this too, in Chrome 19.0.1084.56 m, using SVG-edit v2.6-alpha
(latest trunk).
I understand that the attribute order itself doesn't matter, but consistency
does, for the user's sake. The attribute order in the <path> tags alternates
between id, d, fill and fill, d, id every time I edit, save, and reopen the
source code. This is annoying and distracting and makes it difficult to see
which path is which at a glance.
Original comment by iano.not...@gmail.com
on 13 Jun 2012 at 8:58
It is actually a complete swap-ends of the whole attribute list.
Original comment by StephenF...@gmail.com
on 20 Apr 2013 at 9:50
In my workflow I need to manually check SVG content and attribute reversal is
really annoying. Is there a quick way to implement alphabet sorting for
attribute order?
Original comment by josipmis...@gmail.com
on 8 Sep 2013 at 8:55
This should be a very easy fix. Either read the attributes in the opposite
order, or write them out in the opposite order. I'd suggest fixing it in the
output, since that needs other work, such as not outputting so many
useless="null" attributes.
Actually, I looked into this with the debugger and it really does just output
the attributes backwards.
in svgcanvas.js:~4165, the code
i = attrs.length;
...
while (i--) {...}
should be
...
for (var i = 0, l = attrs.length; i < l; i++) {...}
Original comment by isaiahod...@gmail.com
on 2 Apr 2014 at 6:33
Original issue reported on code.google.com by
VSa...@gmail.com
on 5 Apr 2011 at 8:38