<?xml version="1.0" ?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
	<xsl:output method="xml" indent="no" omit-xml-declaration="yes" />
	<xsl:variable name="headers" select="descendant::row[1]" />
	<xsl:template match="/">
		<items>
			<xsl:apply-templates select="descendant::row[position() &gt; 1]" />
		</items>
	</xsl:template>
	<xsl:template match="row">
		<item>
			<xsl:apply-templates />
		</item>
	</xsl:template>
	<xsl:template match="col">
		<xsl:variable name="text" select="."/>
		<xsl:if test="string-length($text) &gt; 0">
		<xsl:variable name="position" select="position()" />
		<xsl:element name="{translate($headers/col[$position],'ABCDEFGHIJKLMNOPQRSTUVWXYZ','abcdefghijklmnopqrstuvwxyz')}">
			<xsl:apply-templates />
		</xsl:element>
		</xsl:if>
	</xsl:template>	
</xsl:stylesheet>