iterator var over multiple cycles

12 views
Skip to first unread message

Wanradt Koell

unread,
Feb 4, 2014, 7:28:57 AM2/4/14
to xsl...@googlegroups.com
Hi!

I don't see, how to use iterator variable over multiple for-cycles? Is there some mechanism, how to use same sequence? I found such cumbersome way by nesting for-cycles, but it looks a bit ugly:

: for $items -> $item {
  <: $~item.count :> <: $item :>
:   if( $~item.is_last  ) {
:    for $set -> $id {
  <: $~item.count + $~id.count :> <: $id :>
:      if ( $~id.is_last ) {
:        for $stuff -> $thing {
  <: $~item.count + $~id.count + $~thing.count :> <: $thing :>
:        }
:      }
:     }
:   }
: }

I hope there is better way to achieve common sequence over multiple lists.

Wbr,

Gunnar
Reply all
Reply to author
Forward
0 new messages