Skip to Content
Jul 04, 2012 at 04:42 PM

Removing namespace prefix using xslt mapping



I am working on a SOAP to proxy sync scenario and want to remove the namespace prefix in the response mapping as the sender system cannot accept namespace prefixes...

XMLanonymizer bean does not work in the sender soap adapter

Can anyone help with the XSLT code for removing the namespace prefix

Requirement –

Remove all namespace prefixes in the input xml ( it can be ns0 / ns1 etc )

Sample input –

<?xml version="1.0" encoding="UTF-8" ?>
<ns0:ORDERRESPONSE xmlns:ns0="" version="1.0">

Sample output –

<?xml version="1.0" encoding="UTF-8" ?>

<ORDERRESPONSE xmlns ="" >