How to:
Reference: |
The looping is defined as the parent group nodes that replicate for each set of constituent child elements. The properties of the parent group node can be set to control this behavior.
The following looping modes can be defined for the group nodes:
The default processing allows for Transformer’s engine to determine looping behavior. When looping is in effect, explicitly or by default, the given group node is repeated for each complete cycle of its child elements. For more information on looping, see Using Mapping Builder.
To use looping mode that is set to true:
The Output Node Properties dialog box opens.
In the output, note that the b_out node is looping three times. This occurs because its looping mode is set to true, so b_out is looping as many times as its children elements are looping.
In this case, its children elements are looping three times because their mapping paths are repeated in the input file:
b1_out child is mapped to path 'a/b/b1' b2_out child is mapped to path 'a/b/b2'
To use looping mode that is set to false:
The Output Node Properties dialog box opens.
In the output, note that the b_out node is not looping. This is because its looping mode is set to false, so b_out looping is disabled even though its children elements are looping.
In this case, its children elements are grouped under one b_out parent group node.
To use looping mode that is set to aggregate:
The Output Node Properties dialog box opens.
In the output, note that the b_out node is looping twice. This is because its looping mode is set to aggregate, and b_out is looping only for unique parent group nodes.
The following is a sample loop input file.
<?xml version="1.0" encoding="UTF-8" ?> - <a> - <b> <b1>value of input element a/b/b1</b1> <b2>value of input element a/b/b2</b2> </b> - <b> <b1>value of input element a/b/b1</b1> <b2>value of input element a/b/b2</b2> </b> - <b> <b1>value of input element a/b/b1</b1> </b> </a>
iWay Software |