Former Member

# parent node mapping

Hi

During message mapping normally we do element to element mapping. But could you please tell me when we will go for root node to root node mapping ??

Is it like that when the target root node's cardinality is greater than 1 we will go for root node mapping. Are there any other situations where we will go for root node mapping ?

thanks

kumar

10|10000 characters needed characters exceeded

### Related questions

Former Member
Posted on Jun 08, 2007 at 05:42 AM

Hi Kumar

We can have the root node mapping in the following cases:

1. If we have a field on the target side that needs to occur as per the business requirement but the root parent node is optional i.e. with occurance 0...n, then we can map the target root node to an empty constant so as to make it occur.

2. If we have a source field that can occur many number of times at runtime and we have the corresponding target field that occurs only once at runtime but it's parent node can occur same number of times as of the source field then in that case we map the target parent node to the source field with the following condition as if the source field exist create the target parent node.

I think that it helps you with some scenarios.

Amit

10|10000 characters needed characters exceeded
• Former Member
Posted on Jun 08, 2007 at 04:50 AM

>>>Is it like that when the target root node's cardinality is greater than 1 we will go for root node mapping.?

Not necessarily

You can also map the root nodes if the cardinality of the target is just 1

regards

krishna

10|10000 characters needed characters exceeded
• Former Member Former Member

Hi Kumar,

If your Target Root Node is optional (i.e., 0..unbounded like that) and some child elements of that root node are mandatory, then we have to map the root node.

And also, if the target root node minimum occurance is not equal to maximum occurance, then the root node should be mapped.

If target root node occurance is 1..1, then no need of mapping, because it occures once without mapping.

Regards,

Jyothi.

• Former Member
Posted on Jun 08, 2007 at 05:06 AM

Hi,

Check this if helps:

/people/harrison.holland5/blog/2006/12/08/mapping-context-changes-in-xi

Regards,

Subhasha

10|10000 characters needed characters exceeded
• Former Member
Posted on Jun 08, 2007 at 05:48 AM

Hi Kumar

I have left another case.

In case we have a target field that is being mapped to a constant or to a source field and the occurance of the root parent node is x...y where x<y, then we should map the root target node else we can get the following error on execution:-

target node with occurance min!=max and without mapping.

Amit