+ -
当前位置:首页 → 问答吧 → XSL中怎么使用变量?

XSL中怎么使用变量?

时间:2003-05-27

来源:互联网

定义iCount

<label for="iCount">          //怎么使用?
<td align="center" height="22">
      <xsl:element name="input">
        <xsl:attribute name="type">radio</xsl:attribute>
        <xsl:attribute name="id>这里为iCount</xsl:attribute>    //??
        <xsl:attribute name="name">rRunLogID</xsl:attribute>
        <xsl:attribute name="value"><xsl:value-of select="id"/></xsl:attribute>
        <xsl:attribute name="onclick">check()</xsl:attribute>
      </xsl:element>
</td>
<td align="center"><xsl:value-of select="time"/></td>
</label>

iCount++           //怎么加1?

作者: debug   发布时间: 2003-05-27

<XSl:variable ...>
<xsl:para ...>

作者: imafool   发布时间: 2003-05-28

iCount++ 地实现
<xsl:variable name="temp" select="$iCount" />
<xsl:variable name="iCount" select="number($temp)+1" />

同一个变量在同一此模板匹配中禁止定义两次

作者: snakevil   发布时间: 2003-06-03

o 明白
谢谢!

作者: debug   发布时间: 2003-06-04