Subject: Re: [xsl] Keeping a running total? (Redo) From: "Dimitre Novatchev" <dnovatchev@xxxxxxxxx> Date: Tue, 11 Jul 2006 12:36:46 -0700 |
I will cross that bridge when I get to it. I'm having a hard enough time getting help for the first problem.
When I solve how to keep a running total, it will be easy to add whatever is left over to the next quota.
<xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:f="http://fxsl.sf.net/" exclude-result-prefixes="f"
<xsl:import href="../f/func-scanl.xsl"/> <xsl:import href="../f/func-Operators.xsl"/>
<xsl:template match="/"> <xsl:for-each select="f:scanl1(f:add(), /*/*/@capacity)"> <xsl:value-of select="concat(., ', ')"/> </xsl:for-each> </xsl:template> </xsl:stylesheet>
<xml> <factory x="A" capacity = "3" /> <factory x="B" capacity= "5" /> <factory x="C" capacity = "3" /> <factory x="D" capacity = "2" /> <factory x="E" capacity = "2" /> ...etc... </xml>
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] Keeping a running total? , Steve | Thread | Re: [xsl] Keeping a running total? , didoss |
Re: [xsl] Keeping a running total? , Steve | Date | Re: [xsl] Procesing XHTML files wit, J.Pietschmann |
Month |