[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: added <fo:block> around list items causes them to render incorrectly
Hi All, I just received the below bug report from the debian package of docbook-xsl V1.64.1. I'm wondering if the problem is toolchain-dependent or if I should simply apply the suggested patch to V1.64.1 and upload the package into the debian archive. If it's a true docbook-xsl bug, I'll go ahead and submit a bug report at sourceforge. Thanks, Mark Here's the bug report (#225192): ------------------------------------------------------------------------ Package: docbook-xsl Version: 1.64.1-1 Severity: normal Tags: patch First, some caveats: I'm no docbook expert. I've been using xmlto, which uses xsltproc and passivetex: ii xmlto 0.0.17-2 XML-to-any converter ii xsltproc 1.1.1-1 XSLT command line processor ii passivetex 1.24-0.1 Macros to process XSL formatting objects The problem: Documents which rendered correctly using those tools (and a bit of unrelated hacking), using the previous debian docbook-xsl (docbook-xsl_1.62.4.0-1), produce incorrectly-formatted list items using 1.64.1-1 (with or without that unrelated hacking). E.g. where an <unorderedlist> used to come out as (crude ASCII illunstration of pdf output): * item 1 * item 2 * item 3 it now comes out as: * item 1 * item 2 * item 3 Similar things happened to <variablelist>s, callout lists, <orderedlist>s, and maybe others: the list item number, identifier, or bullet now comes out on a separate line ahead of the item's content, instead of where it belongs. This problem occurs only in the fo-produced output, not in html output. (If it would help to have a small docbook source file that illustrates the problem, I'll be happy to do that -- just let me know.) My solution: Running diff on the docbook-xml 1.62.4.0-1 vs. 1.64.1-1 contents quickly brought my attention to /usr/share/sgml/docbook/stylesheet/xsl/nwalsh/fo/lists.xsl, and the following patch (which undoes only the extra <fo:block>...</fo:block>s that were added for list-like items between those two versions) solves the problem (a unified diff with extra context, for clarity): --- stylesheet/xsl/nwalsh/fo/lists.xsl.orig 2003-12-04 15:13:46.000000000 -0500 +++ stylesheet/xsl/nwalsh/fo/lists.xsl 2003-12-27 02:26:54.000000000 -0500 @@ -104,25 +104,23 @@ <!-- <xsl:when test="$itemsymbol='circle'">∘</xsl:when> <xsl:when test="$itemsymbol='round'">∘</xsl:when> <xsl:when test="$itemsymbol='square'">☐</xsl:when> <xsl:when test="$itemsymbol='box'">☐</xsl:when> --> <xsl:otherwise>•</xsl:otherwise> </xsl:choose> </fo:block> </fo:list-item-label> <fo:list-item-body start-indent="body-start()"> - <fo:block> <xsl:apply-templates/> - </fo:block> </fo:list-item-body> </xsl:variable> <xsl:choose> <xsl:when test="parent::*/@spacing = 'compact'"> <fo:list-item id="{$id}" xsl:use-attribute-sets="compact.list.item.spacing"> <xsl:copy-of select="$item.contents"/> </fo:list-item> </xsl:when> <xsl:otherwise> <fo:list-item id="{$id}" xsl:use-attribute-sets="list.item.spacing"> @@ -214,25 +212,23 @@ <xsl:template match="orderedlist/listitem"> <xsl:variable name="id"><xsl:call-template name="object.id"/></xsl:variable> <xsl:variable name="item.contents"> <fo:list-item-label end-indent="label-end()"> <fo:block> <xsl:apply-templates select="." mode="item-number"/> </fo:block> </fo:list-item-label> <fo:list-item-body start-indent="body-start()"> - <fo:block> <xsl:apply-templates/> - </fo:block> </fo:list-item-body> </xsl:variable> <xsl:choose> <xsl:when test="parent::*/@spacing = 'compact'"> <fo:list-item id="{$id}" xsl:use-attribute-sets="compact.list.item.spacing"> <xsl:copy-of select="$item.contents"/> </fo:list-item> </xsl:when> <xsl:otherwise> <fo:list-item id="{$id}" xsl:use-attribute-sets="list.item.spacing"> @@ -390,25 +386,23 @@ </xsl:template> <xsl:template match="varlistentry" mode="vl.as.list"> <xsl:variable name="id"><xsl:call-template name="object.id"/></xsl:variable> <fo:list-item id="{$id}" xsl:use-attribute-sets="list.item.spacing"> <fo:list-item-label end-indent="label-end()" text-align="start"> <fo:block> <xsl:apply-templates select="term"/> </fo:block> </fo:list-item-label> <fo:list-item-body start-indent="body-start()"> - <fo:block> <xsl:apply-templates select="listitem"/> - </fo:block> </fo:list-item-body> </fo:list-item> </xsl:template> <xsl:template match="variablelist" mode="vl.as.blocks"> <xsl:variable name="id"> <xsl:call-template name="object.id"/> </xsl:variable> <!-- termlength is irrelevant --> @@ -935,25 +929,23 @@ <xsl:template match="callout"> <xsl:variable name="id"><xsl:call-template name="object.id"/></xsl:variable> <fo:list-item id="{$id}"> <fo:list-item-label end-indent="label-end()"> <fo:block> <xsl:call-template name="callout.arearefs"> <xsl:with-param name="arearefs" select="@arearefs"/> </xsl:call-template> </fo:block> </fo:list-item-label> <fo:list-item-body start-indent="body-start()"> - <fo:block> <xsl:apply-templates/> - </fo:block> </fo:list-item-body> </fo:list-item> </xsl:template> <xsl:template name="callout.arearefs"> <xsl:param name="arearefs"></xsl:param> <xsl:if test="$arearefs!=''"> <xsl:choose> <xsl:when test="substring-before($arearefs,' ')=''"> <xsl:call-template name="callout.arearef"> <xsl:with-param name="arearef" select="$arearefs"/> (I don't know why those extra <fo:block> blocks were added, but it seems that <xsl:apply-templates/> already adds <fo:block> around the content it puts out. Maybe this is a transitional bug.) Thanks. Let me know if you want me to try something else, or if you want to know anything I neglected to tell you. -- _____________________________________ Mark Johnson <mark@dulug.duke.edu> Debian XML/SGML <mrj@debian.org> Home Page: <http://dulug.duke.edu/~mark/> GPG fp: DBEA FA3C C46A 70B5 F120 568B 89D5 4F61 C07D E242
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]