I would suggest sorting both lists and then comparing the results using
using deep-equal().
The problem then is to define suitable sort keys. If you know there are
no other relevant attributes, sorting on node-name, @id, and string(.)
should work.
Michael Kay
Saxonica
On 04/12/2012 15:14, Kunal Chauhan wrote:
Hi,
I want to compare two list of nodes.
Comparison should be based on QName, attribute and value.
Node's position is sequence doesn't matter.
for example,
List A
<item id=1>ABC</item>
<item id=2>DEF</item>
<item2 id=3>XYZ</item2>
List B
<item id=2>DEF</item>
<item2 id=3>XYZ</item2>
<item id=1>ABC</item>
When I compare both the lists it should show equal.
I tried deep-equal and several other functions which are mentioned on
XQuery functions site. But those all are sequence based.
can anyone suggest me anything ?
Thanks,
--
*Kunal Chauhan*
[email protected] <mailto:[email protected]>
[+918655517141]
[+919904983614]
_______________________________________________
[email protected]
http://x-query.com/mailman/listinfo/talk
_______________________________________________
[email protected]
http://x-query.com/mailman/listinfo/talk