Heads Up :
The post you are writing will appear in a public forum. Please ensure all content is appropriate for public consumption. Review the employee guidelines for the community here.
I don't think position() function can be used in this way to get the index of an element in a leaf-list. The problem is that the position() function indicates a position of the node in the currently selected node-set, and *not* a position in a list o...