<xsl:param name="spans"/>
- <xsl:variable name="cellgi">
- <xsl:choose>
- <xsl:when test="ancestor::thead">th</xsl:when>
- <xsl:when test="ancestor::tfoot">th</xsl:when>
- <xsl:when test="ancestor::tbody and
- (ancestor::table[@rowheader = 'firstcol'] or
- ancestor::informaltable[@rowheader = 'firstcol']) and
- ancestor-or-self::entry[1][count(preceding-sibling::entry) = 0]">
- <xsl:text>th</xsl:text>
- </xsl:when>
- <xsl:otherwise>td</xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
-
<xsl:variable name="empty.cell" select="count(node()) = 0"/>
<xsl:variable name="named.colnum">
</xsl:call-template>
</xsl:variable>
+ <xsl:variable name="cellgi">
+ <xsl:choose>
+ <xsl:when test="ancestor::thead">th</xsl:when>
+ <xsl:when test="ancestor::tfoot">th</xsl:when>
+ <xsl:when test="ancestor::tbody and
+ (ancestor::table[@rowheader = 'firstcol'] or
+ ancestor::informaltable[@rowheader = 'firstcol']) and
+ $entry.colnum = 1">
+ <xsl:text>th</xsl:text>
+ </xsl:when>
+ <xsl:otherwise>td</xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+
<xsl:variable name="rowsep">
<xsl:choose>
<!-- If this is the last row, rowsep never applies. -->