[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: Re: Problem with simplelist and pdf?
I think I figured this out -- it does appear that the 1.72.0 stylesheets are missing some critical code. In fo/lists.xsl, the original template for a vertical simplelist looks like: <xsl:template match="simplelist[@type='vert']"> <fo:table xsl:use-attribute-sets="normal.para.spacing"> <xsl:call-template name="simplelist.table.columns"> ... Note that layout and width information is not being set for <fo:table> -- both of which appear to by required by FOP 0.93. If I duplicate the section from the horizontal simplelist and change the template to: <xsl:template match="simplelist[@type='vert']"> <xsl:variable name="table.width"> <xsl:choose> <xsl:when test="$explicit.table.width != ''"> <xsl:value-of select="$explicit.table.width"/> </xsl:when> <xsl:when test="$default.table.width = ''"> <xsl:text>100%</xsl:text> </xsl:when> <xsl:otherwise> <xsl:value-of select="$default.table.width"/> </xsl:otherwise> </xsl:choose> </xsl:variable> <fo:table xsl:use-attribute-sets="normal.para.spacing"> <xsl:choose> <xsl:when test="$axf.extensions != 0 or $xep.extensions != 0"> <xsl:attribute name="table-layout">auto</xsl:attribute> <xsl:if test="$explicit.table.width != ''"> <xsl:attribute name="width"><xsl:value-of select="$explicit.table.width"/></xsl:attribute> </xsl:if> </xsl:when> <xsl:otherwise> <xsl:attribute name="table-layout">fixed</xsl:attribute> <xsl:attribute name="width"><xsl:value-of select="$table.width"/></xsl:attribute> </xsl:otherwise> </xsl:choose> <xsl:call-template name="simplelist.table.columns"> ... then everything appears to work just fine. I'm not sure why the table-layout and width attributes were set for a horizontal list but not a vertical list since they are both implemented with tables -- but perhaps it is just an oversight in fo/lists.xsl. Ken On 5/2/07, Ken Morse <kenneth.morse@gmail.com> wrote: > I'm seeing a problem where a simplelist doesn't appear to be formatted > correctly for FOP: > > <?xml version="1.0" encoding="UTF-8"?> > <!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" > "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd"> > <book> > <chapter id="ch1"> > <title>simplelist</title> > <simplelist type="vert" columns="1"> > <member>List item 1</member> > <member>List item 2</member> > <member>List item 3</member> > </simplelist> > </chapter> > </book> > > I run the commands: > tools\xsltproc --stringparam fop1.extensions 1 --stringparam hyphenate > false --output testsimplelist.fo xsl\1.72.0\fo\docbook.xsl > testsimplelist.xml > > tools\fop\fop.bat -fo testsimplelist.fo -pdf testsimplelist.pdf > > and get the output: > May 2, 2007 9:05:10 AM org.apache.fop.fo.FONode attributeWarning > WARNING: Warning(2/48408): fo:table, table-layout="auto" is currently > not supported by FOP > May 2, 2007 9:05:10 AM org.apache.fop.fo.PropertyList convertAttributeToProperty > SEVERE: Ignoring property: column-width="proportional-column-width(1)" > (file:///C:/DocBook/testsimplelist.fo:2:48408: > proportional-column-width() function may only be used when fo:table > has table-layout="fixed".; property:'column-width') > > I'm using FOP 0.93 and the 1.72.0 version of the stylesheets on > Windows XP. Is this perhaps a problem with the FO stylesheets not > building a table for simplelist that FOP can deal with? > > Ken >
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]