下面是 对xml中数据检索的 xslt文件  test 是检索条件,现在问题是 第一列我象显示序号,1,2,3,4,5  是连续的,但是象现在我这么写,如何xml中满足条件的是 2,7,那么第一列显示的就是 2,7 ,而我想显示 1,2.怎么修改???????? 
也就是修改 <xsl:value-of select="position()" />这一行,能否在if  判断里面加个循环变量 i++?
<?xml version='1.0' ?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:template match="/">
<table width="795px" class="datatable"  id="docListTable" height="23" border="0" cellpadding="0" cellspacing="1" bordercolor="#333333" bgcolor="#000000">
<xsl:for-each select="Bunnsyo-List/Bunnsyo-Item">
<xsl:if test=""><!-- if START -->
<tr>
<xsl:attribute name='onclick'>
<xsl:text>selectRow(</xsl:text>
<xsl:text>'</xsl:text>
<xsl:value-of select="position()-1" />
<xsl:text>'</xsl:text>
<xsl:text>)</xsl:text>
</xsl:attribute>
<td width="38" align="center">
<xsl:value-of select="position()" />
</td>
<td width="90" align="center">
<xsl:value-of select="Id" />
</td>
</tr>
</xsl:if><!-- if END -->
</xsl:for-each>
</table>
</xsl:template>
</xsl:stylesheet>