Matt Benson wrote:
Anyone from ant-contrib want to add a caveat to the
documentation of the for task? Being based on
macrodefs, for is the only place I know of where this
comes into play:
Same applies to macros in macros!
since the @ character is escaped
with another (@@) in macrodefs/for, nested for loops
must double-escape the @ character (@@@@). This
applies to for loops appearing in macros as well.
Looks like the rule is an additional two '@'s per
nesting level. So no nesting = @@, one level deep =
@@@@, and two levels deep = @@@@@@ .
No, It is doubling each level:
<property name="chars" value="a"/>
<ac:for param="c1" list="${chars}">
<sequential>
<ac:for param="c2" list="${chars}">
<sequential>
<ac:for param="c3" list="${chars}">
<sequential>
<echo>'@@@@@@@@'</echo>
</sequential>
</ac:for>
</sequential>
</ac:for>
</sequential>
</ac:for>
outputs '@'
Actually on testing, it seems that there is a bug with the escaping of
nested @{x}, will investigate further.
Peter
-Matt
__________________________________
Do you Yahoo!?
Yahoo! Mail - now with 250MB free storage. Learn more.
http://info.mail.yahoo.com/mail_250
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]