Created
June 26, 2013 07:54
-
-
Save matejskubic/5865576 to your computer and use it in GitHub Desktop.
change xml node namespace with xslt/xsl
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8"?> | |
<xsl:stylesheet | |
version="1.0" | |
xmlns:xsl="http://www.w3.org/1999/XSL/Transform" | |
xmlns:old="http://something/old/" | |
xmlns:new="http://something/new/"> | |
<xsl:template match="node()|@*"> | |
<xsl:copy> | |
<xsl:apply-templates select="node()|@*"/> | |
</xsl:copy> | |
</xsl:template> | |
<xsl:template match="old:*"> | |
<xsl:element name="{local-name()}" xmlns="http://something/new/" > | |
<xsl:apply-templates select="node()|@*"/> | |
</xsl:element> | |
</xsl:template> | |
</xsl:stylesheet> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thanks.