1
<xsl:variable name="calculateHours" select="number(concat(substring-before(ToTime, ':'), '')) - number(concat(substring-before(FromTime, ':'), ''))"/>
    <xsl:if test="concat(substring-before(FromTime, ':'), ':00') = $Hour">
        <td align="center" valign="top" class="classCell" rowspan="$calculateHours">
            sad
        </td>
    </xsl:if>

但是我现在如何$calculateHours使用

<td align="center" valign="top" class="classCell" rowspan="$calculateHours">

$calculateHours不转换为数字

4

1 回答 1

2

尝试用 { } 括号括起来,即<td align="center" valign="top" class="classCell" rowspan="{$calculateHours}">.

于 2013-08-21T08:11:57.283 回答