<?xml version="1.0" encoding="iso-8859-1"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
  <xsl:output encoding="iso-8859-1" indent="yes" method="xml" version="1.0"/>

  <!-- copy all nodes to output, but transform attributes to child elements -->
  <xsl:template match="node()">
    <xsl:copy>
      <xsl:for-each select="attribute::*">
        <xsl:element name="{name()}"><xsl:value-of select="."/></xsl:element>
      </xsl:for-each>
      <xsl:apply-templates select="child::node()"/>
    </xsl:copy>
  </xsl:template>

</xsl:stylesheet>
