]> granicus.if.org Git - docbook-dsssl/commitdiff
Support template to find out if there are more columns in the current row of a table
authorNorman Walsh <ndw@nwalsh.com>
Sat, 12 Apr 2003 21:17:33 +0000 (21:17 +0000)
committerNorman Walsh <ndw@nwalsh.com>
Sat, 12 Apr 2003 21:17:33 +0000 (21:17 +0000)
xsl/common/table.xsl

index 416d346f76a0b68884e999233f19cb91da51a2d1..4d4b58d90b4bbf48e093656f1de70664dd64f12b 100644 (file)
   </xsl:if>
 </xsl:template>
 
+<!-- Modified versions of finaltd and sfinaltd, return a non-empty string -->
+<!-- if there are more table cells in this row -->
+
+<xsl:template name="has-more-td">
+  <xsl:param name="spans"/>
+  <xsl:param name="col" select="0"/>
+
+  <xsl:if test="$spans != ''">
+    <xsl:choose>
+      <xsl:when test="starts-with($spans,'0:')">
+        <xsl:text>X</xsl:text>
+      </xsl:when>
+      <xsl:otherwise></xsl:otherwise>
+    </xsl:choose>
+
+    <xsl:call-template name="has-more-td">
+      <xsl:with-param name="spans" select="substring-after($spans,':')"/>
+      <xsl:with-param name="col" select="$col+1"/>
+    </xsl:call-template>
+  </xsl:if>
+</xsl:template>
+
 <xsl:template name="entry.colnum">
   <xsl:param name="entry" select="."/>