Skip to Content
0
Former Member
Mar 01, 2007 at 03:57 PM

Simple message mapping question

12 Views

Hi all,

I have a simple mapping requirement below:

Source Structure:

<ns0:MT_RON1 xmlns:ns0="urn:fapl:ron:test:ns1">

<name>name</name>

<address/>

<option1/>

<contactInfo>

<addr_seq>002</addr_seq>

<phone>a</phone>

</contactInfo>

<contactInfo>

<addr_seq>001</addr_seq>

<phone>a</phone>

</contactInfo>

</ns0:MT_RON1>

Occurence Info:

<name>: 1

<address>: 0..1

<contactInfo> 0..Unbounded

<addr_seq>: 0..1

<phone>: 0..1

My requirement is if <contactInfo\addr_seq = 001, map <phone> to a target node.

In java this is achieved by a simple looping through the elements in <contactInfo> and check if <addr_seq> == 001 and <addr_seq> exists, and mapping the phone number.

How can I achieve the same in the message mapping using the functions available in XI?

Please help.

Thanks.

Ron