cancel
Showing results for 
Search instead for 
Did you mean: 

What is Context Change

Former Member
0 Kudos

Hi

experts plz tell me what is context change

Accepted Solutions (0)

Answers (5)

Answers (5)

Former Member
0 Kudos

thanq

former_member193376
Active Contributor
0 Kudos

Hi

Context : Context of an element is nothing but just the level, where

the XML tag appears in the given XML

document. Level of any element is set to the immediate parent node by

default.

Context Change : Context change is just changing the level of XML

tag(element level in XSD) in the XML document.

This means when we map one source field to one target field then that

both field segments should be at same

level.

Example

The reason that context changes can occur in mapping is because sometimes you want to manipulate the structure of the message that's being transferred between systems. For example, lets say you have a message being sent from one system as an XML file, and the structure looks similar to the following:

code

<header>

<field1></field1>

<field2></field2>

</header>

[/code]

However, the system that the message is being sent to has a requirement that each field be split into individual <header> format (I know, this is not a real world example), then you want to use context changes to make the format look something like this instead:

code

<header>

<field1></field1>

</header>

<header>

<field2><field2>

</header>

[/code]

Essentially, you use context mapping when your requirements ask you to change the structure of the XML message, not just strictly apply transformations to each field. You can also check this blog that incorporates user-defined functions for advanced context changes:

/people/sravya.talanki2/blog/2005/12/08/message-mapping-simplified-150-part-ii

Hope this info is useful to you..

Thanks

Saiyog

Edited by: Saiyog Gonsalves on Aug 1, 2008 10:00 AM

Former Member
0 Kudos

Context Changing is just changing the level of XML tag (element level in the XSD) in the XML document or It is just the flexibility provided by XI for changing the XSD of the XML document at the runtime.

refer

santhosh_kumarv
Active Contributor
0 Kudos

Hi,

Context change deals with converting the hierarchical versionsin the message mapping.

Thanks

SaNv...

Former Member
0 Kudos

Context : Context of an element is nothing but just the level, where

the XML tag appears in the given XML

document. Level of any element is set to the immediate parent node by

default.

Context Change : Context change is just changing the level of XML

tag(element level in XSD) in the XML document.

This means when we map one source field to one target field then that

both field segments should be at same

level.

check them

/people/sravya.talanki2/blog/2005/12/08/message-mapping-simplified-150-part-ii

Ex:

<root>

<header name=u201CA">

<item>A.one</item>

<item>A.two</item>

<item>A.three</item>

</header>

<header name="B">

<item>B.one</item>

<item>B.two</item>

</header>

</root>

Here Context item, header and root are the different contexts for A.one. If you used display queue in your mapping it will separte all contexts by a dark line.

If you want to combile both A and B you have to change the context to removing context.

If there is duplication of A.one,A.two,A.three you have to change context to header(by default it is item level).This you can achieve in message mapping.

Suppose you have one element in source and you have to map to multiple elements in target. then split the context and send to target.

Regards