for-each循环的嵌套有关问题,怎么罗列当前节点的兄弟节点

for-each循环的嵌套问题,如何罗列当前节点的兄弟节点
<root>
 <sets type="A">
  <item>1</item>
  <item>2</item>
  <item>3</item>
 </sets>

 <sets type="B">
  <item>7</item>
  <item>8</item>
  <item>9</item>
 </sets>
</root>

XSL这样写的:
  <xsl:for-each select="//item">
  <xsl:for-each select="这里不知道填什么,才能对应到当前节点的父节点"> //这里是返回到当前item节点的父节点,把其子节点item再遍历一次
  //罗列当前item节点的兄弟节点
  //换言之,我也许要根据当前节点追溯到其父节点,然后再自上而下罗列
  </xsl:for-each>
  //Do something...
  </xsl:for-each>

------解决方案--------------------
不知道你为何要双重,下面代码参考一下
XML code

<xsl:template match="root">
    <xsl:for-each select="//item">
        <item name="{.}" position="{position()}" fscount="{count(following-sibling::item)}" icount="{count(parent::sets/item)}"/>
    </xsl:for-each>
</xsl:template>