OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.


Help: OASIS Mailing Lists Help | MarkMail Help

docbook-apps message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]

Subject: mediaobjectco not aligned - bug in fo/graphics.xsl?

Recently I've discovered some problem when I try to use the align attribute 
for imagedata elements that are embedded within mediaobjectco/imageobjectco.

The align attribute will be ignored for those objects.

               <imagedata align="center"
                          format="SVG" />

The fo/graphics.xsl stylesheet expected an imagadata element as child of 
imageobjectco. But imageobjectco can't have imagedata as child. It has to 
be wrapped by imageobject. Thats why the stylesheet can't find an align 

To fix this, I've changed the template mediaobject|mediaobjectco ...


   <xsl:variable name="align">
     <xsl:value-of select="$object/imagedata[@align][1]/@align"/>


   <xsl:variable name="align">
     <xsl:value-of select="$object/descendant::imagedata[@align][1]/@align"/>

This leads to another problem when callout lists used within imageobjectco. 
Because the callouts now have the same alignment as imagedata. That's why 
I've additionally changed the calloutlist template and added an attribute 
text-align="left" to the fo:block element.

<xsl:template match="calloutlist">
   <xsl:variable name="id">
   <xsl:call-template name="object.id"/>
   <fo:block id="{$id}" text-align="left">
     <xsl:if test="title">
       <xsl:apply-templates select="title" mode="list.title.mode"/>
     <!-- Preserve order of PIs and comments -->
          select="*[not(self::callout or self::title or self::titleabbrev)]
     <fo:list-block space-before.optimum="1em"
       <xsl:apply-templates select="callout

Alexander Karnstedt

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]