开发者

How to assign the value of Select to other variable in XSLT?

<td>
    <xsl开发者_开发问答:value-of select="sum(//Form[@PRONME = current()/@PRONME]/@TBONUSP)" />
</td>    
<td>
    <xsl:value-of select="sum(//Form[@PRONME = current()/@PRONME]/@NACRES)" />
</td>
<td>
    <xsl:value-of select=" First <TD> Value divided by Second)" />
</td>

I have a problem with printing third TD which is the Division of first two. how do i do? How to get the value?


You could define your values in separate variables and refer them later.


[XSLT 1.0]

    <xsl:variable name="vFirst" select="sum(//Form[@PRONME = current()/@PRONME]/@TBONUSP)"/>
    <xsl:variable name="vSecond" select="sum(//Form[@PRONME = current()/@PRONME]/@NACRES)"/>
    <td>
        <xsl:value-of select="$vFirst"/>
    </td>
    <td>
        <xsl:value-of select="$vSecond"/>
    </td>
    <td>
        <xsl:value-of select="$vFirst div $vSecond"/>
    </td>
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜