[xsl] "sum" of "substring"

Subject: [xsl] "sum" of "substring"
From: Colin Simpson <Colin.Simpson@xxxxxxxxxxxxxxx>
Date: Thu, 23 Oct 2003 12:24:03 +0100

My problem:
I have a flat text file that has to be transformed into a predetermined XML


where the first 5 characters indicate which one of two record layouts it is.

I first do some rudimentary wrapping of the records, creating an
intermediary XML file that
I can then use XSLT to process:


I can populate nodes in the final output XML file by extracting data via
"substring", such as 
<xsl:value-of select="substring(.,28,15)">

I need to total up certain numeric values within the record of a specific
For example, I want to total up the values that occupy positions 24 thru 28
from all records of "TYPE1".
Is there any way of doing this?
I thought I should use "sum" but I can't figure out the syntax needed.

Kind regards
Colin Simpson


This email and any files transmitted with it are confidential and intended 
solely for the use of the individual or entity to whom they are addressed. 
If you have received this email in error please notify the system manager. 


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

Current Thread