xsl-list
[Top] [All Lists]

index of an element among its type

2005-02-10 06:15:04
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

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--



<Prev in Thread] Current Thread [Next in Thread>