on 09-19-2016 3:18 AM
Hi all,
I am not sure how to make this scenario work, you are welcome to share your thoughts.
My requirement is I need to create a multiple segment inside a xml file and inside this segment
there could be a 0:unbounded occurrence of another segment.
Here is an example of the xml structure.
<supply>
<supply_code>PEN033</Supply_code>
<unit_code>PC</unit_code>
<sites>
<site>PRN03</site>
</sites>
<sites>
<site>TER01</site>
</sites>
<sites>
<site>CRN05</site>
</sites>
</supply>
<supply>
<supply_code>ERS004</Supply_code>
<unit_code>PC</unit_code>
<sites>
<site>PRN03</site>
</sites>
<sites>
<site>CRN05</site>
</sites>
</supply>
Hi Topeqejj,
Since the source structure is not given, here is a general rule for dealing with unbounded segments:
1. The first unbounded target segment you have is supply. The output context should only contain one context change. If there are two or more context changes, only the entries in the first context change are created in the target mapping. For example:
Will create two supply nodes.
2. The second unbounded target segment you have is sites. The number of context change in the display queue depends on the number of contexts in step 1. In our example, there are two contexts in step 1 therefore, you need two context changes containing all the entries. For example:
Will create three sites for the first supply node and two sites for the second supply node. The splitByValue:eachValue will ensure that there is a value for site.
Regards,
Mark
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Topeqejj,
Please make your requirement more clear with Input and Output structure.
Regards,
Suman
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Top,
What is the end-end flow,Just create a structure with both root and sub nodes as 0-unbounded.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.