On Nov 11, 2005, at 11:08 AM, Watson Gary (Mr GA) wrote: While I think it is fine for Xerces to sort attributes alphabetically, for However, attribute order is only one of syntax difference that can get lost when an stream is parsed: Line-feeds are normalized, white-space within tags are dropped, whether matching quotes or apostrophes are used in to enclose attribute values, and others. If you were going to be able to diff an arbitrary XML file after parsing and serialization, you'd need to preserve a lot more than just attribute order or be lucky, for example, that your serializer used the same character to enclose attribute values. If you are interested in the issue: take a look at the Canonical XML recommendation (http://www.w3.org/TR/2001/REC-xml-c14n-20010315) which describes a method for serializing an XML document so that logically equivalent documents result in a consistent stream representation. p.s.: IANAXC (I am not a Xerces committer). |
- FW: Attribute Order - alphabetical ? Watson Gary (Mr GA)
- Re: Attribute Order - alphabetical ? Curt Arnold
- Re: Attribute Order - alphabetical ? Joseph Kesselman
