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!

XXLT - Calculation Sum

Status
Not open for further replies.

lsoares99

Programmer
Mar 10, 2006
1
LU
Hi,
I have this type of xml file and I try to have a subtotal by row.

<StaffNationalOfficial>
<Row>
<Calcul>
<Position>catego1</Position>
<TotalNumberOfDays>21.00000000</TotalNumberOfDays>
<AmountPerDay>230.00000000</AmountPerDay>
</Calcul>
<Calcul>
<Position>cart2</Position>
<TotalNumberOfDays>22.00000000</TotalNumberOfDays>
<AmountPerDay>240.00000000</AmountPerDay>
</Calcul>
<PartnerOrganisation>part1</PartnerOrganisation>
</Row>
<Row>
<Calcul>
<Position>cater33</Position>
<TotalNumberOfDays>540.00000000</TotalNumberOfDays>
<AmountPerDay>0.00000000</AmountPerDay>
</Calcul>
<PartnerOrganisation>pat2</PartnerOrganisation>
</Row>
Could someone help-me ? Please -:))

Luisa
 
For row one, total of AmountPerDay:
Code:
<xsl:value-of select="sum(StaffNationalOfficial/Row[1]/Calcul/AmountPerDay)"/>

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