In XSLT 2.0 I would like to get the unique nodes with 2 parameters..
For example I have:
<items>
<item x="1" y="1" z="a"/>
<item x="1" y="2" z="b"/>
<item x="2" y="1" z="c"/>
<item x="1" y="2" z="d"/>
<item x="2" y="2" z="e"/>
</items>
I would like the result to be:
<items>
<item x="1" y="1"/>
<item x="1" y="2"/>
<item x="2" y="1"/>
<item x="2" y="2"/>
</items>
Is there an easier way to get this?
My current code is really redundant.
Edit: The context is the first item of the group, so no need for
current-group()[1]. Thanks Michael Kay.