XSLT summarize value

前端 未结 1 955
佛祖请我去吃肉
佛祖请我去吃肉 2021-01-21 11:27

I need to generate an item that accumulates a total for a given XML input.

The XML input is:



        
1条回答
  •  悲哀的现实
    2021-01-21 12:06

    Use the sum() function to total the @amount values:

    
    

    Note that you'll want to move your Total: label along with the above xsl:value-of outside of your xsl:for-each loop.

    0 讨论(0)
提交回复
热议问题