Hi Antti,
Based on your email I did some further investigation of how fop 0.95 handles
dbfo-need, because my previous experience suggested that it did not work as expected.
First, I would recommend that you not use 1.75.1, but switch to 1.75.2. In the
version 1.75.1 that you are using, the pi.xsl file does not mention the
'fop1.extensions' parameter, because that was added in 1.75.2 as a bug fix, since that
case should have been included. If you are using fop 0.95, you should be setting
fop.extensions=0 and fop1.extensions=1. If that is the case, then editing the
templates in that version of fo/pi.xsl will have no effect since they don't mention
fop1.extensions, and fop.extensions should not come into play at all. In other words,
if you are using 1.75.1 and setting the params as I suggested, then dbfo-needs *are*
being processed without any changes to the templates.
When I test dbfo-need with fop.0.95 and 1.75.2, I found that it does work in some
locations but not others. In the case of placing a dbfo-need between block elements
like para, it works. But if you put the dbfo-need before a section element, it does
not.
Regarding the extra space that you noticed, that is the other problem that fop 0.95
has. It does not yet handle the combination of properties (primarily
space-after.precedence) that puts the text back where it should start when a dbfo-need
is used. That is a limitation that must await full support for the space-after
property in FOP.
So the question is, should we enable a feature for fop 0.95 that sometimes works but
sometimes not, and that adds space where it shouldn't. I would vote to add support
only when FOP handles the feature properly. But others may see it differently.
Bob Stayton
Sagehill Enterprises
b...@sagehill.net
----- Original Message -----
From: "Antti Karanta" <antti.kara...@napa.fi>
To: <docbook-apps@lists.oasis-open.org>
Sent: Tuesday, February 02, 2010 6:24 AM
Subject: [docbook-apps] dbfo-need height and FOP
Hi!
It seems that when fop.extensions or fop1.extensions are on dbfo-need processing
instruction (used for soft page breaks) is ignored.
I found this bug report:
https://sourceforge.net/tracker/index.php?func=detail&aid=2816141&group_id=21935&atid=373747
and this thread:
http://www.mail-archive.com/docbook-apps@lists.oasis-open.org/msg13096.html
(I believe the problem in the sample given in this thread is that dbfo-need is
mentioned here: http://www.sagehill.net/docbookxsl/PageBreaking.html "Because the
mechanism uses blocks, you cannot put the processing instruction inline. It must be
between elements that generate blocks of text, otherwise you may get invalid
XSL-FO.")
However, if I comment out the parts that cause fop to be ignored in fo/pi.xsl the
said processing instruction seems to work as intended. Well, almost - if there is
no page break caused, the text continues a little down from where it should be. But
there are no validation errors mentioned in the bug report.
So, the question is: what situations does this cause problems in when using
fop?
using docbook-xsl 1.75.1 and fop 0.95.
::Antti::
Ps. Here's one of the small samples I experimented with:
<?xml version="1.0" encoding="UTF-8"?>
<book>
<title>example</title>
<preface>
<title>foobar</title>
<para>teskstii tekstii</para>
<para>hiiohoi</para>
<para>joopa joo</para>
<para>paevaa ja yota</para>
<?dbfo-need height="20mm" ?>
<para>lissaa tekstii</para>
</preface>
</book>
---------------------------------------------------------------------
To unsubscribe, e-mail: docbook-apps-unsubscr...@lists.oasis-open.org
For additional commands, e-mail: docbook-apps-h...@lists.oasis-open.org
---------------------------------------------------------------------
To unsubscribe, e-mail: docbook-apps-unsubscr...@lists.oasis-open.org
For additional commands, e-mail: docbook-apps-h...@lists.oasis-open.org