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.

Reply via email to