This is the mail archive of the
docbook-apps@lists.oasis-open.org
mailing list .
Re: [docbook-apps] force pagebreaks in a glossary
- From: "A.R. (Tom) Peters" <tpeters at xs4all dot nl>
- To: docbook-apps <docbook-apps at lists dot oasis-open dot org>
- Date: Mon, 9 May 2005 16:38:35 +0200 (CEST)
- Subject: Re: [docbook-apps] force pagebreaks in a glossary
On Sun, 8 May 2005, Bob Stayton wrote:
%< some xsl code >%
Great! I am one step further now, but my ordeal is not over yet. I do
get an .fo file with breaks at the proper places, but fop (20.5) can not
process it: towards the end, maybe in the glossary (I can not now count
pages) fop aborts with:
[ERROR] null
and produces no output (PDF file) whatsoever.
This is now my sequence of commands:
xsltproc -o GemBook.tmp add-indexterms.xsl GemBook.xml
xsltproc -o mytitlepage.xsl /usr/share/xml/docbook/stylesheet/nwalsh/template/titlepage.xsl mytitlepage.xml
xsltproc -o GemBook.fo --stringparam paper.type A4 --param simplesect.in.toc 0 print.xsl GemBook.tmp
fop GemBook.fo GemBook.pdf
This is how the relevant section of print.xsl now looks:
<!-- This selects the PI as well as the glossentry elements for processing -->
<xsl:template match="glossary">
<xsl:call-template name="make-glossary">
<xsl:with-param name="entries"
select="glossentry|processing-instruction('pagebreak')"/>
</xsl:call-template>
</xsl:template>
<!-- Page orientation and layout -->
<xsl:template match="processing-instruction('pagebreak')">
<fo:block break-after="page"/>
</xsl:template>
<!-- This handles the PI in the glossary -->
<xsl:template match="processing-instruction('pagebreak')"
mode="glossary.as.list">
<fo:list-item break-before="page">
<fo:list-item-label><fo:block/></fo:list-item-label>
<fo:list-item-body><fo:block/></fo:list-item-body>
</fo:list-item>
</xsl:template>
And this is a section of the .fo file around a page break in the glossary
(line breaks inserted):
<fo:list-item break-before="page"><fo:list-item-label><fo:block/></fo:list-item-label>
<fo:list-item-body><fo:block/></fo:list-item-body></fo:list-item>
<fo:list-item space-before.optimum="1em" space-before.minimum="0.8em"
space-before.maximum="1.2em" id="Fosforescentie">
<fo:list-item-label end-indent="label-end()">
<fo:block>Fosforescentie<fo:wrapper id="id2541706"><!--Fosforescentie-->
</fo:wrapper></fo:block></fo:list-item-label>
<fo:list-item-body start-indent="body-start()">
--
#>!$!%(@^%#%*(&(#@#*$^@^$##*#@&(%)@**$!(&!^(#((#&%!)%*@)(&$($$%(@#)&*!^$)^@*^@)
Tom Peters
---------------------------------------------------------------------
To unsubscribe, e-mail: docbook-apps-unsubscribe@lists.oasis-open.org
For additional commands, e-mail: docbook-apps-help@lists.oasis-open.org