How to remove xmlns attributes

How to remove xmlns attributes in html out put via copy-of

Yippie friggin doo da! I found this xsl script that strips namespaces and prefixes out of an xml document. This is going to be very useful in some Biztalk 2004 transformations that I doing.

This is what I ended up with:

<?xml version=”1.0″ encoding=”UTF-8″ ?>
<xsl:stylesheet version=”1.0″ xmlns:xsl=””&gt;
<xsl:template match=”*”>
<!– remove element prefix (if any) –>
<xsl:element name=”{local-name()}”>
<!– process attributes –>
<xsl:for-each select=”@*”>
<!– remove attribute prefix (if any) –>
<xsl:attribute name=”{local-name()}”>
<xsl:value-of select=”.” />
<xsl:apply-templates />


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s