]> granicus.if.org Git - docbook-dsssl/commitdiff
Bug #429331: center figure title if image is centered
authorNorman Walsh <ndw@nwalsh.com>
Wed, 20 Feb 2002 16:33:59 +0000 (16:33 +0000)
committerNorman Walsh <ndw@nwalsh.com>
Wed, 20 Feb 2002 16:33:59 +0000 (16:33 +0000)
xsl/fo/formal.xsl

index bd23588248258a03474d73ca6fa013e40101e510..dbd12d9679061edc51601930d7b929086ac35e46 100644 (file)
   </xsl:choose>
 </xsl:template>
 
-<xsl:template match="figure|example">
+<xsl:template match="figure">
+  <!-- FIXME: is this too careless? -->
+  <xsl:choose>
+    <xsl:when test=".//imagedata[@align][1]">
+      <fo:block text-align="{.//imagedata[@align][1]/@align}">
+        <xsl:call-template name="formal.object"/>
+      </fo:block>
+    </xsl:when>
+    <xsl:otherwise>
+      <xsl:call-template name="formal.object"/>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+<xsl:template match="example">
   <xsl:call-template name="formal.object"/>
 </xsl:template>