I've been spending a lot of time lately with Docbook and XSL-FO as part
of the ongoing development of my next book, Processing XML with Java. To
that end, I've been putting the various XSL-FO engines on the market
through their paces. I'm trying to find one that will actually let me
produce the complete, finished book from my Docbook source code and Norm
Walsh's XSLT-to-XSL-FO stylesheet. I thought I'd share my experiences

So far, I've experimented with four different XSL-FO processors: the
Apache XML Project's FOP, Sebastian Rahtz's PassiveTeX, the Antenna
House XSL Formatter 1.1E, and RenderX's XEP. Two are implemented in
Java, one in native Windows code, and one in TeX. FOP and PassiveTeX are
open source. Antenna House and XEP are payware. Here are my experiences
with each:


FOP was the first XSL-FO engine and is certainly the most popular. It's
open source and far easier to install than PassiveTeX, the other open
source alternative. However, of the ones I was able to actually test it
produced by far the worst output. It had the most annoying formatting
troubles. For example, it ate all the blank lines in my source code
examples and put extra indentation at the front of the first line of
each example. I've noticed that probably more than half of the bug
reports on the Docbook-APPS mailing list about the Docbook XSL-FO
stylesheets can actually be attributed to bugs in FOP. FOP is improving
rapidly -- one major bug I noted in footnote handling was fixed in the
last couple of weeks while I was performing my tests -- but it's clearly
not even an alpha quality release yet. A lot of work needs to be done
before FOP can be recommended for more than experimentation.


I was unable to get XEP to run. It was totally non-functional, and did
not produce any output. I know some other people have gotten it to run
-- the PDF version of the XSL specification was produced with XEP.
However, it simply did not work for me at all. However good the XEP
engine may be at converting XSL-FO documents to PDF, its horrible user
interface and incomprehensible installation procedure eliminated it from
my consideration.


PassiveTex did a very good job formatting most of my document. There
were a few issues involving improperly scaled images, but those were
easily fixed by adding some width attributes to my source XML document.
Once that was done, the only major bug was a failure to properly
calculate page numbers in the table of contents. There was also one
quirky instance where the first bullet point in a list was not indented
quite right, but this didn't seem to occur in other bulleted lists.

The downside to PassiveTeX is that it depends on a "decent modern TeX
setup"; and TeX is invariably a nightmare. If my Linux distribution
hadn't included TeX by default, I would have been lost. As it is, I
consider myself lucky to have been able to get PassiveTeX running; and
it still fails one time out of every two. This is probably due to TeX's
unusual multipass architecture. You sometimes have to run TeX a second
time to get the links and cross-references right. In my case, the first
pass succeeds but the second pass invariably fails. Thus I never get
proper cross-references to page numbers in the table of contents and
elsewhere. Otherwise, the output produced is quite attractive

Antenna House XSL Formatter

The Antenna House XSL Formatter produced very attractive output, on a
par with that generated by PassiveTeX and much better than FOP's. I
noticed no major flaws or cosmetic bugs. Antenna House also claims
they're the only formatter able to handle mixed writing-modes such as
"tb-rl" for Chinese/Japanese/Korean, though I didn't test that.

Most importantly, Antenna House had by far the easiest installation and
the nicest user interface of all the formatters tested. More work is
still needed, but at least I could conceive of giving this formatter to
a non-programmer end-user. The others all have effectively non-existent
user interfaces, and horrible installation procedures. The Antenna house
formatter was the only one of the four that took me less than an hour
from download to first use.

The downside to this otherwise excellent engine is that it's Windows
only and based on Windows graphics primitives rather than PostScript or
PDF. It displays on the screen very nicely, and prints nicely too.
However, it does not produce a PDF document that I can send to my editor
or a typesetter.

Bottom line: none of the formatters are yet suitable for producing a
finished product. Ņone of them can replace TeX or QuarkXPress. You might
be able to publish a simple book with these, but you'd have to design
your book and style sheet so that you avoided the bugs and unimplemented
features of the processor. Antenna House probably produces the most
polished output, and I'd use it if all I wanted to do was print out a
document from my laser printer. However, since I need PDF files I can
send to my editors and download to a typesetter, my choice for the time
being is PassiveTeX.

| Elliotte Rusty Harold | [EMAIL PROTECTED] | Writer/Programmer |
|          The XML Bible, 2nd Edition (Hungry Minds, 2001)           |
|              http://www.ibiblio.org/xml/books/bible2/              |
|   http://www.amazon.com/exec/obidos/ISBN=0764547607/cafeaulaitA/   |
|  Read Cafe au Lait for Java News:  http://www.cafeaulait.org/      |
|  Read Cafe con Leche for XML News: http://www.ibiblio.org/xml/     |

To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]

Reply via email to