Hi,

Well, I use this very combination of tools that you describe, and I never
had such problems.

But I did copy your XML source and try it for myself.  Interestingly, I got
the same error:

SEVERE: Exception
java.lang.ClassCastException:
org.apache.fop.layoutmgr.inline.WrapperLayoutManager cannot be cast to
org.apache.fop.layoutmgr.BlockLevelLayoutManager

...until I commented out your <indexterm> elements and tried it again.
Then, it worked fine.  I'll take another look at this and see if I can
figure out why.

On another note, regarding your hyphenation issues; have you set up a
hyphenation pattern?  If not, you should do so now; see
http://xmlgraphics.apache.org/fop/0.93/hyphenation.html for more
information.  The hyphenation pattern can be downloaded from
http://offo.sourceforge.net/hyphenation/index.html.

Colin

On 4/11/07, T.G. Mutato <[EMAIL PROTECTED]> wrote:

Hello,

Anyone had any luck getting DocBook 4.5, XSL 1.72.0 and FOP 0.93 all
working together to produce PDF output? I've found that even a very
simple DocBook file won't compile properly with the 0.93 version of
FOP from apache.org.

Here's the sample:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE book SYSTEM "dtd/4.5/docbookx.dtd">
<book>
        <bookinfo>
                <title>My First Book</title>

                
<author><firstname>Jane</firstname><surname>Doe</surname></author>
                <copyright><year>1998</year><holder>Jane
Doe</holder></copyright>
        </bookinfo>
        <chapter id="chapterone">
                <title id="atitleid">Here's our Chapter Title</title>
                <indexterm>
                        <primary>a nice index entry</primary>
                </indexterm>
                <sect1 id="sectionone">
                        <title>Here's our Section Title</title>
                        <indexterm>
                                <primary>anothter nice index
entry</primary>
                        </indexterm>
                        <para>
                                Lorem ipsum dolor sit amet, consectetuer
adipiscing elit. In
tortor nibh, facilisis ac, consectetuer eget, malesuada
                                molestie, augue. Etiam non nibh eget elit
tincidunt commodo.
                        </para>
                </sect1>
        </chapter>
        <index id="index"/>
</book>

I'm building the fo file (on Windows) with the command:
xsltproc --nonet --xinclude --output testbook.fo pdfdoc.xsl testbook.xml

and then building (trying to) the pdf file with the command:
fop\fop.bat -fo testbook.fo -pdf testbook.pdf

FOP seems to have trouble with hyphenation so the pdfdoc.xsl file used
when building testbook.fo looks like:

<xsl:stylesheet
xmlns:xsl="http://www.w3.org/1999/XSL/Transform";
xmlns:fo="http://www.w3.org/1999/XSL/Format";
version="1.0">

<xsl:import href="xsl/1.72.0/fo/docbook.xsl"/>

<xsl:param name="hyphenate" select="'false'"/>

</xsl:stylesheet>

Running fop produces:
SEVERE: Exception
java.lang.ClassCastException:
org.apache.fop.layoutmgr.inline.WrapperLayoutManager

The new FOP processor (0.93) is supposed to be quite a bit better than
the old 0.25 version but not if it doesn't work!

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


Reply via email to