<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
未转换为数字
答案 0 :(得分:2)
尝试用{}括号括起来,即<td align="center" valign="top" class="classCell" rowspan="{$calculateHours}">
。