Returns the index number of the node within the parent.
Syntax
index()
Remarks
Indexes are zero-based, so 0 is the first element. Returns a number.
Examples
Find the first 3 degrees:
degree[index() $lt$ 3]
Note that the index function is with respect to a parent. Consider the following data:
<x>
<y/>
<y/>
</x>
<x>
<y/>
<y/>
</x>
Find the first y from each x:
x/y[index() = 0]