You need to change your template to this
TestTemplate|| <List:{x | [DataList <x.Name>] }> [END]
As of this documentation
<attribute:{x | anonymous-template}>
Apply an anonymous template to each element of attribute.
The iterated value is set to argument x.
The anonymous template references <x> to access the iterator value.
You can set x
to anything you like, it's just a place holder for the iterator.
The problem was that you were using the StringTemplate3 cheatsheet instead of the StringTemplate4 cheatsheet http://www.antlr.org/wiki/display/ST4/StringTemplate+cheat+sheet