Skip to Content
0
Former Member
Jan 26, 2011 at 05:58 PM

Context mapping issue

40 Views

Hi experts,

I have a problem working with contexts in my graphical mapping.

In the source message I have two separeted unbounded structures, but they have to be together in the ouput (one inside the other). The nodes must be joined using a key (number).

I wanted to ask you if you jnow a way to do this using graphical mapping in PI 7.1. I know how to do it with a Java mapping, but I need to avoid that way if it's possible.

Let me show you examples so you can understand it better.

This is my source message:

<input>

<item>

<number>1</number>

<text>abc</text>

</item>

<item>

<number>2</number>

<text>def</text>

</item>

<price_item>

<number>1</number>

<price>1.50</price>

</price_item>

<price_item>

<number>1</number>

<price>3.0</price>

</price_item>

<price_item>

<number>2</number>

<price>5.0</price>

</price_item>

</input>

And this is the expected output, using those values:

<output>

<item>

<number>1</number>

<text>abc</text>

<price_item>

<number>1</number>

<price>1.50</price>

</price_item>

<price_item>

<number>1</number>

<price>3.0</price>

</price_item>

</item>

<item>

<number>2</number>

<text>def</text>

<price_item>

<number>2</number>

<price>5.0</price>

</price_item>

</item>

</output>

Thank you in advance,

LUIS B.