[stringtemplate-interest] Spaces around template attributes
Terence Parr
parrt at cs.usfca.edu
Wed Apr 29 14:33:52 PDT 2009
On Apr 29, 2009, at 7:59 AM, 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=' '>
>>>
something like this seems best. almost common enough thtat we need an
operator for that!
Ter
More information about the stringtemplate-interest
mailing list