I need to extract an XML out of an envelope. But I am not able to get my intended output. I need to get rid of the namespaces in my output.
My Input:
<ns1:input xmlns:ns1="http://mysapmle.org/" xmlns="http://othersample.org/">
<sample>
<inner tc="5">Test</inner>
<routine>Always</routine>
</sample>
</ns1:input>
My Expected Output:
<sample>
<inner tc="5">Test</inner>
<routine>Always</routine>
</sample>
My Actual Output:
<sample xmlns="http://othersample.org/">
<inner tc="5">Test</inner>
<routine>Always</routine>
</sample>
My XSLT:
<xsl:output omit-xml-declaration="yes" indent="yes" />
<xsl:template match="/">
<xsl:copy copy-namespaces="no">
<xsl:apply-templates select="//sample" />
</xsl:copy>
</xsl:template>
<xsl:template match="@*|node()">
<xsl:copy copy-namespaces="no">
<xsl:apply-templates select="@*|node()" />
</xsl:copy>
</xsl:template>
Please help.