[stringtemplate-interest] Issue with Multi-Valued attributes where the attribute is a Map Key/Value pair.

Terence Parr parrt at cs.usfca.edu
Sun Oct 2 21:54:02 PDT 2005


Hi Rob,

I suggest wrapping in an aggregate object like you suggest.  Here's  
the easy way:

   docOut.setAttribute("Paragraphs.{map}", para);

That should work for multiple maps also.  You just have to modify  
your template to say

      $Paragraphs:{p | p.map:paragraph()}; separator="\n\n"$

or modify your paragraph.st to use $it.map.Bullet$ etc...

Ter






More information about the stringtemplate-interest mailing list