[stringtemplate-interest] Spaces around template attributes

Steve Ebersole steve at hibernate.org
Wed Apr 29 08:39:55 PDT 2009


That worked, though obviously I think you lose a little bit of the
intention there.  But it was the "cleanest" solution in terms of being
able to contain it within the template group file and still have a
(hopefully?) well-performing solution.


On Wed, 2009-04-29 at 16:59 +0200, Michael wrote:
> Am Wednesday 29 April 2009 16:43:30 schrieb Steve Ebersole:
> > I am trying to deal with extra spaces in my stringtemplate output when
> > attribute values used within the template are null/empty.  I figure this
> > has to be a pretty common requirement, so I thought I'd ask here how to
> > accomplish this.
> >
> > For example, I have a template like:
> > sortSpecification(sortKey,collationSpecification,orderingSpecification) ::=
> > << <sortKey> <collationSpecification> <orderingSpecification>
> >
> 
> you can try it with list construction, *untested* :
> 
> sortSpecification(sortKey,collationSpecification,orderingSpecification) ::=
> <<
> <[sortKey, collationSpecification, orderingSpecification]; separator=' '>
> >>
> 
> 
>  Michael
> 
> _______________________________________________
> stringtemplate-interest mailing list
> stringtemplate-interest at antlr.org
> http://www.antlr.org/mailman/listinfo/stringtemplate-interest
-- 
Steve Ebersole <steve at hibernate.org>
Hibernate.org



More information about the stringtemplate-interest mailing list