]> granicus.if.org Git - docbook-dsssl/commitdiff
Make border-collapse='collapse' explicitly (that's the only model that works for...
authorNorman Walsh <ndw@nwalsh.com>
Sun, 12 May 2002 11:13:26 +0000 (11:13 +0000)
committerNorman Walsh <ndw@nwalsh.com>
Sun, 12 May 2002 11:13:26 +0000 (11:13 +0000)
xsl/fo/formal.xsl
xsl/fo/table.xsl

index 0e49bc6f27bd9a1221489384ba7f160d6e5125d3..1f368278b995552e58d8893e4125556e967edc5f 100644 (file)
         <xsl:call-template name="formal.object.heading"/>
       </xsl:if>
 
-      <fo:table>
+      <fo:table border-collapse="collapse">
         <xsl:call-template name="table.frame"/>
         <xsl:if test="count($prop-columns) != 0">
           <xsl:attribute name="table-layout">fixed</xsl:attribute>
 
   <xsl:variable name="table.content">
     <fo:table id="{$id}"
+              border-collapse="collapse"
               xsl:use-attribute-sets="informal.object.properties">
       <xsl:call-template name="table.frame"/>
       <xsl:if test="count($prop-columns) != 0">
index b2c274e5f69fd1f24a364fc780c4d107bea081bb..5827f8b79ef4c86d3d5ffeec783cf712ce023d57 100644 (file)
@@ -79,72 +79,22 @@ to be incomplete. Don't forget to read the source, too :-)</para>
     </xsl:call-template>
   </xsl:variable>
 
-  <xsl:variable name="lastrow">
-    <xsl:choose>
-      <xsl:when test="ancestor::thead">0</xsl:when>
-      <xsl:when test="ancestor::tfoot
-                      and not(ancestor::row/following-sibling::row)">1</xsl:when>
-      <xsl:when test="not(ancestor::tfoot)
-                      and ancestor::tgroup/tfoot">0</xsl:when>
-      <xsl:when test="not(ancestor::tfoot)
-                      and not(ancestor::tgroup/tfoot)
-                      and not(ancestor::row/following-sibling::row)">1</xsl:when>
-      <xsl:otherwise>0</xsl:otherwise>
-    </xsl:choose>
-  </xsl:variable>
-
-  <xsl:variable name="lastcol">
-    <xsl:choose>
-      <xsl:when test="$colnum &lt; ancestor::tgroup/@cols">0</xsl:when>
-      <xsl:otherwise>1</xsl:otherwise>
-    </xsl:choose>
-  </xsl:variable>
-
   <fo:table-cell text-align="center"
                  display-align="center"
                  xsl:use-attribute-sets="table.cell.padding">
-    <xsl:choose>
-      <xsl:when test="$frame = 'all' or $frame = 'topbot' or $frame = 'bottom'">
-        <xsl:if test="$lastrow = 0">
-          <xsl:call-template name="border">
-            <xsl:with-param name="side" select="'bottom'"/>
-          </xsl:call-template>
-        </xsl:if>
-      </xsl:when>
-      <xsl:otherwise>
-        <xsl:if test="$rowsep &gt; 0">
-          <xsl:call-template name="border">
-            <xsl:with-param name="side" select="'bottom'"/>
-          </xsl:call-template>
-        </xsl:if>
-      </xsl:otherwise>
-    </xsl:choose>
+    <xsl:if test="$rowsep &gt; 0">
+      <xsl:call-template name="border">
+        <xsl:with-param name="side" select="'bottom'"/>
+      </xsl:call-template>
+    </xsl:if>
 
-    <xsl:choose>
-      <xsl:when test="$frame = 'all' or $frame = 'sides'">
-        <xsl:if test="$lastcol = 0">
-          <xsl:call-template name="border">
-            <xsl:with-param name="side" select="'right'"/>
-          </xsl:call-template>
-        </xsl:if>
-      </xsl:when>
-      <xsl:otherwise>
-        <xsl:if test="$colsep &gt; 0">
-          <xsl:call-template name="border">
-            <xsl:with-param name="side" select="'right'"/>
-          </xsl:call-template>
-        </xsl:if>
-      </xsl:otherwise>
-    </xsl:choose>
+    <xsl:if test="$colsep &gt; 0">
+      <xsl:call-template name="border">
+        <xsl:with-param name="side" select="'right'"/>
+      </xsl:call-template>
+    </xsl:if>
 
     <fo:block/> <!-- fo:table-cell should not be empty -->
-<!--
-    <xsl:text>[e,</xsl:text>
-    <xsl:value-of select="$lastrow"/>
-    <xsl:text>,</xsl:text>
-    <xsl:value-of select="$lastcol"/>
-    <xsl:text>]</xsl:text>
--->
   </fo:table-cell>
 </xsl:template>
 
@@ -356,6 +306,10 @@ to be incomplete. Don't forget to read the source, too :-)</para>
     </xsl:call-template>
   </xsl:variable>
 
+<!--
+  <xsl:message><xsl:value-of select="."/>: <xsl:value-of select="$rowsep"/></xsl:message>
+-->
+
   <xsl:variable name="colsep">
     <xsl:call-template name="inherited.table.attribute">
       <xsl:with-param name="entry" select="."/>
@@ -396,27 +350,6 @@ to be incomplete. Don't forget to read the source, too :-)</para>
     </xsl:call-template>
   </xsl:variable>
 
-  <xsl:variable name="lastrow">
-    <xsl:choose>
-      <xsl:when test="ancestor::thead">0</xsl:when>
-      <xsl:when test="ancestor::tfoot
-                      and not(ancestor::row/following-sibling::row)">1</xsl:when>
-      <xsl:when test="not(ancestor::tfoot)
-                      and ancestor::tgroup/tfoot">0</xsl:when>
-      <xsl:when test="not(ancestor::tfoot)
-                      and not(ancestor::tgroup/tfoot)
-                      and not(ancestor::row/following-sibling::row)">1</xsl:when>
-      <xsl:otherwise>0</xsl:otherwise>
-    </xsl:choose>
-  </xsl:variable>
-
-  <xsl:variable name="lastcol">
-    <xsl:choose>
-      <xsl:when test="$col &lt; ancestor::tgroup/@cols">0</xsl:when>
-      <xsl:otherwise>1</xsl:otherwise>
-    </xsl:choose>
-  </xsl:variable>
-
   <xsl:choose>
     <xsl:when test="$spans != '' and not(starts-with($spans,'0:'))">
       <xsl:call-template name="entry">
@@ -439,39 +372,17 @@ to be incomplete. Don't forget to read the source, too :-)</para>
       <fo:table-cell xsl:use-attribute-sets="table.cell.padding">
         <xsl:call-template name="anchor"/>
 
-        <xsl:choose>
-          <xsl:when test="$frame = 'all' or $frame = 'topbot' or $frame = 'bottom'">
-            <xsl:if test="$lastrow = 0">
-              <xsl:call-template name="border">
-                <xsl:with-param name="side" select="'bottom'"/>
-              </xsl:call-template>
-            </xsl:if>
-          </xsl:when>
-          <xsl:otherwise>
-            <xsl:if test="$rowsep &gt; 0">
-              <xsl:call-template name="border">
-                <xsl:with-param name="side" select="'bottom'"/>
-              </xsl:call-template>
-            </xsl:if>
-          </xsl:otherwise>
-        </xsl:choose>
+        <xsl:if test="$rowsep &gt; 0">
+          <xsl:call-template name="border">
+            <xsl:with-param name="side" select="'bottom'"/>
+          </xsl:call-template>
+        </xsl:if>
 
-        <xsl:choose>
-          <xsl:when test="$frame = 'all' or $frame = 'sides'">
-            <xsl:if test="$lastcol = 0">
-              <xsl:call-template name="border">
-                <xsl:with-param name="side" select="'right'"/>
-              </xsl:call-template>
-            </xsl:if>
-          </xsl:when>
-          <xsl:otherwise>
-            <xsl:if test="$colsep &gt; 0">
-              <xsl:call-template name="border">
-                <xsl:with-param name="side" select="'right'"/>
-              </xsl:call-template>
-            </xsl:if>
-          </xsl:otherwise>
-        </xsl:choose>
+        <xsl:if test="$colsep &gt; 0">
+          <xsl:call-template name="border">
+            <xsl:with-param name="side" select="'right'"/>
+          </xsl:call-template>
+        </xsl:if>
 
         <xsl:if test="@morerows">
           <xsl:attribute name="number-rows-spanned">
@@ -537,14 +448,6 @@ to be incomplete. Don't forget to read the source, too :-)</para>
             </xsl:if>
           </xsl:if>
 
-<!--
-    <xsl:text>[</xsl:text>
-    <xsl:value-of select="$lastrow"/>
-    <xsl:text>,</xsl:text>
-    <xsl:value-of select="$lastcol"/>
-    <xsl:text>]</xsl:text>
--->
-
           <!--
           <xsl:text>(</xsl:text>
           <xsl:value-of select="$rowsep"/>