Re: [xsl] Re: Keeping a running total?

Subject: Re: [xsl] Re: Keeping a running total?
From: "Dimitre Novatchev" <dnovatchev@xxxxxxxxx>
Date: Tue, 11 Jul 2006 14:33:28 -0700
This is one possible solution, however it's time complexity is O(N^2)
and can be unacceptable for producing intermediate results from an
operation over a list of N items.

A recursive solution (such as using the FXSL scanl()
template/function) can have a O(N) complexity.



--
Cheers,
Dimitre Novatchev
---------------------------------------
Truly great madness cannot be achieved without significant intelligence.


On 7/11/06, Andrew Franz <afranz0@xxxxxxxxxxxxxxxx> wrote:
How about just sum the predecessor axis (with selection)?
(Apologies if someone already suggested this - I missed the start of the
thread)


Steve wrote:


> Any other takers?
>
> I'd have to have to resort to some hack if I can do this with XSL.
>
> -S
>
> On 7/10/06, Steve <subsume@xxxxxxxxx> wrote:
>
>> Problem:  I need to make a table of the output required of 4 factories
>> next month.
>>
>>                   Widgets    Gadgets
>> Factory A     2
>> Factory B     3
>> Factory C                       4
>> Factory D                       1
>>
>> Widget quota = 5
>> Gadget quota = 5

Current Thread