Hello buzz,
it is ok to also ask more general XQuery questions on this list.
For testing I executed the following query:
for $r in ("123", "234", "345") let $hash := xs:hexBinary(hash:md5(fn:string($r))) return $hash
which yields different results for each value of $r. Are you absolutely sure you have different values for $r (you can check using trace())? Also, given they query I would be very suprised if indeed it shows the same result.
Cheers, Dirk
On 01/11/13 08:24, buzz chopra wrote:
This may be a question better suited for an xquery forum but I'll start here since I'm using basex:
Can someone suggest why I'd be getting the same result for the hash call even though the content of $r should be changing?
let $reps := fn:collection($coll)/Rep for $r at $lcv in $reps let $hash := xs:hexBinary(hash:md5(fn:string($r))) return <hash i="{$lcv}">{$hash}</hash> };
Please let me know if I should post this elsewhere (and please include where).
Thanks in advance for any suggestions.
Buzz
BaseX-Talk mailing list BaseX-Talk@mailman.uni-konstanz.de https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk