Subject: [xsl] Re: RE: Transformation for FO table widths From: Dimitre Novatchev <dnovatchev@xxxxxxxxx> Date: Mon, 29 Apr 2002 12:55:48 -0700 (PDT) |
> 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
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[xsl] ANN: XML Origin 1.1 Released, Phil Brown | Thread | [xsl] large xml document and sortin, Mark Diggory |
[xsl] ANN: XML Origin 1.1 Released, Phil Brown | Date | [xsl] large xml document and sortin, Mark Diggory |
Month |