[stringtemplate-interest] Anonymous template inside another anonymous template

Morten Olav Hansen mortenoh at gmail.com
Thu Nov 25 12:44:25 PST 2010


Hi

Is it possible to have an anonymous template inside another template
somehow? I'm trying to generate an argument to a template (which is
called from an anonymous template).

I have something like this:

<r.states: {s|<state_builder(state=s, region_ns={r<region_n>})>}>

But i get an exception:
Exception in thread "main" java.lang.IllegalArgumentException: cannot
embed template <anonymous template argument> in itself

I'm just passing region_ns=region_n now and adding the r on the
template side (and this works), but this argument will potentially
have several arguments concatenated together.

Regards,
Morten


More information about the stringtemplate-interest mailing list