Ho posto il quesito e l'autore mi ha risposto:
On Fri, Feb 08, 2013 at 09:08:08PM +0000, Ataro wrote:
> I've erroneusly used the substitution $(....) in a rule in the style file lines as follow:
> highway=* & route=* {set route_ref='$(route_ref), ${ref}' | '${ref}'}
> and mkgmap don't return with some error or warning.
I implemented this feature some years ago, so that you could append attributes from multiple relations to the relation members. For example, append all ${ref} of bus route relations to the ${route_ref} of the bus stop POIs.
> This substitution $(....), as state the manual, are reserved for the use in a apply rule in the relations file and are not usable in other style files.
> I've found a mkgmap bug or what other?
It could be fixed in the documentation, by saying that $(name) is equivalent to ${name} outside the apply action.
In uk.me.parabola.mkgmap.osmstyle.actions.ValueItem, there ${} vs $() chooses whether we are referring to the relation or to the relation member. For example,
(type=boundary | type=multipolygon) & boundary=administrative & name=*
{ apply
{
set mkgmap:boundary_name='$(mkgmap:boundary_name)/${name}' | '${name}';
}
}
in the default style will set the attribute mkgmap:boundary_name in the relation member. The $(mkgmap:boundary_name) refers to attribute in the relation member, while ${name} refers to the attribute in the relation itself.
Best regards,
Marko
Quindi, come ha verificato scratera, $() e ${} sono equivalenti fuori da un apply (e quindi anche fuori dal file relations). Ha detto poi che la documentazione verrà aggiornata per spiegarlo.