James Strachan wrote:
From: "Christian Sell" <[EMAIL PROTECTED]>

- is interpreted by the expression language as numerical subtraction.

e.g.

${foo- 12}
does that mean that variable names have to follow naming rules similar
to Java? (If so, the set tag should enforce them like the Java compiler
does)

Variables don't have to be. e.g. if you want to access some illegally named
variable you could do

${context.getVariable('some-bad-name*of/a.variable'}

Though I think testing variable names (or at the very least warning users)
in tags like <j:set var=.../> seems like a good idea to me.

that leaves me with 2 questions:

1. how do I output a simple message to the console, followed by a carriage return, without a "[WARN] adada" prefix, without configuration of log4j.properties, without unwanted whitespace.


2. the handling of tag content seems rather obscure. If I write this:

<j:jelly xmlns:j="jelly:core" xmlns:log="jelly:log">

<j:set var="repeat_count" value="5"/>

repeat_count=${repeat_count}

<log:info>testest</log:info>

</j:jelly>

my output is:

===== begin output ========


repeat_count=5

[INFO] InfoTag - -testest
====== end output =========

but if I write

<j:jelly xmlns:j="jelly:core" xmlns:log="jelly:log">

<j:set var="repeat_count" value="5"/>

repeat_count

<log:info>testest</log:info>

</j:jelly>

my output is:

===== begin output ========
[INFO] InfoTag - -testest
repeat_count
====== end output =========


Note the only difference is the removal of the ${repeat_count} expression in the second script.

- Christian


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

Reply via email to