I've got a simple XML file for testing:
<?xml version="1.0" encoding="UTF-8"?>
<A>
<B >1</B>
<B >2</B>
<B >3</B>
<B >2</B>
<B >4</B>
<B >5</B>
<B >3</B>
</A>
And I'm trying out some XPATH 2.0 functions in the XPATH console in Eclipse (Juno). I can't seem to get the following to run:
distinct-values(/A/B/text())
I think that the result should be the numbers 1-5. Instead, I get
1
2
3
2
4
5
3
Can anyone else confirm this? I tried with Saxon 9.4 as the XSLT 2.0 processor, again in Eclipse. Tried with PsychoPath too.
Do i have a misunderstanding of distinct-values()? I thought in XSLT 2.0 it would take a sequence of atomic data or a set of nodes and spit out the unique items.
Thx.