xml source
<?xml version="1.0" encoding="UTF-8"?>
<table>
<column type="string"/>
<column type="long"/>
<column type="date"/>
</table>
stylesheet
<?xml version="1.0" ?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="/table/column">
<row>
<xsl:attribute name="type">
<xsl:value-of select="@type"/>
</xsl:attribute>
<xsl:attribute name="name">
<xsl:value-of select="@type"/>
</xsl:attribute>
</row>
</xsl:template>
</xsl:stylesheet>
output
<?xml version="1.0" encoding="UTF-8"?>
<row type="string" name="string"/>
<row type="long" name="long"/>
<row type="date" name="date"/>