1 2 2 3 4 5 5 6 7
使用distinct-values()很容易将其转换为一组唯一的值.但是,我想提取的是重复值的列表= 2 5.我不能想到一个简单的方法来做到这一点.谁能帮忙?
$vSeq[index-of($vSeq,.)[2]]
其中$vSeq是我们要查找重复项的值序列.
有关这个“工作”的说明,请参阅:
http://dnovatchev.wordpress.com/2008/11/16/xpath-2-0-gems-find-all-duplicate-values-in-a-sequence-part-2/