cancel
Showing results for 
Search instead for 
Did you mean: 

Mapping question

Former Member
0 Kudos

I have the following source structure and would like to target as follows

Source: x_MT

<?xml version="1.0" encoding="UTF-8"?>

<ns:x_MT xmlns:ns68="urn:abc.com/IAM">

<Header>

<Label>H1</Label>

<str>00</str>

</Header>

<Item>

<Label>L1</Label>

<str>01</str>

</Item>

<Address>

<Label>N1</Label>

<str>abc</str>

</Address>

<Item>

<Label>L1</Label>

<str>02</str>

</Item>

<Address>

<Label>N1</Label>

<str>abcd</str>

</Address>

</ns:x_MT>

Target: y_MT

<?xml version="1.0" encoding="UTF-8"?>

<ns:y_MT xmlns:ns68="urn:abc.com/IAM">

<Header>

<Label>H1</Label>

<str>00</str>

</Header>

<Detail>

<Item>

<Label>L1</Label>

<str>01</str>

</Item>

<Address>

<Label>N1</Label>

<str>abc</str>

</Address>

<Item>

<Label>L1</Label>

<str>02</str>

</Item>

<Address>

<Label>N1</Label>

<str>abcd</str>

</Address>

</Detail>

</ns:y_MT>

What should be mapped to node - Detail. Detail has 1:unbounded occurrences. I tried node funtion splitByValue and ended up with 2 items followed by 2 address elements. I'm a little confused. We are on SP12 and I've seen some new functions in SP14 or SP15. Is it possible?

thank you,

Parimala

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi,

Does Item and address fields always coming in sync?

like after item addrs is coming.

If yes than map detail node to either item of addrs by changing the context to root node.

If not than you have to see among item and addrs which node you want to map with. based on that your target detail node would be created.

dont forget to change the context of source node (item or addr) to root i.e x_MT

Hope it helps,

Satish

Former Member
0 Kudos

Satish,

I'm afraid I don't follow some of what you are saying. To your question on Does item and address fields occurring in sync. Yes they do.

I tried collapse context, followed by splitByValue(for each) and remove context at the Detail node mapping it to line item which shows the pattern occurrence.....meaning a new Item after every address but then I ended up with only one item.

Any help or suggestions?

thank you,

Parimala

Former Member
0 Kudos

Hi Parimala,

I can see the problem is solved in front of the thread.

Anyways,

I tried this scenarion , all you ahve to do is either map address or item node from source to detail node target.

Since Item/Address node is directly under root node so no context handling is required.

From your source message i can assume the occurence of item node and address node is 1..N. and so as the Detail node in target.

Sice address or item is also 1..N and detail node is also 1...N, if you map these nodes multiple detail nodes are created for multiple source item/address nodes.

It is just 1:1 mapping for other data items.

Hope this time I have not confused you.

Regards,

satish