Skip to Content
0
Former Member
Dec 01, 2006 at 05:22 PM

Mapping doubt

32 Views

Dear SDN,

I am trying to create a message mapping but I'm having problems. The source is of the form:

Source(1..1)

Line (1..unbounded)

Key (1..1)

Val (1..1)

And target is of the form:

Target(1..1)

Id (1..1)

Name (1..1)

Age (1..1)

An example of source could be

<Source>

<Line>

<Key>Name</Key>

<Val>Angie</Val>

</Line>

<Line>

<Key>Id</Key>

<Val>1002</Val>

</Line>

<Line>

<Key>Age</Key>

<Val>25</Val>

</Line>

</Source>

Target result should be

<Target>

<Id>1002</Id>

<Name>Angie</Name>

<Age>25</Age>

</Target>

Note that the mapping is from an 1..unbounded node to an 1:1 node, also note that tuples Key,Val are not sorted just like Target needed.

Any Ideas?