[stringtemplate-interest] [ST4 Beta-4] Map is not imported
Udo Borkowski
ub at abego-software.de
Sat Feb 12 15:11:06 PST 2011
Hi,
it looks like a map defined in an STGroup is not imported when using the "import" statement for that group.
Steps to reproduce:
File "mapAndTemplate.stg"
---------
mapname ::= [ "name1":"val1", "name2":"val2", default:"err"]
template1() ::= <<
one
>>
main() ::= <<
mapOutput: <mapname.name1>, <mapname.xyz>
templateOutput: <template1()>
>>
--------
"main()" will output (as expected):
mapOutput: val1, err
templateOutput: one
However when the group is imported like here
File "test.stg"
----------
import "~/st/templates/trial/mapAndTemplate.stg"
main() ::= <<
mapOutput: <mapname.name1>, <mapname.xyz>
templateOutput: <template1()>
>>
----------
the output is:
mapOutput: ,
templateOutput: one
I.e. the map entries are not found. However the template "template1()" is correctly used.
Udo
More information about the stringtemplate-interest
mailing list