Below is the code :

Function :

 declare function xyz:testNodesInAnySeq($seq1 as node()*, $seq2 as node()*)
as xs:boolean{
let $count1 := count($seq1)
let $count2 := count($seq2)
return if(($count1 = $count2) and (every $x in $seq1 satisfies some $y in$seq2
satisfies deep-equal($x, $y)))
        then(xs:boolean("true"))
        else(xs:boolean("false"))


};


XQuery part :

let $list1 := //list 1
let $list2 := // list 2

return xyz:testNodesInAnySeq($list1,$list2)


On Wed, Dec 5, 2012 at 2:19 PM, Michael Kay <[email protected]> wrote:

>
> On 05/12/2012 04:59, Kunal Chauhan wrote:
>
>> 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 ?
>>
>>  Because you are doing something wrong.
>
> If you want help in discovering what you are doing wrong, you will need to
> tell us more precisely what you are doing.
>
>
> Michael Kay
> Saxonica
> ______________________________**_________________
> [email protected]
> http://x-query.com/mailman/**listinfo/talk<http://x-query.com/mailman/listinfo/talk>
>



-- 
*Kunal Chauhan*
[email protected]
[+918655517141]
[+919904983614]
_______________________________________________
[email protected]
http://x-query.com/mailman/listinfo/talk

Reply via email to