on 05-31-2010 9:29 AM
Hi,
I have a mapping which throws an error. The problem is like below:
When I duplicate the ITEM node in the source structure I get an error for the target. The ITEM (target) contains fields of the header (source). Any Idea how to solve? The error says it cant generate field "y". (note: when I dont duplicate the ITEM (source) it works.)
source node:
ROOT
Header (1 to 1)
a
b
c
d
ITEM (1 to unbounded)
e
f
g
h
target node:
ROOT
HEADER (1 to 1)
x = a+b
ITEM (1 to unbounded)
y = c*d
Hi,
Please use "useOneAsMany" function to map target element 'y':
c*d(1 Argument)
ITEM(2 Argument)--
e(3 Argumnet)
Thanks
Amit
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
> When I duplicate the ITEM node in the source structure
How do you duplicate node in source and why?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi Stefan,
In the Source structure there can be more then 1 item node.
for example:
source:
header (always 1)
...
item
...
item
...
item
...
In the target. I have also one header and the item node as many items as there is in the source.
When I use test mapping, I duplicate the item node and test it. it throws an error. when I do not duplicate and use just one item it works.
> When I use test mapping, I duplicate the item node and test it. it throws an error. when I do not duplicate and use just one item it works.
I see. You are talking about test node.
How do you want to have the output of the mapping, when you have several item nodes in source?
Provide an example source XML and and example target XML that you want to achieve.
source:
ROOT
Header
name John
surname Walter
age 43
company ABC
ITEM
a ... (doenst matter in my case)
b ... (doenst matter in my case)
ITEM
a ... (doenst matter in my case)
b ... (doenst matter in my case)
target:
ROOT
Header
name John Walter
age 43
ITEM (this item field is assigned to the item field of the source, when the source item is more then one then this will duplicate as well)
a (if name is different the "0" than assign age (from header) to field "a") (if name is "John" then assign company from header to field "a")
ITEM
a (if name is different the "0" than assign age (from header) to field "a") (if name is "John" then assign company from header to field "a")
The problem is as said before. When I have one item in the source it works. when I have 2 item in the source it throws an error?
Edited by: Chris027 on May 31, 2010 11:22 AM
User | Count |
---|---|
84 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.