[stringtemplate-interest] Order of Attributes
Rabea Gransberger
rgransberger at gmx.de
Tue Mar 4 01:28:32 PST 2008
Terence Parr schrieb:
>
> On Feb 23, 2008, at 4:29 AM, Rabea Gransberger wrote:
>
>> Hello,
>>
>> is there any way to question the Order of attributes in a StringTemplate?
>>
>> I'd like to have some internationalization and have some properties
>> files with entries like:
>> plus=$right$ + $left§
>>
>> I take the String for plus and make a StringTemplate out of it, and then
>> I'd like to know if $right§ occurs first in the template or $left$.
>
> Do you mean the references to the templates or the order which they were
> set? The order of the attributes is undefined unless you are talking
> about the order in which you reference them.
I mean the reference to the templates. In my example I'd like to get 1
if I request something like
getReferenceOfAttribute("right")
and 2 for
getReferenceOfAttribute("left")
A list of numbers would also be okay, if the attribute is referenced
more than once.
Greetings,
Rabea
More information about the stringtemplate-interest
mailing list