Josh Campbell wrote:
I've got a column of numbers being pulled out of XML that I want to total at the bottom of the page using the XSL.
I don't know how many rows of figures will be generated so need something that can just take all the values in a column and add them up
Check out the sum() function:
If your XML is something like this
use it like
  <xsl:template match="records">
    <xsl:text>Total: </xsl:text>
    <xsl:value-of select="sum(record/price)"/>
If your problem is more complicated, ask on the XSL list
(, because you
have an XSLT problem rather than a FOP problem. Provide
some more details: a relevant snippet of your XML, and how
to derive the "total" you are after. If your computation
involves something like price*quantity per record, look
into the list archives first.


Reply via email to