In-maps(3.2)

The in_map construct is used to map external formats to internal formats during decoding. The general syntax for an  in-map  declaration is as follows:

in_map <map_name> : <in_map options> {
   <explicit map specifications>
   <automatic> : <automatic options> {
      <automatic mapping specifications>
   };
   <sub-external specifications>
};

The general in-map options are:


OptionDescription

external(<external_name>)

Specifies the external format to map from. This is a mandatory parameter.

internal(<internal_name>)

The internal format name to map to. This is a mandatory parameter, unless target_internal is specified.

target_internal(<target_internal_name>)

The target internal format name created when automatically generating a map. This parameter is only valid for automatic mappings.

discard_output

Specifies that the in_map will produce no output when used in a decoder. This can be useful for uninteresting "filler records" that are not needed for processing.

emit_field(field1, field2, ...)

Specifies that a decoder using this in_map will not route out the top level UDR. Instead, the content (records or list of records) of the named fields are routed.

Specially named options can also be supplied in the in_map depending on the type of the external format. The type specific options are:


OptionDescription

ipdr_compact

Only applicable for XML based formats (IPDR formats). Specifies that the IPDR "compact" encoding is to be used.

PER_aligned

Only applicable for ASN.1 based formats. Specifies that PER encoding (ALIGNED version) is to be used.

PER_unaligned

Only applicable for ASN.1 based formats. Specifies that PER encoding (UNALIGNED version) is to be used.


OptionDescription

<explicit map specifications>

Describes how the external fields are mapped to the internal fields. These specifications are optional.

i:<internal field> and 
e:<external field>
      [ using in_map <sub_map> ] ;


<automatic>

Specifies that all external fields not explicitly mapped in <explicit_map_specifications> will be implicitly mapped according to the external formats implicit type conversions. It is also possible to control the behavior of the automatic mapping through options or a specification block, see the section below, Automatic Maps, for details).

<sub-external specifications>

This is used to handle the special case where the mapped external is the parent of other externals that must be considered for decoding. This is currently only supported for XML schema based externals where it is used to support, for instance, IPDR decoding.

ignore_unknown_tags

This option can be used to ignore unknown tags when the external format is ASN.1 BER.


Example - ignore_unknown_tags

Adding the following for an in_map:

in_map inMapIgnoringUnknownTags:
     external(Udr),
     target_internal(Udr),
     ignore_unknown_tags {

    automatic;

    };


will create an in_map called inMapIgnoringUnknownTags that will simply ignore any unknown tags in the BER encoding.

Note!

This functionality can also be achieved by using the ASN.1 extensibility syntax. For example, entering:

TheType ::= SEQUENCE {

    boolField (1) BOOLEAN OPTIONAL,

}


will result in tags of the type TheType to be ignored.


This chapter includes the following sections: