Unless global params, an attribute-set is evaluated
each time it is used, in the context of the element being processed.
So putting an xsl:choose inside the body of an xsl:attribute element
works, but be sure to include an xsl:otherwise so you don't get an empty
In your case, I would recommend adding a role
attribute to the special chapter, rather than relying on its position in the
document (which can change). If you used <chapter
role="StatementDefs">, then your stylesheet could use:
This feature of XSLT is very handy for stuff like
----- Original Message -----
Sent: Thursday, October 06, 2011 12:39
Subject: [docbook-apps] 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:
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
Any help would be GREATLY appreciated!
feel free to email me directly.
"Sometimes you're the
pinball wizard, and sometimes you're just the