Tracker: Bugs

5 mediaobjectco images not aligned - ID: 1201333
Last Update: Comment added ( alexrk )

docbook-xsl-snapshot from 18. April 2005

---------------------------
Description:
The align attribute will be ignored for mediaobjectco
objects.

<mediaobjectco>
<imageobjectco>
<imageobject>
<imagedata align="center"
fileref="test.svg"
format="SVG" />
</imageobject>
</imageobjectco>
</mediaobjectco>

---------------------------
Problem:
The fo/graphics.xsl stylesheet expected an imagedata
element as child of imageobjectco. But imageobjectco
can't have imagedata as child. It has to be wrapped by
imageobject. That's why the stylesheet can't find an
align attribute.

---------------------------
Possible Fix:
in mediaobjectco template change:

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

to:

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

in calloutlist template add text-align attribute to fo:block,
so callouts aligned always left.

<xsl:template match="calloutlist">
<xsl:variable name="id">
<xsl:call-template name="object.id"/>
</xsl:variable>

<fo:block id="{$id}" text-align="left">
<xsl:if test="title">
<xsl:apply-templates select="title"
mode="list.title.mode"/>
</xsl:if>

<xsl:apply-templates
select="*[not(self::callout or self::title or
self::titleabbrev)]
|comment()[not(preceding-sibling::callout)]
|processing-instruction()[not(preceding-
sibling::callout)]"/>

<fo:list-block space-before.optimum="1em"
space-before.minimum="0.8em"
space-before.maximum="1.2em"
provisional-distance-between-
starts="2.2em"
provisional-label-separation="0.2em">
<xsl:apply-templates select="callout
|comment()[preceding-
sibling::calllout]
|processing-instruction()[preceding-
sibling::callout]"/>
</fo:list-block>
</fo:block>
</xsl:template>


Alexander Karnstedt ( alexrk ) - 2005-05-13 12:00

5

Closed

Fixed

Robert Stayton

XSL

output: print/FO/PDF

Public


Comments ( 2 )

Date: 2005-05-19 13:18
Sender: alexrk

Logged In: YES
user_id=867618

I've tested it with the latest snapshot and it seems to work
well for html and fo output.

thanks


Date: 2005-05-16 08:32
Sender: bobstaytonSourceForge.net SubscriberProject Admin

Logged In: YES
user_id=193218

A fix for this issue has been added to the current codebase.
Please test the fix with the latest snapshot from:

http://docbook.sourceforge.net/snapshots/



Attached File

No Files Currently Attached

Changes ( 4 )

Field Old Value Date By
status_id Open 2005-05-16 08:32 bobstayton
resolution_id None 2005-05-16 08:32 bobstayton
assigned_to nobody 2005-05-16 08:32 bobstayton
close_date - 2005-05-16 08:32 bobstayton