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) : )

(a) that's O(n^2)

(b) it will return true if the first list is empty and the second contains anything at all (or nothing). At the very least you need to check the lengths are equal; but even then, there's a potential problem with duplicates.

Michael Kay
Saxonica

_______________________________________________
[email protected]
http://x-query.com/mailman/listinfo/talk

Reply via email to