我按如下方式调用应用模板:
<xsl:apply-templates>
<xsl:with-param name="pWeight" select="@layoutWeight * $pContentWidth" />
</xsl:apply-templates>
我正在尝试访问layoutWeight
apply-templates 所作用的子元素的属性值。然而,计算总是评估为空,即使子项有一个数字值layoutWeight
并且pContentWidth
也是一个数字值。
如何访问layoutWeight
子元素 apply-templates 的属性?