Skip to Main Content

Integration

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Handling Nested for loops in transformation XSLT

801667Jan 3 2013 — edited Feb 26 2020
Hi,
I want to handle nested for each loops inside the transformation sheet.
I have two source collections and one target collection.
I have to Lookup the key value in source1 in source2 and if the key is found, i have to map value to target and if the key is not found, i want to may the key itself to target.

Below are the sample input and expected outputs from the transformation sheet. Please help in transforming to the required format.

Input
----------------------
------------------------
<Source1Collection>
<Group1>
<Key> a </Key>
<Value> i </Value>
</Group1>
<Group2>
<Key> b </Key>
<Value> ii </Value>
</Group2>
<Group3>
<Key> c </Key>
<Value> iii </Value>
</Group3>
</Source1Collection>
---------------------------------------
<Source2Collection>
<Feild1> z </Feild1>
<Feild1> x </Feild1>
<Feild1> c </Feild1>
<Feild1> v </Feild1>
<Feild1> b </Feild1>
</Source2Collection>
----------------------------------------

Output
--------------------------------------
--------------------------------------
<TargetCollection>
<Field1>a</Feild1>
<Field1>b</Feild1>
<Field1>iii</Feild1>
</TargetCollection>
This post has been answered by vladodias on Jan 6 2013
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Feb 4 2013
Added on Jan 3 2013
5 comments
1,495 views