← Prev in month ← Prev in thread

How do I customize docbook/fo stylesheet to do custom page breaks on sections?

From
Jon Rosen <>
Date
2011-10-06T19:39:14+00:00
ID
Thread
How do I customize docbook/fo stylesheet to do custom page breaks on sections?
I have no idea if anyone on this forum will be familiar
enough with Docbook and the XSL-FO stylesheets for creating PDFs but I need to figure
out how to customize my stylesheet template so that I can do pagebreaks
differently for each chapter.

There is a standard param element to set page breaks on sections:

<xsl:attribute-set name="section.level1.properties">

<xsl:attribute name="break-before">page</xsl:attribute>

</xsl:attribute-set>

But this is universal, i.e., ALL chapters in the book get set with this
property. Chapter 4 has statement definitions for each element of our SQL
language and because of the layout, we would like each section to start on a
new page. However, the other chapters have lots of very small sections at the
sect1 level and when they page-break, the book looks awful. 

So I want chapter 4 to do this, but on the other chapters, I just want regular
non-breaking section 1 headings.

I figure I need some kind of "xsl:if" statement that tests the
chapter number and puts in this attribute modification just for chapter 4 but I
have no real idea how to find out what variable has the chapter numbers to
compare and where to put this test (xsl is still a bit mysterious to me
although I am getting more familiar all the time). 

Any help would be GREATLY appreciated! 

Jon "bleurose" Rosen



PS - feel free to email me directly.

 

Jon
Rosen

"Sometimes you're the
pinball wizard, and sometimes you're just the pinball."
← Prev in month ← Prev in thread