<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:ss="urn:schemas-microsoft-com:office:spreadsheet"
>
<xsl:output method="xml" omit-xml-declaration="yes" indent="yes" />
<xsl:template match="/">
<xsl:apply-templates select="ss:Workbook"/>
</xsl:template>
<xsl:template match="ss:Workbook">

<districts>
<xsl:apply-templates select="ss:Worksheet[@ss:Name = 'tompkinsElectDists']"/>
</districts>

</xsl:template>
<xsl:template match="ss:Worksheet">
<xsl:apply-templates select="ss:Table" />
</xsl:template>
<xsl:template match="ss:Table">
<xsl:apply-templates select="ss:Row[position( ) &gt; 1]" />
</xsl:template>
<xsl:template match="ss:Row">
<dist>
<distID><xsl:apply-templates select="ss:Cell[1]" /></distID>
<distName><xsl:apply-templates select="ss:Cell[2]" /></distName>
<bush><xsl:apply-templates select="ss:Cell[3]" /></bush>
<kerry><xsl:apply-templates select="ss:Cell[4]" /></kerry>
<bushPercent><xsl:apply-templates select="ss:Cell[5]" /></bushPercent>
<kerryPercent><xsl:apply-templates select="ss:Cell[6]" /></kerryPercent>
<red><xsl:apply-templates select="ss:Cell[7]" /></red>
<blue><xsl:apply-templates select="ss:Cell[8]" /></blue>
<winner><xsl:apply-templates select="ss:Cell[9]" /></winner>
</dist>
</xsl:template>
</xsl:stylesheet>
