on 05-09-2006 2:31 PM
hi,
Need to map the Source to Target
Source:
<a>
<qualf>001</qualf>
<text>short-description</text>
<a>
<a>
<qualf>002</qualf>
<text>long-description</text>
<a>
<b>
<text1>tax language description</text1>
<email>email description</email>
</b>
Target:
<ext name="short-description">long-description</ext>
<ext name="Tax Language">tax language description</ext>
<ext name="Receiving Contact">email description</ext>
if a/qualf = '001' then i have to add the short-description to the /ext/name attribute as shown above
if a/qualf = '002' then i have to add the long-description to the /ext attribute as shown above
remaining two lines i have to hardcode the /ext/name attribute to "Receiving Contact" and "Tax Language" respectively and the description has to be
mapped to the /ext/name and /ext respectively.
I tried to use SplitByValue but i couldn't achieve the above result.
How can i achieve the above target?
Thanks,
Tirumal
Hi Tirumal,
Do you need both entries, short text <b>and</b> long text?
Then you have to duplicate the subtree. You need for nodes ext on target side.
The first node you apply:
qualf*
equalS
constant(001) / ifWithoutElse - ext
text* /
set context up one level.
the second ext the same with constant 002.
the third ext: apply text1.
the forth ext: apply email.
for the attributes name just apply constansts.
Regards
Stefan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Stefan -
The first node <ext> long description comes from Qualf -002 and the ext/name comes from short description from Qualf - 001.
In your solution you mentioned to create 2 <ext> nodes but we need to create only 1 <ext> node here.
Please check the sample i have given carefully.
Thanks,
Tirumal
User | Count |
---|---|
88 | |
10 | |
10 | |
9 | |
7 | |
7 | |
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.