This is the mail archive of the
docbook-apps@lists.oasis-open.org
mailing list .
Variable Lists should be formatted as fo:block ratherthan fo:list
- To: docbook-apps at lists dot oasis-open dot org
- Subject: DOCBOOK-APPS: Variable Lists should be formatted as fo:block ratherthan fo:list
- From: Elliotte Rusty Harold <elharo at metalab dot unc dot edu>
- Date: Sun, 01 Jul 2001 12:40:51 -0700
The XSL stylesheets 1.4.0 for Formatting Objects treat the variablelist
in a very strange fashion. They use a fo:list where the term becomes a
fo:list-item-label and the listitem becomes a fo:list-item-body. The
effect is that the entire thing looks like a two column table in which
the left hand column is way too small. Not very aesthetically pleasing.
The HTML stylesheets just translate this all to a definition list which
looks much better; e.g.
term1
data data adata data
data data adata data
data data adata data
term2
data data adata data
data data adata data
data data adata data
I suggest that the FO style sheets do this too. You just need to use
blocks with the appropriate indenting rather than trying to convert it
to some kind of list. I've already made the changes in my own driver
stylesheet. Here's what I use, though you probably don't want to use
these verbatim because I haven't yet quite figured out how all the
stylesheets are organized:
<xsl:template match="variablelist">
<xsl:variable name="id">
<xsl:call-template name="object.id"/>
</xsl:variable>
<xsl:if test="title">
<xsl:apply-templates select="title" mode="list.title.mode"/>
</xsl:if>
<xsl:apply-templates/>
</xsl:template>
<xsl:template match="varlistentry">
<xsl:variable name="id"><xsl:call-template
name="object.id"/></xsl:variable>
<fo:block id="{$id}" xsl:use-attribute-sets="normal.para.spacing">
<fo:block>
<xsl:apply-templates select="term"/>
</fo:block>
<fo:block start-indent="0.5in">
<xsl:apply-templates select="listitem"/>
</fo:block>
</fo:block>
</xsl:template>
--
+-----------------------+------------------------+-------------------+
| Elliotte Rusty Harold | elharo@metalab.unc.edu | Writer/Programmer |
+-----------------------+------------------------+-------------------+
| Java I/O (O'Reilly & Associates, 1999) |
| http://metalab.unc.edu/javafaq/books/javaio/ |
| http://www.amazon.com/exec/obidos/ISBN=1565924851/cafeaulaitA/ |
+----------------------------------+---------------------------------+
| Read Cafe au Lait for Java News: http://metalab.unc.edu/javafaq/ |
| Read Cafe con Leche for XML News: http://metalab.unc.edu/xml/ |
+----------------------------------+---------------------------------+