Thanks for your prompt reply. I will try and get an extension working and if
successful, do you want me to send it your way as an example?

Thanks again,

Eddie

-----Original Message-----
From: Stefan Bodewig [mailto:[EMAIL PROTECTED] 
Sent: November-11-08 4:57 AM
To: [email protected]
Subject: Re: [Xmlunit-general] using the
RecursiveElementNameAndTextQualifier

On 2008-11-10, Edward Kawas <[EMAIL PROTECTED]> wrote:

> My question is that I am using the RecursiveElementNameAndTextQualifier
and
> I noticed that if I try to compare 2 documents with one change in the
child
> nodes, then this qualifier works. However, I if I swap > 1 nodes, this
> qualifier seems to fail.

I am surprised that it works for one.  Hmm, no, maybe I'm not.  It
works if you swap the last nodes (Q6PFF9 and Q8VHD0), but not if you
swap the two that are further to the front of the document (B1AR77 and
B1AR78), right?

RecursiveElementNameAndTextQualifier says two elements are to be
compared if the element names and nested texts (down many levels)
match.  It doesn't look at any attribute values.

In the case of Q6PFF9 and Q8VHD0 theit textual contents and the values
of an attribute differ, but XMLunit manages to match the correct
elements to each other by just looking at the textual content.  B1AR77
and B1AR78 only differ in their attribute values,
RecursiveElementNameAndTextQualifier will say the elements can be
compared in the order they appear in since they have the same textual
content.

What you'd need is an ElementQualifier implementation that used
element names and attribute values to determine which elements to
compare to each other.  I'm afraid that no ready-made solution exists
for this, you may want to take RecursiveElementNameAndTextQualifier as
a source of inspiration 8-)

> Also, I have a second question. If I use the
> RecursiveElementNameAndTextQualifier, should I file and place it in my
> project, or is that file guaranteed to persist?

Even in my very theoretical and long overdue ideas of an XMLUnit 2.x
rewrite I'd keep the examples around.  They might move to a different
jar but I don't see any reason to remove them from the distribution.

Stefan

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great
prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Xmlunit-general mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/xmlunit-general


-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Xmlunit-general mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/xmlunit-general

Reply via email to