RE: [xsl] sum() Function Used With Variables

Subject: RE: [xsl] sum() Function Used With Variables
From: cknell@xxxxxxxxxx
Date: Wed, 14 Mar 2007 14:24:07 -0400
A sample of your input would help, and while I can grasp that "my stylesheet bottoms out" is not a good thing, it isn't specific enough to aid in diagnosing the problem.
Charles Knell
cknell@xxxxxxxxxx - email

-----Original Message-----
From:     Ryan Lubben <ryanl@xxxxxxxxxxx>
Sent:     Wed, 14 Mar 2007 13:14:51 -0500
To:       <xsl-list@xxxxxxxxxxxxxxxxxxxxxx>
Subject:  [xsl] sum() Function Used With Variables

Hi All,

I am currently attempting to use the sum() function in XSLT 1.0 to total up
various table column widths in order to determine whether or not the table
needs to span the entire width of the page. Unfortunately, the column width
attribute that exists in the XML has the inches designator included in the
width value.  I have set my stylesheet up so that the 'in' designator is
filtered through another variable using the substring-before() function, but
as soon as I attempt to use the sum() function with the first variable my
stylesheet bottoms out.  Any help would be greatly appreciated.  

<xsl:param name="colwidths">
		<xsl:when test="contains(tgroup/colspec/@colwidth, 'in')">
<xsl:param name="sum.colwidths" select="sum($colwidths)"/> 

Thanks in advance.

Ryan Lubben

Current Thread