cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stephan Coboos <>
Subject JXTemplate and postion()?
Date Tue, 25 Nov 2003 20:39:29 GMT

I need to get the actual index within an iteration. I'm using a 
Flowscript and the JXTemplateTransformer to transform the following lines:

<?xml version="1.0" encoding="ISO-8859-1" ?>
<html xmlns:jx="">

<jx:forEach select="#{myArray}">
<jx:set var="index" value="#{position()}"/>

   Value: #{.}
   Index: #{$index}



This works fine but  #{$index} has always the same value: 0. Why? Does 
<jx:set/> not pointing to the actual node or position() not working 
correct? Is there another way, to get the index within the forEach 
iteration? With Jexl?

Thank you very much!


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message