XMLUnit does look like it would provide value.
They have a proprietary license, pasted below. If you think this license
would allow us to use it within the CTS then I'd be happy to spend some time
investigating this further.
Thanks,
Andy.
/*
******************************************************************
Copyright (c) 2001-2007, Jeff Martin, Tim Bacon
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above
copyright notice, this list of conditions and the following
disclaimer in the documentation and/or other materials provided
with the distribution.
* Neither the name of the xmlunit.sourceforge.net nor the names
of its contributors may be used to endorse or promote products
derived from this software without specific prior written
permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
******************************************************************
*/
-----Original Message-----
From: kelvin goodson [mailto:[EMAIL PROTECTED]
Sent: 18 June 2007 11:38
To: [email protected]
Subject: Re: [CTS] Removing namespace prefix assumptions from tests
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.
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]