cancel
Showing results for 
Search instead for 
Did you mean: 

Mapping problem

Former Member
0 Kudos

Hi guys!

I face following mapping problem:

my source structure is like:

<mt>

<recordset>

<item>

<hx>1</hx>

</item>

<item>

<hx>1</hx>

</item>

</recordset>

<recordset>

<item>

<hx>2</hx>

</item>

<item>

<hx>2</hx>

</item>

<item>

<hx>2</hx>

</item>

</recordset>

<recordset>

<item>

<hx>3</hx>

</item>

</recordset>

<recordset>

<item>

<hx>4</hx>

</item>

<item>

<hx>4</hx>

</item>

</recordset>

</mt>

and need to map it to structure:

<vre> (occ 1..1)

<mt2> (occ 0..n)

<str> (occ 0..10)

<value>1</value> (occ 0..1)

</str>

</mt2>

<mt2>

<str>

<value>2</value>

</str>

</mt2>

<mt2>

<str>

<value>3</value>

</str>

</mt2>

</vre>

Value of hx in source structure is always the same in each recordset.

I tried to map recordset->mt2 (it was ok), produced correct number of target nodes. Then I mapped constant to <str> to produce always only 1 node and finally <hx> to <value>. But this produced like the following:

<vre> (occ 1..1)

<mt2> (occ 0..n)

<str> (occ 0..10)

<value>1</value> (occ 0..1)

</str>

</mt2>

<mt2>

<str>

<value>1</value>

</str>

</mt2>

<mt2>

<str>

<value>2</value>

</str>

</mt2>

</vre>

....

It didn't take values from each recordset, but like in order.

Any ideas, how to solve my prob?

Thanx a lot!

Olian

Accepted Solutions (1)

Accepted Solutions (1)

former_member192892
Active Contributor
0 Kudos

MAP recordset----->mt2

MAP some constant----->str

MAP hx--->removeContext->splitbyvalue[value changed]-->value

Thanks

Varun

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi,

mt2 for this grp used

hx ->removecontext-->SplitbyValue(vale changed)--> Collapsecontext->mt2

hx ->removecontext-->SplitbyValue(vale changed)--> Collapsecontext->SplitbyValue[each value]->value

Give your result.

Thanks

Shubhankar