cancel
Showing results for 
Search instead for 
Did you mean: 

XSLT Mapping for Namespace Prefix replacement

former_member210091
Participant
0 Kudos

Hey All,

I have below XML:


<?xml version="1.0" encoding="UTF-8"?>
<ns0:OrderChange ns0:transactionPurposeIndicator="Change" xmlns:ns0="http://www.api.org/pidXML">
<ns0:OrderChangeProperties>
<ns0:OrderChangeNumber>1</ns0:OrderChangeNumber>
<ns0:OrderChangeDate>2009-10-19</ns0:OrderChangeDate>
</ns0:OrderChangeProperties>
</ns0:OrderChange>

And i need to convert it to below format:


<?xml version="1.0" encoding="UTF-8"?>
<pidx:OrderChange pidx:transactionPurposeIndicator="Change"   xmlns:pidx="http://www.api.org/pidXML" xmlns="http://www.api.org/pidXML" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.api.org/pidXML Z:\integration\trunk\schemas\pidx\OrderChange_1-2.xsd">
<pidx:OrderChangeProperties>
<pidx:OrderChangeNumber>1</pidx:OrderChangeNumber>
<pidx:OrderChangeDate>2009-10-19</pidx:OrderChangeDate>
</pidx:OrderChangeProperties>
</pidx:OrderChange>

Can someone please let me know the XSLT Mapping to achieve this. I have tried searching on the forum but haven't found much help.

Appreciate your help.

Thanks

Accepted Solutions (0)

Answers (3)

Answers (3)

0 Kudos

Hi Saif,

Is there any specific reason for using only XSLT mapping.

If it is fine to use any other approach you can check below blog for changing the namespace with adapter module,

Regards,

Sudha

Harish
Active Contributor
0 Kudos
former_member184720
Active Contributor
0 Kudos

Make use of the XSLT provided in the below thread -