Using biztalk mapper, I need a target node to be duplicated.. I have created a simplified version of my issue. Please see below map link for source and destination schema... Ooopps sorry, not enough points to post images..
I need the target Option node to be duplicated for each OptionNotes. The value of OptionNotes is to be split by a pipe ("|"), then map to target Code and Description.
The input is as below:
<ns0:Source xmlns:ns0="http://Test.SOAP.Source1">
<Option>
<OptionID>ID0_NoNotes</OptionID>
<OptionName>OptionName_0</OptionName>
</Option>
<Option>
<OptionID>ID1_NoNotes</OptionID>
<OptionName>OptionName_1</OptionName>
<OptionNotes>NOTE1|BLAH1</OptionNotes>
<OptionNotes>NOTE2|BLAH2</OptionNotes>
</Option>
</ns0:Source>
The output should be as below:
<Destination>
<Options>
<Option>
<Code>ID0_NoNotes</Code>
<Description>OptionName_0</Description>
</Option>
<Option>
<Code>ID1_NoNotes</Code>
<Description>OptionName_1</Description>
</Option>
<Option>
<Code>NOTE1</Code>
<Description>BLAH1</Description>
</Option>
<Option>
<Code>NOTE2</Code>
<Description>BLAH2</Description>
</Option>
</Options>
</Destination>
Tried to use Looping and combination with Value Mapping, but to no avail. Do I have to resort to inline xslt?