|
[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: RE : Comparison of Xml documents
Bob Wyman wrote: > Bob Foster wrote: > >>The naive approach to determining equivalence between two documents >>would be to define a recursive procedure that normalizes and >>collects element contents into sequences or sets, as appropriate, >>then compares the result for equality. > > I think what you really want to do here is convert the XML to > "canonical form." I really don't. Canonical form is another textual representation, extra overhead and an unwanted level of indirection (the comparison should report the result of the comparison in terms of the original text). But rather than respond to the rest of your note point by point, let me say I was disappointed that, since you know much more about ASN.1 than I do, you didn't respond to my main point. I didn't forget ASN.1 as a schema language, I know about SET and SEQUENCE from your earlier posts, but I don't know what they mean, in the following sense. Ordering is both a lexical and a semantic constraint. For the purposes of comparison, there are three possibilities: order may be lexically required; order may be lexically insignificant but semantically significant (like the dots and dashes in Morse code); or order may be both lexically and semantically insignificant (like the items in a shopping list). Only in the latter case would I want a comparison to report that two sequences that differed from each other only in order were, in fact, the same. In ASN.1, does SET mean that order is both lexically and semantically insignificant (as it does in mathematics)? Or, is ASN.1 SET the same in this respect as '&' and 'all' in the other schema languages? Does it simply mean that order is lexically insigificant with no comment on semantics, because the latter aren't required for validation? Finally, if SET does mean that order is lexically and semantically insignificant, how does one specify in ASN.1 that order is lexically insignificant but semantically significant? Bob Foster
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|
|||||||||

Cart








