on 08-01-2008 7:43 AM
Hi
experts plz tell me what is context change
thanq
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Context change deals with converting the hierarchical versionsin the message mapping.
Thanks
SaNv...
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.