Alexander Dupuy wrote: > > Especially for these private DTDs, the fact that XXE places the > attributes of an element in an arbitrary order is a bit of a bother, > since it creates spurious differences in the CVS version tracking > repository (order of attributes is meaningless for XML, so the semantic > content of the files is unaffected, but the changes show up as > differences for CVS or even wdiff, a word-based, rather than line-based, > diff program). > > It would really be nice if the next XXE release would use one of the > following arbitrary orders for attributes: > > 1. "Preserved" order; i.e. same as the input file, unless attributes are > added or deleted. > > 2. "DTD" order; i.e. order of the attributes as specified in <!ATTRLIST> > in DTD. > > 3. Alphabetic order. > > 4. "Consistent" order (arbitrary, but identical for any element with the > same set of attributes - independent of their values). > > Our preference would be for 1, then 2, 3, or 4. I realize that the XML > parser may make it difficult to implement 1, but 3 would seem to be > possible in any case (although it might impose a performance penalty and > perhaps should be a user configuration option. Even 4 would be better > for us than the current situation, where a single file tends to be > consistent, but if data is cut/pasted between files, spurious diffs occur.
OK. We'll implement (3) in next release. In fact, the non-deterministic attribute order in the XML files saved by XXE also annoys us for our non-regression testing. This will *not* be a user configuration option. The performance penalty for "document" XML will be null and for "data" XML, it should be very small.

