on 02-15-2009 12:08 PM
Hi All,
I am trying to achieve the following using the graphical mapping tool.
Source:
rows..................0-unbounded
.....indicator1......1-1
.....indicator2......1-1
.....indicator3......1-1
Target:
Attributes...........0-unbounded
.....constant............1-1
.....field...................1-1
Sample Source xml:
<rows>
....<indicator1>Blue</indicator1>
....<indicator2>Large</indicator2>
....<indicator3>Hot</indicator3>
</rows>
In the target structure, I want to create name value pairs where constant1 is assigned constant 'Colour' and field1 is assigned indicator1.
My issue is that in the target structure, I also want to create new name value pairs for each of the values in the source. This is illustrated in the target document example below:
<Attributes>
......<constant>"Constant"</constant>
......<field>indicator1</field>
</Attributes>
<Attributes>
......<constant>"Constant"</constant>
......<field>indicator2</field>
</Attributes>
<Attributes>
......<constant>"Constant"</constant>
......<field>indicator3</field>
</Attributes>
An example would be (using the sample values above):
<Attributes>
......<constant>Color</constant>
......<field>Blue</field>
</Attributes>
<Attributes>
......<constant>Size</constant>
......<field>Large</field>
</Attributes>
<Attributes>
......<constant>Wash</constant>
......<field>Hot</field>
</Attributes>
Can this be achieved in the graphical mapping tool before I turn to xslt?
Please help!
Regards,
JS
You can achive this using Value Mapping.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi - I have marked as helpful answer but I fear that I did not make it clear in my original question...
The JDBC fragment below needs to be converted to the XML fragment... I am having difficulty doing this in the graphical interface.
Thank you for your helpful answer up to now.
<?xml version="1.0" encoding="UTF-8"?>
<ns0:Debtor_JDBC xmlns:ns0="urn:finance">
<row>
<NO_BUNDLE>1</NO_BUNDLE>
<PROMPT_SHIP_TO>0</PROMPT_SHIP_TO>
</row>
</ns0:Debtor_JDBC>
<?xml version="1.0" encoding="UTF-8"?>
<MASTER>
<Debtors>
<Attributes>
<attributetype IsValueSet="1">1</attributetype>
<name IsValueSet="1">No Bundle</name>
<value IsValueSet="1">1</value>
</Attributes>
<Attributes>
<attributetype IsValueSet="1">1</attributetype>
<name IsValueSet="1">PromptForAddress</name>
<value IsValueSet="1">0</value>
</Attributes></Debtors>
</MASTER>
User | Count |
---|---|
82 | |
10 | |
10 | |
9 | |
6 | |
6 | |
5 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.