[xsl] index of an element among its type

Subject: [xsl] index of an element among its type
From: Ahmed El-dawy <aseldawy@xxxxxxxxx>
Date: Thu, 10 Feb 2005 15:15:04 +0200
I want to find the position() of an element in an xml file among its type.
for example
<book>
<title>Introduction to Algorithms</title>
<author>Cormen</author>
<author>Leiserson</author>
...
<author>Rivest</author>
</book>

I want to get (1) for Cormen, (2) for Leiserson and (3) for Rivest.
using the normal position() function will return 2,3 and 5 resepctively.

Thanks in advance


-- 
Regards,
Ahmed Saad

Current Thread