[xsl] counting nodes before a certain node

Subject: [xsl] counting nodes before a certain node
From: a kusa <akusa8@xxxxxxxxx>
Date: Mon, 30 Nov 2009 16:40:00 -0600
Hi

How do I count nodes up to a certain point in XSLT?

Example:

My xml file looks like this:

<books>
<book>
<title>First title</book>
</book>
<notes>The following books talk about history.</notes>
<notes>For further information please log on to </notes>
<notes>Thank you for choosing.. </notes>
<book>
<title>Abraham Lincoln </title>
</book>

<authors>
sample data

</authors>
<notes>Please call... </notes>
<notes>Copyright Information </notes>
<book>

sample data
</book>
</books>

In my XSLT file, I want to count all <notes> just before the second
<book> element but immediately after the first book element or just
after <authors>.

How do I count all the notes elements here?

Current Thread