Databases are accessed inside the RHS of rules with the $( and $) operators:
$(name key
$)
This looks up key in the database named name and replaces the entire expression (operators and all) with the value found in the database. If no value is found, the key replaces the expression, unless a $: gives a default:
$(name key
$:default
$)
in which instance the default replaces the entire expression.
Optional replacement text can be appear between the name and the $: (if one) or the $) . Each is of the form " $@ text ":
$(name key
$@text1
$@text2
$) $(name key
$@text1
$@text2
$:default
$)
The first (the
$@
text1
) will replace any literal
%1
expressions in the value returned by the database. The second (the
$@
text2
) will replace
%2
, and so on. In this scheme,
%0
always references the
key
. But note that not all map classes do this replacement.