我需要添加多个值,具体取决于每个项目的内容。例如。
<links>
<test element="32"/>
<test element="17"/>
<test element="13"/>
<test element="11"/>
<test element="9"/>
<test element="8"/>
<test element="7"/>
<test element="7"/>
</links>
元素总数:8,每个元素的值之和:104,a显示的值为this(104)。
<xsl:template match="//x:span[@class='ws-filter-count']">
<xsl:variable name="countProduct" select="normalize-space(translate(text(), '()', ''))" />
<xsl:variable name="sum" select="number(0)"/>
<test element="{$countProduct}" />
</xsl:template>
这个总和:
这只能通过调用模板来完成吗?,递归的,对吗?谢谢。