Dear Velocity Dev List:
I was reading your Velocity User Guide. It's very
helpful and useful. I rarely read documentation this
clear and concise.
There's a small errata in the section:
VTL: Formatting Issues
The first example for the velocity macro only says
"Send #set", not "Send me #set". Therefore, the
output will be different between the first example and
the second and third example. Should probably just
add the word "me" after "Send" in the first example.
I've attached the VTL: Formatting Issues text below:
VTL: Formatting Issues
Although VTL in this user guide is often displayed
with newlines and whitespaces, the VTL shown below
#set( $imperial =
["Munetaka","Koreyasu","Hisakira","Morikune"] )
#foreach( $shogun in $imperial )
$shogun
#end
is equally valid as the following snippet that Geir
Magnusson Jr. posted to the Velocity user mailing list
to illustrate a completely unrelated point:
Send #set($foo=["$10 and ","a pie"])#foreach($a in
$foo)$a#end please.
Velocity's behaviour is to gobble up excess
whitespace. The preceding directive can be written as:
Send me
#set( $foo = ["$10 and ","a pie"] )
#foreach( $a in $foo )
$a
#end
please.
or as
Send me
#set($foo = ["$10 and ","a pie"])
#foreach ($a in $foo )$a
#end please.
In each case the output will be the same.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]