Re: [xsl] sum of attribute values

Subject: Re: [xsl] sum of attribute values
From: "Dimitre Novatchev" <dnovatchev@xxxxxxxxx>
Date: Wed, 31 May 2006 17:03:21 -0700
Use the transform-and-sum function/template from FXSL 1.x.

For examples, search for "transform-and-sum".

-- Cheers, Dimitre Novatchev --------------------------------------- Truly great madness cannot be achieved without significant intelligence.

On 5/31/06, SINGH Navpreet <Navpreet.SINGH@xxxxxxxxx> wrote:
I need a sum of all the @width attributes from the following xml. I was using <xsl:value-of select="sum(number(substring-before(//@COLWIDTH, 'in')))"/>. But it did not work. Can anyone help me with this.

               <col colnum="1" width="0.984in"/>
               <col colnum="2" width="1.880in"/>
               <col colnum="3" width="0.984in"/>


Current Thread