Use
collapseContexts()copies the first value from all contexts to one context. Empty contexts are replaced with an empty string.
This can be useful if an upper-level node is to be created each time a lower-level node exists, for example. The function is useful in combination with the function SplitByValue().
Example
In the following example, a separate upper-level element
Source Structure (Left) and Target Structure (Right)
Field Name | minOccurs | maxOccurs | Field Name | minOccurs | maxOccurs |
srcRoot | 1 | 1 | destRoot | 1 | 1 |
srcSub | 0 | unbounded | destSub | 0 | unbounded |
srcItem | 0 | unbounded | destItem | 0 | unbounded |
This is achieved by using a combination of the functions SplitByValue() and collapseContexts(). To create a queue for
Message Mapping with collapseContexts() and SplitByValue()
Target Field Mapping | Value of SplitByValue() |
/destRoot=/srcRoot |
|
/destRoot/destSub= | Each Value |
/destRoot/destSub/destItem= | Each Value |
Example
Source Instance | Result |
encoding="UTF-8"?>
|
|
No comments:
Post a Comment