I have an XPath expression which provides me a sequence of values like the one below:
1 2 2 3 4 5 5 6 7
It is easy to convert this to a set of unique values "1 2 3 4 5 6 7" using the distinct-values function. However, what I want to extract is the list of duplicate values = "2 5". I can't think of an easy way to do this. Can anyone help?