I am trying to understand the meaning of MUENCHIAN METHOD used in XSLT to group nodes.
But I am not able to understand the significance of some of the statements which are used.
I referred link here which tries to explain the same.
There is this statement:
contact[generate-id() = generate-id(key('contacts-by-surname', surname)[1])]
In this I could understand that generate-id() gives a unique id assigned to the current node which is being traversed. But not able to understand the reason behind accessing the the first element i.e. 1.
Why only first? I do know that key function does create an associative array kind of representation.
Can someone guide me on this?