Mapping syntax
Introduction
A mapping defines the transition between a set of string keys and a set of corresponding string values. It is used for various purposes, including the following:
· to define which "preview" template should be used for UML elements of a certain UML metaclass
· to define a translation between "unified" and platform-dependent keywords.
A mapping is defined by the <map> XML element, whose syntax is described below.
The <map> element contains zero or more <key> elements, defining the contents of the mapping. It has the following attributes:
· id: This contains a string identifier of the mapping, which should be unique within a library (but can be overridden in a different library), and which is used to access the mapping during runtime.
The <key> element defines the element of a mapping, the association between a key string and a value string. It contains the following attributes:
· id: This is the string identifier of a key (the key string), unique within the mapping.
· value: This is the value string corresponding to the key stored in the id attribute.
<map
id="Act.CodePreview">
<key id="Attribute"
value="CxxAttributePreview"/>
<key id="AssociationEnd"
value="CxxAssociationPreview"/>
<key id="Operation"
value="CxxOperationPreview"/>
<key id="Class"
value="CxxClassHeaderFile"/>
<key id="Interface"
value="CxxClassHeaderFile"/>
<key id="Package"
value="CxxPackageHeaderFile"/>
</map>