It makes sense to separate content and length into two spans - thanks.
With that in mind, the desirable output is
<div>
<span>a</span> of <span>2</span>
<span>b</span> of </span>2</span>
</div>
Hoewever, some element still needs to define that "$len" variable,
right? If an outher div is used for this, then the template would
looks like this:
<div id="t" jsvars="$len:testArray.length">
<div jsselect="testArray">
<span jscontent="$this"></span> of <span jscontent="$len"></
span>
</div>
</div>
but that would still produce an extra wrapping div as in:
<div>
<div><span>a</span> of <span>2</span></div>
<div><span>b</span> of </span>2</span></div>
</div>
The issue would be solved if there was a way to define variables
before jsselect is evaluated, on *the same element*. Something like
<div jsvars_evaludated_before_jsselect="$len:$this.testArray.length"
jsselect="testArray">...
Alexis