I\'m reasonably new to xlst and am confused as to whether there is any way to store a value and change it later, for example incrementing a variable in a loop.
I\'m
You can use the position() function:
position()
Postion: ' '