Hi, I tried the way you suggest, but it works for me in xquery editor. when I integrate it with java it returns true all the time.
don't know why it happens ? - Kunal On Tue, Dec 4, 2012 at 8:56 PM, Andrew Welch <[email protected]>wrote: > On 4 December 2012 15:14, Kunal Chauhan <[email protected]> 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. > > > let $i := (<item id="2">ABC</item>, > <item id="2">DEF</item>, > <item2 id="3">XYZ</item2>) > > let $j := (<item id="2">DEF</item>, > <item2 id="3">XYZ</item2>, > <item id="1">ABC</item>) > > return every $x in $i satisfies some $y in $j satisfies deep-equal($x, $y) > > : ) > > > > -- > Andrew Welch > http://andrewjwelch.com > -- *Kunal Chauhan* [email protected] [+918655517141] [+919904983614]
_______________________________________________ [email protected] http://x-query.com/mailman/listinfo/talk
