Processing Order of Nodes

The attribute Iteration provides a further control option for the creation of the destination tree. This attribute determines how the child nodes are searched in the source tree.

Iterating through all nodes

In all previous examples, the default value Iterating through all nodes was used, where the mapper alternately searches the parallel nodes for similar subnodes. The following figure shows the effects of the processing order Iterating through all nodes on a destination tree.

images/download/attachments/21303102/Mapping_28-version-1-modificationdate-1531701616000-api-v2.png

(1) The attribute Iteration of node OrderPosition (destination structure) has the value Iterating through all nodes.

(2) First, all subnodes Position are searched for and placed in the destination tree.

(3) Then, all subnodes PositionText are searched for and placed in the destination tree.

(4) After processing node (1), the next identically named node is determined. There, all subnodes Position are searched and placed in the destination tree.

(5) All subnodes PositionText are searched for and placed in the destination tree.

(6) The final destination tree resulting from the described settings.

The found subnodes are assigned to the respective top node. The processing of the subnodes found is not affected by the setting of the top node.

All elements per node

If the value All elements per node is set, the mapper will change its search. First, all elements of the subnodes of a node are searched for before going to the next node. The following figure shows the effects of the processing order All elements per node on a destination tree.

images/download/attachments/21303102/Mapping_29-version-1-modificationdate-1531701616000-api-v2.png

(1) The attribute Iteration of node OrderPosition (destination structure) has the value All elements per node.

(2) First, all subnodes Position are searched for and placed in the destination tree. In contrast to the previous example, the sibling nodes are also searched. Two elements are found.

(3) Then, all subnodes PositionText are searched for and placed in the destination tree. In contrast to the previous example, the sibling nodes are also searched. Four elements are found. Then the search is repeated in the next node OrderPosition and already found elements are no longer considered.

(4) The result is a destination tree with a node OrderPosition, in which all the subnodes from the source tree are collected.

Loop

There is another value for node attribute Iteration: Loop. This setting only has an effect below a node with value All elements per node for node attribute Iteration. The subnodes with value Loop are not searched in adjacent nodes. Therefore, when entering the neighbouring nodes, the mapper finds the elements for the first time and assigns them to the neighbouring node. The following figure shows the effects of the processing order Loop on a destination tree.

images/download/attachments/21303102/Mapping_30-version-1-modificationdate-1531701616000-api-v2.png

(1) The attribute Iteration of node OrderPosition (destination structure) has the value All elements per node.

(2) The attribute Iteration of node Position (destination structure) has the value Loop.

(3) First, the subnode Position is found below OrderPosition. The subnode has the value Loop, therefore the positions in the parallel nodes OrderPosition are not searched. The node Position is placed in the destination tree.

(4) Then, all subnodes PositionText are searched for and placed in the destination tree. Since node attribute Iteration has the value All elements per node, the sibling nodes are also searched. Four elements are found. Then the search is repeated in the next node OrderPosition and already found elements are no longer considered.

(5) After processing the first node OrderPosition, the second node is processed analogously. First, the subnode Position is found. The subnode has not been found before, so Position is placed in the destination tree.