[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Recursion of variable
Thanks for your reply, David. This was exactly what I asked for, but I realized after I tried to incorporate it, it doesn't 100% reflect the structure of my code. Here's where I went wrong: <cnt> only appears at the lowest level. In the example, that would be at the <r3>, <r2> and <r1> levels respectively. But I need to process each <r?> node because I need to copy additional nodes within them on output: <vector> <r1> <t>geometry</t> <r2> <t>parabola</t> <r3> <t>trapezium</t> <cnt>4</cnt> </r3> <r3> <t>rhombus</t> <cnt>4</cnt> </r3> </r2> <r2> <t>parallelogram</t> <cnt>3</cnt> </r2> </r1> <r1> <t>reflection</t> <cnt>2</cnt> </r1> <r1> <t>refraction</t> <cnt>2</cnt> </r1> </vector> Desired output: <vector> <r1> <t>geometry</t> <r2> <t>parabola</t> <r3> <t>trapezium</t> <o>1-5</o> (This is the value 1 + <cnt>, carry value "6" forward) </r3> <r3> <t>rhombus</t> <o>6-10</o> (This is the value 6 + <cnt>, carry value "11" forward) </r3> </r2> <r2> <t>parallelogram</t> <o>11-14</o> (This is the value 11 + <cnt>, carry value "15" forward) </r2> </r1> <r1> <t>reflection</t> <o>15-17</o> (This is the value 15 + <cnt>, carry value "18" forward) </r1> <r1> <t>refraction</t> <o>18-20</o> (This is the value 18 + <cnt>) </r1> </vector>
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|