p.xml
<documents>
<dblp>
<inproceedings>
<author>John Cieslewicz</author>
<author>Kenneth A. Ross</author>
<author>Kenneth A. Ross</author>
</inproceedings>
</dblp>
<dblp>
<inproceedings>
<author>Yi-Reun Kim</author>
<author>Kyu-Young Whang</author>
<author>John Cieslewicz</author>
</inproceedings>
</dblp>
<documents>
my code is
for $c in doc("C:\Users\User\Desktop\p.xml")//documents/dblp/inproceedings
where fn:count($c/author) != fn:count(fn:distinct-values($c/author))
return $c/author
I need John Cieslewicz and Kenneth A. Ross in result but its shows only Kenneth A. Ross
If you want to list authors who appear multiple times, you need to count them globally in the list of all authors, not locally in the list of authors of a proceeding: