[xsl] How to do this without updating a variable?

Subject: [xsl] How to do this without updating a variable?
From: "Agnisys Technology \(P\) Ltd." <agnisys@xxxxxxxxx>
Date: Wed, 7 Sep 2005 14:28:41 -0700 (PDT)
  I have seen past postings about the fact that variables cannot be updated. But I'm not sure how
to solve the following problem without variable update!


    <reg count="5"> A0 </reg>
    <reg count="10"> A1 </reg>
    <reg count="10"> A2 </reg>


  Node : start      end
  A0   :   1    -    5
  A1   :   6    -   15
  A2   :  16    -   25

So basically output of any node <reg> is based on all the <reg> nodes that have been processed
before it. If I could use a temporary variable, I would have just kept a running total of the
total "count" prior to processing that node.

Could someone suggest a solution or give me some pointer?


Click here to donate to the Hurricane Katrina relief effort.

Current Thread