Last active
December 12, 2015 04:08
-
-
Save darrelmiller/4711532 to your computer and use it in GitHub Desktop.
Convert attributes to elements throughout a document
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
<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="{name()}"><xsl:value-of select="."/></xsl:element> | |
</xsl:template> | |
<xsl:template match="/ | @* |node()"> | |
<xsl:copy> | |
<xsl:apply-templates select="* | @* | node()"/> | |
</xsl:copy> | |
</xsl:template> | |
</xsl:stylesheet> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment