[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

[xsl] sum for a specific attribute


Subject: [xsl] sum for a specific attribute
From: "Charly" <cohana@xxxxxxxxxxxxxxx>
Date: Tue, 16 Apr 2002 15:39:10 -0700

Hello friends,
Is there a way to get the sum of elements with a condition on the attribure
.
In my case, I need to get the sum of the detail/@value where the
detail/@type is 'A'
and the sum of the detail/@value where the detail/@type is 'C' .

<account>
   <detail type="A" value="123.56" />
   <detail type="A" value="456.78" />
   <detail type="A" value="12.3" />
   <detail type="B" value="42.3" />
   <detail type="B" value="96.2" />
   <detail type="C" value="14.5" />
   <detail type="C" value="22.3" />
   <detail type="C" value="17.1" />
   <detail type="C" value="98.6" />
</account>



Please help


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list



Current Thread