Created
June 12, 2012 07:57
-
-
Save yamanyar/2915997 to your computer and use it in GitHub Desktop.
Use scoped default namespaces
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'?> | |
<!-- Kaan Yamanyar, 6/10/2012 --> | |
<xsl:stylesheet | |
xmlns:xsl="http://www.w3.org/1999/XSL/Transform" | |
xmlns:alfa="http://test1.com" | |
xmlns:beta="http://yesy2.com" | |
exclude-result-prefixes="alfa beta" | |
version="2.0"> | |
<xsl:template match="@* | node()"> | |
<xsl:copy> | |
<xsl:apply-templates select="@* | node()"/> | |
</xsl:copy> | |
</xsl:template> | |
<xsl:template match="alfa:* | beta:*"> | |
<xsl:element name="{local-name()}" namespace="{namespace-uri(.)}"> | |
<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