On Aug 31, 2005, at 8:36 AM, Stephan Coboos wrote:
Hello,
I assume
<jx:set var="world" value="WORLD"/>
<jx:set var="helloWorld" value="HELLO ${world}"/>
${helloWorld}
should output the string "HELLO WORLD". Is this correctly? But it
doesn't
work in Cocoon 2.1.6. What I got is "HELLO ${world}". This means the
var
${world} in the set of helloWorld wasn't interpreted. What's wrong
here?
You're right, <jx:set> doesn't do string interpolation. I remember
looking at the source code a couple of weeks ago when I was puzzling
over this very thing. IIRC, the value attribute needs to contain
either (a) a literal string, or (b) a valid JExL expression enclosed in
'${}' (and JExL seemingly doesn't have a string concatenation
function). "HELLO ${world}" doesn't start with "${", so JXTG parses it
as a literal string.
PS: If I'm doing <jx:set var="helloWorld" value="${world}"/> the var
${world} gets interpreted! Why?!?
See above, it should now be clear :-/
The bad thing is, studying the user doc for JXTG would lead one to
believe that string interpolation is supported by <jx:set>, because I
think we show it in a code example!
—ml—
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]