Looks to me as if you need something like this:
<xsl:template match="Row">
<tr>
<xsl:apply-templates select="Cell"/>
</tr>
</xsl:template>
<xsl:template match="Cell">
<xsl:variable name="latestColspan" select="preceding-sibling::Cell[@colspan][1]"/>
<xsl:if test="not($latestColspan and count($latestColspan/preceding-sibling::Cell + $latestColspan/@colspan) > count(current()/preceding-sibling::Cell))">
<td>
<xsl:copy-of select="@colspan"/>
<xsl:apply-templates/>
</td>
</xsl:if>
</xsl:template>
As always, the answer is to stop thinking algorithmically, and try to think of the output as a function of the input: "how can I decide by looking at the input whether the current cell should be output or not?"
Michael Kay
http://www.saxonica.com/
Author, XSLT Programmer's Reference and XPath 2.0 Programmer's Reference