Hi,
Im a little out of my depth using xsl fo here. I have a table of items and each has a price in the second row of the table. I need to display a total at the bottom of the row. My problem is that I can't work out how to perform addition in xsl fo.
Here's my xsl file where I have created the table.
- <!-- Nextpage: Quote -->
-
<fo:block break-before="page" space-before="2in" space-after="2in">
-
-
<fo:block text-align="center" space-before="2cm">
-
Panels
-
</fo:block>
-
<fo:table space-before="1cm">
-
<fo:table-body>
-
<xsl:for-each select="quote/panels/panel">
-
<fo:table-row>
-
<fo:table-cell padding="6pt">
-
<fo:block text-align="start"><xsl:value-of select="panel_name"/></fo:block>
-
</fo:table-cell>
-
<fo:table-cell padding="6pt">
-
<fo:block text-align="end" space-after="2cm">£<xsl:value-of select="totalcost"/></fo:block>
-
</fo:table-cell>
-
</fo:table-row>
-
</xsl:for-each>
-
<fo:table-row>
-
<fo:table-cell>
-
<fo:block text-align="start" font-weight="bold" border-top="0.5pt solid red">Sub Total</fo:block>
-
</fo:table-cell>
-
<fo:table-cell>
-
<fo:block font-weight="bold" text-align="end" border-top="0.5pt solid red"></fo:block>
-
</fo:table-cell>
-
</fo:table-row>
-
</fo:table-body>
-
</fo:table>
I need to add all the <xsl:value-of select="totalcost"/> values to get the total
Thanks in advance