<xsl:variable name="z">0</xsl:variable>
<xsl:variable name="x">0</xsl:variable>
<xsl:for-each select="wd:Report_Entry">
<xsl:choose>
<xsl:when test="count(wd:Supplier_Invoice_Line_group)>1">
<xsl:for-each select="wd:Supplier_Invoice_Line_group">
<xsl:value-of select="$z =$z 1 "/>
</xsl:for-each>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="$x =$x 1 "/>
</xsl:otherwise>
</xsl:choose>
</xsl:for-each>
<xsl:value-of select="$x $z"/>
對于上述情況,我沒有得到任何結果。我正在嘗試為 2 個不同的回圈宣告 2 個變數。然后添加這些記錄以獲得總計數。感謝是否有人可以指導我。
uj5u.com熱心網友回復:
看來你在哪里<xsl:value-of select="$x $z"/>可以使用<xsl:value-of select="sum((wd:Report_Entry/count(wd:Supplier_Invoice_Line_group), count(wd:Report_Entry[not(wd:Supplier_Invoice_Line_group)])))"/>. 假設 XSLT 2 或更高版本。
轉載請註明出處,本文鏈接:https://www.uj5u.com/qukuanlian/442392.html
上一篇:特定父標簽下的XML決議
