Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Adding Values

Status
Not open for further replies.

GavinP1983

Programmer
Aug 31, 2005
6
GB
I've got a table:

Code:
<td><xsl:value-of select="Sender"/></td>
			<td><xsl:value-of select="Customer"/></td>
			<td><xsl:value-of select="Address"/></td>
			<td><xsl:value-of select="Gift"/></td>
			<td>£<xsl:value-of select="Value"/></td>
			<td></td>

Value is a range of values - it could be any number of values but I'd like to add them together. I've tried sum but I can't get my head round this. Could someone help?

I tried:

Code:
<xsl:value-of select="NewDataSet/Table/sum(Value)"/>
but luck
 
Do I need to keep some sort of running total with a variable?
 
What do you mean value is a range of values? Post an example XML and desired output.

Jon

"I don't regret this, but I both rue and lament it.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top