Hi Andy, http://issues.apache.org/jira/browse/TUSCANY-1263 has a comment in it from Lionel Villard ...
"FYI, it exists an open source tool for comparing XML files: http://xmlunit.sourceforge.net/ , I haven't tried it" I had been hoping to take a look at this, from both the technical and the license aspects, but I haven't had the time yet. This may be a better way to fix all these issues. If no-one has the bandwidth to look at this, perhaps there's scope for tactical fixes such as that in your patch that would be superceded by the xmlunit dependency or the like. Regards, Kelvin. On 18/06/07, Andy Grove <[EMAIL PROTECTED]> wrote:
XMLHelperTest.testDefineTypes() fails if an implementation does not specifically use the "customer" namespace prefix when serializing a document, even though it is equally valid for example to use the prefix "foo" or "ns0" to refer to the namespace. I have submitted a patch for TUSCANY-1351 that updates XMLEqualityChecker so that it does not compare namespace prefixes on elements (but rather compares the namespace URI and the local name). Also, XMLEqualityChecker will no longer compare the value of attributes that use the "xmlns" or "xsi" prefixes. This is necessary because attributes such as xmlns:ns0="http://example.com/customer" and xsi:type="ns0:Customer" were deemd to be incorrect because they reference the namespace prefix that differs from the one used in the gold xml file. This seems like a rather inelegant hack but I'm not sure how else to remove the tuscany-specific prefix assumptions without re-writing the test or re-implementing XMLEqualityChecker to have more intelligence when comparing documents. Does anyone have any better suggestions for resolving this issue or should I go ahead and apply this patch? Thanks, Andy.
