I believe this is because DocBook tries to keep all the contents of an <example> on a single page by default. I had this problem recently, and here is what Bob said:
***********
Actually, this would be a feature, to automatically keep each example together on a page. Doesn't work well for long examples, though.
The FO stylesheets have an attribute-set in the 1.74 stylesheets for examples called "example.properties", which by default inherits properties from the "formal.object.properties" attribute-set, which includes a keep-together attribute. Your customization layer could turn it off for examples using:
<xsl:attribute-set name="example.properties">
<xsl:attribute name="keep-together.within-column="auto"/>
</xsl:attribute-set>
*************
HTH!
cheri
Original Message-----
From: Mauritz Jeanson [mailto:mj@johanneberg.com]
Sent: Friday, September 12, 2008 10:26 AM
To: 'Michael Schmalle'; docbook-apps@lists.oasis-open.org
Subject: [docbook-apps] RE: [docbook] PDF :: programlisting overflow
>