Hello,

currently I fight with the Jelly script for a plugin extension and I got stuck. See 
the following example:

Having following properties:
all=y,x
prop.x=1
prop.y=2
prop.z=0

I would like to iterate over the properties "prop.<key>" defined in "all":

<?xml version="1.0"?>
<project xmlns:j="jelly:core" xmlns:u="jelly:util" xmlns:ant:"jelly:ant">
<u:tokenize var="all.split" delim=",">${all}</u:tokenize>
<j:forEach var="i" items="${all.split}">
        <ant:echo>prop.${i}:${prop[i]}</ant:echo>
</j:forEach>

The script should have printed:

prop.x:1
prop.y:2

Unfortunately Jelly seems not to support the [] syntax and the second expression 
evaluates to null.
This approach is a syntax error:

        <ant:echo>prop.${i}:${prop.${i}}</ant:echo>

This one will print also nothing useful:

        <ant:echo>prop.${i}:${<j:expr value="prop.${i}"/>}</ant:echo>

So is there any solution to create such assembled variables? 

Regards,
J�rg

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to