]> granicus.if.org Git - docbook-dsssl/commitdiff
Make sure we don't attempt to set the table width more than once if a table has multi...
authorNorman Walsh <ndw@nwalsh.com>
Wed, 26 Jun 2002 11:04:38 +0000 (11:04 +0000)
committerNorman Walsh <ndw@nwalsh.com>
Wed, 26 Jun 2002 11:04:38 +0000 (11:04 +0000)
xsl/fo/table.xsl

index 5827f8b79ef4c86d3d5ffeec783cf712ce023d57..464ba9d1fe2325fa613037430bd83af07d7558b3 100644 (file)
@@ -155,9 +155,14 @@ to be incomplete. Don't forget to read the source, too :-)</para>
     </xsl:choose>
   </xsl:variable>
 
-  <xsl:attribute name="width">
-    <xsl:value-of select="$table.width"/>
-  </xsl:attribute>
+  <xsl:if test="position() = 1">
+    <!-- If this is the first tgroup, output the width attribute for the -->
+    <!-- surrounding fo:table. (If this isn't the first tgroup, trying   -->
+    <!-- to output the attribute will cause an error.)                   -->
+    <xsl:attribute name="width">
+      <xsl:value-of select="$table.width"/>
+    </xsl:attribute>
+  </xsl:if>
 
   <xsl:choose>
     <xsl:when test="$use.extensions != 0