Dirk,
Thank you for your quick response.
Upon your suggestion (and prior to that) I checked that the values for $r are different. Indeed they are. But, what I didn't check until your suggestion is that the values of fn:string($r) are different. They in fact are the same - thank you for your suggestion.
Is it possible that there is some sort of type casting related issue going on where I call fn:string($r)?
I get different values for the hash of each attribute value when I select attributes in the collection like:
let $reps := fn:collection($coll)//reps/@att0
for $r at $lcv in $reps
let $hash := xs:hexBinary(hash:md5(fn:string($r)))
return <hash i="{$lcv}">{$hash}</hash>
when I select elements in the collection like:
let $reps := fn:collection($coll)//reps
for $r at $lcv in $reps
let $hash := xs:hexBinary(hash:md5(fn:string($r)))
return <hash i="{$lcv}">{$hash}</hash>
I found that the value of fn:string($r) is blank for all values of $r (which are different) which is why the hash is the same.
I appreciate your help.
Buzz