One to One XSLT map with namespace manipulations

Posted by ohadinho on Stack Overflow See other posts from Stack Overflow or by ohadinho
Published on 2013-07-01T09:55:11Z Indexed on 2013/07/01 10:21 UTC
Read the original article Hit count: 292

Filed under:
|

I have the following xml:

<ns0:Root xmlns:ns0="http://root" xmlns:nm="http://notroot">
  <nm:MSH>
    <content>bla</content>
  </nm:MSH>
  <ns0:Second>
    <ns0:item>aaa</ns0:item>
  </ns0:Second>
  <ns0:Third>
    <ns0:itemb>vv</ns0:itemb>
  </ns0:Third>
</ns0:Root>

That is my expected result:

<Root xmlns="http://root" xmlns:nm="http://notroot">
  <nm:MSH>
    <content>bla</content>
  </nm:MSH>
  <Second>
    <item>aaa</item>
  </Second>
  <Third>
    <itemb>vv</itemb>
  </Third>
</Root>

I need to write an xslt 1.0 that perform that map.

I really doesn't have a clue how to do it, thus it seems pretty simple.

Can anyone please help ?

© Stack Overflow or respective owner

Related posts about xslt

Related posts about xslt-1.0