]> granicus.if.org Git - docbook-dsssl/commitdiff
Improve support for align attribute on tgroup
authorNorman Walsh <ndw@nwalsh.com>
Sun, 15 Apr 2001 21:22:00 +0000 (21:22 +0000)
committerNorman Walsh <ndw@nwalsh.com>
Sun, 15 Apr 2001 21:22:00 +0000 (21:22 +0000)
xsl/html/table.xsl

index 911af6473207de114c0892cbde07ed5e4ddb0ae8..d76fe3accd6ab0501ddbaa01905b1c7832fde89b 100644 (file)
@@ -536,11 +536,21 @@ or nothing (the empty string)</para>
                 <xsl:value-of select="$colspec/@colwidth"/>
               </xsl:attribute>
             </xsl:if>
-            <xsl:if test="$colspec/@align">
-              <xsl:attribute name="align">
-                <xsl:value-of select="$colspec/@align"/>
-              </xsl:attribute>
-            </xsl:if>
+
+            <xsl:choose>
+              <xsl:when test="$colspec/@align">
+                <xsl:attribute name="align">
+                  <xsl:value-of select="$colspec/@align"/>
+                </xsl:attribute>
+              </xsl:when>
+              <!-- Suggested by Pavel ZAMPACH <zampach@nemcb.cz> -->
+              <xsl:when test="$colspecs/ancestor::tgroup/@align">
+                <xsl:attribute name="align">
+                  <xsl:value-of select="$colspecs/ancestor::tgroup/@align"/>
+                </xsl:attribute>
+              </xsl:when>
+            </xsl:choose>
+
             <xsl:if test="$colspec/@char">
               <xsl:attribute name="char">
                 <xsl:value-of select="$colspec/@char"/>