Michael Kay wrote: > declare function my:index-by-identity($seq as node()*, > $srch as node()) { > for $i at $p in $seq where $i is $srch return $p > } Nice! I always forget about the 'at' clause in XQuery, while I always cry because it is not available in XPath... Regards, -- Florent Georges http://www.fgeorges.org/