mylesac6
asked on
Concatenate two fields in XML
I need to concatenate two fields into one . I need to get Address2 and Address 3 into the Address2 field. Is there an easy way to do this with XSL
<field name="LINE_1" alias="LINE_1" type="0" size="40" screenviewtype="0">
<id>13</id>
<fename>Address 1</fename>
<key>13Recipient</key>
<fetype>0</fetype>
<fesize>35</fesize>
<category>Recipient</category>
<fegroup>Address</fegroup>
<customdefaultvalue>NO</customdefaultvalue>
<shipmentlevel>.Recipient.Address1</shipmentlevel>
<packagelevel>.Recipient.Address1</packagelevel>
</field>
<field name="LINE_2" alias="LINE_2" type="0" size="40" screenviewtype="0">
<id>14</id>
<fename>Address 2</fename>
<key>14Recipient</key>
<fetype>0</fetype>
<fesize>35</fesize>
<category>Recipient</category>
<fegroup>Address</fegroup>
<customdefaultvalue>NO</customdefaultvalue>
<shipmentlevel>.Recipient.Address2</shipmentlevel>
<packagelevel>.Recipient.Address2</packagelevel>
</field>
<field name="LINE_3" alias="LINE_3" type="0" size="40" screenviewtype="0">
<id>15</id>
<fename>Address 3</fename>
<key>15Recipient</key>
<fetype>0</fetype>
<fesize>35</fesize>
<category>Recipient</category>
<fegroup>Address</fegroup>
<customdefaultvalue>NO</customdefaultvalue>
<shipmentlevel>.Recipient.Address3</shipmentlevel>
<packagelevel>.Recipient.Address3</packagelevel>
</field>
ASKER
Hi Gertone
The XML sample I included populates a form with address information. The Form does not have an address3 field and the address3 field cannot be added because of business rules. I want to add the address3 info to the address2 info for one field. I have attached the entire XML file for you to view. Hope this helps to understand what I am looking for.
Thanks
ScriptMedImport.txt
The XML sample I included populates a form with address information. The Form does not have an address3 field and the address3 field cannot be added because of business rules. I want to add the address3 info to the address2 info for one field. I have attached the entire XML file for you to view. Hope this helps to understand what I am looking for.
Thanks
ScriptMedImport.txt
so this is your source.
Please post an example of the expected result
Please post an example of the expected result
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Sorry for delay. It tooka while to get back to this customer to test the solution.
Thank you very much.
Thank you very much.
That is a stylesheet with one template that copies the input exactly to the output.
To that identity copy then a specialisation template is added to do the merging.
Usually a third template is added for removing the merged node from its original location
It is entirely unclear to me what you want. So please give me an example of the output you want.
I have made an example of the three templates mentioned above.
Maybe you can start building from there
Open in new window