Skip to content

Instantly share code, notes, and snippets.

@PrabhaAnde
Last active August 1, 2017 16:37
Show Gist options
  • Save PrabhaAnde/cdf5bf274c19bb26428a99e64903754e to your computer and use it in GitHub Desktop.
Save PrabhaAnde/cdf5bf274c19bb26428a99e64903754e to your computer and use it in GitHub Desktop.
Remove extra namespace getting transformed to target XML.
<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="xml" indent="yes"/>
<xsl:template match="*">
<xsl:element name="{local-name(.)}">
<xsl:apply-templates select="@* | node()"/>
</xsl:element>
</xsl:template>
<xsl:template match="@*">
<xsl:attribute name="{local-name(.)}">
<xsl:value-of select="."/>
</xsl:attribute>
</xsl:template>
</xsl:stylesheet>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment