cancel
Showing results for 
Search instead for 
Did you mean: 

Mapping insight required !

Former Member
0 Kudos

Hello All, Simple mapping q for u.

SOURCE:

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

<ns0:source1a xmlns:ns0="urn://maptest">

<city>

<street>

<person>1a</person>

<person>1b</person>

<person>1c</person>

</street>

<street>

<person>2a</person>

<person>2b</person>

<person>2c</person>

</street>

</city>

<city>

<street>

<person>3a</person>

<person>3b</person>

<person>3c</person>

</street>

<street>

<person>4a</person>

<person>4b</person>

<person>4c</person>

</street>

</city>

</ns0:source1a>

MAPPING:

/ns0:target1a=/ns0:source1a

/ns0:target1a/personList=/ns0:source1a/city/street/person

/ns0:target1a/personList/person=/ns0:source1a/city/street/person

After the map runs, the target produced is as follows:

TARGET:

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

<ns0:target1a xmlns:ns0="urn://maptest">

<personList><person>1a</person></personList>

<personList><person>2a</person></personList>

<personList><person>3a</person></personList>

</ns0:target1a>

The question is why does the map test produce 3 elements; why not 4a also ? Even if I add a 5a,5b,5c in the source, it still produces only 3 elements in the target.

I have looked at the queues, but the queues all match (and contain all the elements). Obviously I'm missing something simple. Could someone point this out for me. Thanks.

Ciao, Bhishma

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

In the source, City, Street & Person are '1..unbounded'.

In the target, PersonList is 1..unbounded while Person is 1..1.

Why would this cause the unusual result; what is xi thinking internally ?

former_member206604
Active Contributor
0 Kudos

Hi,

Try chaning the context to City level. And you can also try using SplitByValue with the context set to City level.

Thanks,

Prakash

Former Member
0 Kudos

Hello Prakash, Thanks I did that, but the results are still the same.

The map still only outputs 3 values.

So rather than changing things to get it to map all the entries, I'm trying to understand 'why' it does '3' values.

What is there in the 'queue/other' mapping mechanism that causes it to output only 3 values for this scenario ?

Ciao, Anand

former_member206604
Active Contributor
0 Kudos

Hi,

Just for a try do this and let me know the result.

Try removing the <street> noe and have the persons directly under <city> lets see what happens.

Thanks,

Prakash

Shabarish_Nair
Active Contributor
0 Kudos

Chk occurance for personList

is it 0-unbounded ???