]> granicus.if.org Git - docbook-dsssl/commitdiff
fixed bug 1201333 mediaobjectco images not aligned.
authorBob Stayton <bobs@sagehill.net>
Mon, 16 May 2005 08:26:08 +0000 (08:26 +0000)
committerBob Stayton <bobs@sagehill.net>
Mon, 16 May 2005 08:26:08 +0000 (08:26 +0000)
xsl/fo/formal.xsl
xsl/fo/graphics.xsl
xsl/fo/lists.xsl

index 37aa885056bc6a2cb15060ca49ae5edfa31a04bf..ebc392fb87cafaf532e391850322a5a508ff7ad1 100644 (file)
 
   <!-- Get align value from internal mediaobject -->
   <xsl:variable name="align">
-    <xsl:if test="mediaobject">
+    <xsl:if test="mediaobject|mediaobjectco">
       <xsl:variable name="olist" select="mediaobject/imageobject
-                     |mediaobject/imageobjectco
+                     |mediaobjectco/imageobjectco
                      |mediaobject/videoobject
                      |mediaobject/audioobject
                      |mediaobject/textobject"/>
 
       <xsl:variable name="object" select="$olist[position() = $object.index]"/>
 
-      <xsl:value-of select="$object/imagedata[@align][1]/@align"/>
+      <xsl:value-of select="$object/descendant::imagedata[@align][1]/@align"/>
     </xsl:if>
   </xsl:variable>
 
index df279864234d23accdfb900fbeb0072798c1a874..f2d491a461a405d8e88322b47d1898ad8b452b19 100644 (file)
   <xsl:variable name="object" select="$olist[position() = $object.index]"/>
 
   <xsl:variable name="align">
-    <xsl:value-of select="$object/imagedata[@align][1]/@align"/>
+    <xsl:value-of select="$object/descendant::imagedata[@align][1]/@align"/>
   </xsl:variable>
 
   <xsl:variable name="id">
index a13a4e1d087fc6336d1f458d9d6e7cb16551bfd5..b09ff37979b83c88bc91104d846297e8e7bd48cc 100644 (file)
   <xsl:call-template name="object.id"/>
   </xsl:variable>
 
-  <fo:block id="{$id}">
+  <fo:block id="{$id}"
+            text-align="{$alignment}">
+    <!-- The above restores alignment altered by image align attribute -->
     <xsl:if test="title">
       <xsl:apply-templates select="title" mode="list.title.mode"/>
     </xsl:if>