XSLT 2.0 is a wonderful standard.
One of the very useful additions is the ability to control the copying of namespace attribute within the copy and copy-of functions.
However, you don't always have the opportunity to work with the latest and greatest standard.
Below is a set of XSLT templates that will copy an Element in it's entirely without dragging along the namespaces.
Here is an example of how to call the template to copy and element to the destination document.
The example creates an Destination Name call Data the contains all of the contents of the Source node XmlData.
<xsl:element name="Data">
<!—COPY CURRENT ELEMENT without Namespaces -->
<xsl:call-template name="copy-node" >
<xsl:with-param name="node" select="/XmlData" />
</xsl:call-template>
</xsl:element>
<!-- Copy Node: Primary Call -->
<xsl:template name="copy-node" >
<xsl:param name="node" />
<xsl:call-template name="copy-element" >
<xsl:with-param name="element" select="$node" />
</xsl:call-template>
</xsl:template>
<!--
Copy Element
Reprocesses Element in the output document:
Copies Attributes
Copies Text
Copies Child Nodes
-->
<xsl:template name="copy-element" >
<xsl:param name="element" />
<xsl:if test="$element" >
<xsl:element name="{name($element)}">
<!-- Copy Attributes -->
<xsl:call-template name="copy-attribute" >
<xsl:with-param name="attribute" select="$element/@*" />
</xsl:call-template>
<!-- Copy Text -->
<xsl:value-of select="$element/text()"/>
<!-- Copy Child Nodes -->
<xsl:for-each select="$element/*" >
<xsl:call-template name="copy-node" >
<xsl:with-param name="node" select="." />
</xsl:call-template>
</xsl:for-each>
</xsl:element>
</xsl:if>
</xsl:template>
<!-- Copy Attribute -->
<xsl:template name="copy-attribute" >
<xsl:param name="attribute" />
<xsl:if test="$attribute" >
<xsl:attribute name="{name($attribute)}">
<xsl:value-of select="$attribute" />
</xsl:attribute>
</xsl:if>
</xsl:template>