We're using XXE quite a bit and are generally very pleased with it, 
especially for DocBook documents.

We are also using it for our own DTDs, some of which use many more 
attributes than sub-elements (typical for "data" XML as opposed to 
"document" XML).

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.

Thanks for your consideration of this feature request.

@alex
-- 
mailto:dupuy at sysd.com


Reply via email to