OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.


Help: OASIS Mailing Lists Help | MarkMail Help

docbook-apps message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]

Subject: Re: [docbook-apps] FO pagebreak

Danny Kruitbosch wrote:
> Hi,


> So I have a few questions:
> 1. Is putting <?dbfo break-before="page"?> in my document enough or do I 

> need to do more?
> 2. If I need to do more (write a xsl template?) what's the best way to 
> do this without breaking the docbook xsl templates.
> 3. Can someone provide me with a working example for this. There seem to 

> be none available (remember I'm new to this).
> Any help would be great,

Hi Danny,

Add the following to your customization layer:

<!-- <?custom-pagebreak?> inserts a page break at this point -->
<xsl:template match="processing-instruction('custom-pagebreak')">
  <fo:block break-before='page'/>

Inside your XML documents you now add 


where you want to add a page break. 

You create a customization layer simply by changing attributes and 
parameters in an XSL stylesheet outside the docbook tree where you import 
the fo/docbook.xsl stylesheet but override the default settings there with 
the ones in your stylesheet(s).

There is an excellent documentation (which you perhaps have already) by 
Bob Stayton which is available online at 


A paperback or eBook version is available at


I assume your tool chain already works and I try to give you an example. 
Create a XSL file, add the following

<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"; 

  <xsl:import ref="/path/to/docbook-xsl/fo/docbook.xsl"/>


and replace "/path/to/docbook-xsl" with your path.

Inside the xsl:stylesheet-tag you now may add your customizations which 
override the default values set up in the docbook-xsl stylesheets.

If you add

  <xsl:param name="paper.type" select="'A5'"/>
  <xsl:param name="double.sided">1</xsl:param>

you change the paper type to A5 and switch to double sided layout (this 
file would also be the right place for the custom page break from Q1 :-) 

Then you use this stylesheet to create FO. It imports docbook.xsl and adds 
your customized parameters. There are lots and lots of parameters and 
attributes to change the layout of  your PDFs. And this mailing list is an 
infinite ressource of tips and help.

It is not easy to provide a working example because you first have to 
decide which tool chain you want to use and then set up these tools 
accordingly. But I think the first three chapters of Bobs book will give 
you a very good overview and introduction into docbook-xsl. 

Thomas Gier
Technical Writer

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]