You can use mapper functionality to merge the contents of repeating elements, as shown in the following figure:
Figure : Merging the Contents of Repeating Elements
The join, shown in the preceding figure, merges the price and availability from the two source documents to one output (target) document called Quote.xml. Specifically, the price (element: price) and widget Id (element: widgetId) for the widgets is supplied by the PriceQuote.xml document and the number of widgets available (element: requestedQuanity) is supplied by the AvailQuote.xml document. The widgetId and requestedQuanity elements are part of the availRequest repeating element and price element is part of the priceRequest repeating element. These subelements to repeating elements are merged into subelements of the quoteResponse repeating element.
For this example, a complete merge of the two sets of elements resulting in four elements as shown in Figure: Merging the Contents of Repeating Elements is not desired. Instead a conditional constraint is needed that will return the merged element only if the condition is true. To learn more, see Creating a Conditional Constraint Using the Constraints Tab.
For a step-by-step walk through of using the mapping functionality to create a join with a conditional constraint, see Tutorial: Building Your First Data Transformation. Specifically, the join is created in Step 4: Mapping Repeating Elements—Creating a Join in the Tutorial: Building Your First Data Transformation.
![]() |
![]() |