Altova MapForce 2027 Professional Edition

Basic Rules and Strategies

Home Prev Top Next

This section describes the basic mapping rules and explains how connections and mapping context affect the generated output.

 

How mappings work

For a mapping to be valid, it must include at least one source connected to at least one target component. When you create a connection between a source item and a target item, the mapping reads data from that source item, passes the data to the target item, and generates instance data in the target format.

 

Even if a source item has multiple occurrences in the source instance, data components display only the schema hierarchy. For example, the source XML in the example below contains several book elements, but the source component displays only a single book node.

 

Rules

The following rules describe how MapForce processes source data and generates target data. To illustrate the basic rules, we will use the mapping shown below.

mfdBooksToLibrary-BAS

Rule 1: Processing of repeated items

For each source item occurrence, one corresponding target item occurrence is created. In the mapping above, if the source XML contains three book elements, three publication elements are created on the target side. Note that there are a few special cases (see Nodes with Multiple Occurrences).

 

Rule 2: Processing order

MapForce starts processing at the target root node. In our example, the execution of the mapping begins at the library element. After processing the target root node, MapForce progresses down the hierarchy.

 

Rule 3: Mapping context

Each connection establishes the current mapping context. The context determines what data is available to the current target node and its descendants and which source items are mapped to the target.

 

By adding or omitting a connection, you can control the current context and thus affect the output of the mapping. For more information, see Context and Processing Order.

 

© 2020-2026 Altova GmbH