>>528
ループの中で何番目か調べるのはposition()

<xsl:for-each select="/parent/child">
<xsl:value-of select="position()" />番目のノードです
</xsl:for-each>
ただし最初が0でなく1なので要注意