I have an XML document in MarkLogic with namespace 1.Now I would like to copy a node from it and paste it in another document that lives in namespace 2.
I have written a function to get this piece of data (the node) out of a document. The function returns a node inside document 2 that lives in namespace 1.
I want this node to also be in the same namespace as the root document.
Can I strip a node from its namespace? And then insert it in another doc? Any other procedure to get the desired result?
Here my result, notice the root namespace is different from the category elements namespace...
<wijk id="1027K01" xmlns="http://www.nvsp.nl/wijk">
<meta-data>
<!--Generated by DIKW for NetwerkVSP STT!P -->
<version>0.4</version>
<dateCreated>2015-02-22+01:00</dateCreated>
</meta-data>
<category name="Geografie" xmlns="http://www.cendris.nl/postcode">
<variable name="Postcode">
<segment name="6 positie postcode">1027AA</segment>
<segment name="5 positie postcode">1027A</segment>
<segment name="4 positie postcode">1027</segment>
</variable>
<variable name="Gemeente">
<segment name="Gemeentecode">363</segment>
<segment name="Gemeentenaam">Amsterdam</segment>
</variable>
<variable name="Plaats">
<segment name="Plaatsnaam">AMSTERDAM</segment>
</variable>
<variable name="Provincie">
<segment name="Provinciecode">27</segment>
<segment name="Provincienaam">Noord-Holland</segment>
</variable>
<variable name="Cebuco">
<segment name="Cebuco naam">(21) Amsterdam-Purmerend</segment>
<segment name="Cebuco code">21</segment>
</variable>
<variable name="Bible Belt">
<segment name="nauwelijks">100</segment>
<segment name="enigszins">0</segment>
<segment name="redelijk sterk">0</segment>
<segment name="sterk">0</segment>
<segment name="zeer sterk">0</segment>
</variable>
<variable name="Urbanisatiegraad">
<segment name="Zeer sterk stedelijk">100</segment>
<segment name="Sterk stedelijk">0</segment>
<segment name="Matig stedelijk">0</segment>
<segment name="Weinig stedelijk">0</segment>
<segment name="Niet stedelijk">0</segment>
</variable>
</category>
</wijk>