Skip to content

Instantly share code, notes, and snippets.

Last active Dec 12, 2015
What would you like to do?
Convert attributes to elements throughout a document
<xsl:stylesheet version="1.0" xmlns:xsl="">
<xsl:output method="xml" indent="yes"/>
<xsl:template match="@*">
<xsl:element name="{name()}"><xsl:value-of select="."/></xsl:element>
<xsl:template match="/ | @* |node()">
<xsl:apply-templates select="* | @* | node()"/>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment