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

[xsl] sum of attribute values


Subject: [xsl] sum of attribute values
From: "SINGH Navpreet" <Navpreet.SINGH@xxxxxxxxx>
Date: Thu, 1 Jun 2006 09:34:58 +1000

Hi,
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.

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

Thanks,
Navpreet.


Current Thread