]> granicus.if.org Git - docbook-dsssl/commitdiff
Fixed bug in char attribute, where text-align was being set to
authorBob Stayton <bobs@sagehill.net>
Tue, 16 Aug 2005 19:26:31 +0000 (19:26 +0000)
committerBob Stayton <bobs@sagehill.net>
Tue, 16 Aug 2005 19:26:31 +0000 (19:26 +0000)
any char value, even if the align attribute was not 'char'.
The CALS spec says text-align set to the value of char only
if the align attribute is 'char'.

xsl/fo/table.xsl

index d39b690f2094ca3ee10be6a1a0871a8ffbce137d..d7271d47416b2fe68927327b34dd876b26bc3b46 100644 (file)
@@ -749,17 +749,19 @@ to be incomplete. Don't forget to read the source, too :-)</para>
         </xsl:attribute>
       </xsl:if>
 
-      <xsl:if test="$align.inherit != ''">
-        <xsl:attribute name="text-align">
-          <xsl:value-of select="$align.inherit"/>
-        </xsl:attribute>
-      </xsl:if>
+      <xsl:choose>
+        <xsl:when test="$align.inherit = 'char' and $char.inherit != ''">
+          <xsl:attribute name="text-align">
+            <xsl:value-of select="$char.inherit"/>
+          </xsl:attribute>
+        </xsl:when>
+        <xsl:when test="$align.inherit != ''">
+          <xsl:attribute name="text-align">
+            <xsl:value-of select="$align.inherit"/>
+          </xsl:attribute>
+        </xsl:when>
+      </xsl:choose>
 
-      <xsl:if test="$char.inherit != ''">
-        <xsl:attribute name="text-align">
-          <xsl:value-of select="$char.inherit"/>
-        </xsl:attribute>
-      </xsl:if>
     </xsl:when>
     <xsl:otherwise>
       <!-- HTML table -->