This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: RE: Transformation for FO table widths


> What I do
> > next is to
> > sum up these values, like this:
> >
> >   <!-- Sum up percent values -->
> >   <xsl:variable name="percent-sum"
> >     select="sum(number(substring-before($percent-nodes, '%')))"/>
> 
> Summing over a computed expression is not easy in XSLT 1.0. There are
> various extension functions that do it in various products; or you
can
> create an RTF with nodes that contain the computed numbers and use 
> sum () over the nodes in that RTF, which requires the node-set 
> extension. The pure way is to use recursion; and no doubt Dimitre has

> an off-the-shelf dynamic template that does it. 

Mike is right -- do have a look at testTransform-and-sum.xsl from FXSL.

Cheers,
Dimitre Novatchev.

__________________________________________________
Do You Yahoo!?
Yahoo! Health - your guide to health and wellness
http://health.yahoo.com

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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]