Actually, I'm surprised the process got as far is it did. The tgroup element in your
table lacks a required cols attribute. In the stock template matching on tgroup in
fo/table.xsl, it checks for the absence of that attribute and terminates processing
with this message:
Error: CALS tables must specify the number of columns.
So I'm surprised you even got a well-formed FO file to feed to FOP. Try adding the
cols attribute and see if that works.
Bob Stayton
Sagehill Enterprises
----- Original Message -----
From: "Jason Gilmore" <>
To: <>
Sent: Wednesday, June 09, 2010 12:25 PM
Subject: [docbook-apps] DocBook to FOP transformation produces "fo:table is missing
child elements."
> Hi,
>
> I'm using the following command to convert a Docbook book to PDF:
>
> xsltproc -o intermediate-fo-file.fo \
> --stringparam generate.index 1 \
> --stringparam fop1.extensions 1 \
> --stringparam double.sided 1 \
> --stringparam page.height 9in \
> --stringparam page.width 7in \
> --stringparam page.margin.inner .75in \
> --stringparam page.margin.outer .75in \
> --stringparam page.margin.top 1.0in \
> --stringparam page.margin.bottom 1.0in \
> --stringparam header.rule 0 \
> --stringparam footer.rule 0 \
> --stringparam body.start.indent 0pc \
> fostyles.xsl \
> chapters/staging/book.docbook
> fop -d -pdf EZF.pdf -fo intermediate-fo-file.fo
>
> The conversion works perfectly except for when I attempt to insert a
> table into one of the documents. Doing so produces the following error
> message:
>
> SEVERE: Exception
> javax.xml.transform.TransformerException:
> org.apache.fop.fo.ValidationException:
> file:/home/wjgilmore/books/easyphpwebsiteszendframework2e/intermediate-fo-file.fo:69:984:
> Error(69/984): fo:table is missing child elements.
> Required Content Model:
> (marker*,table-column*,table-header?,table-footer?,table-body+)
> at org.apache.fop.cli.InputHandler.transformTo(InputHandler.java:217)
> ...
>
> I'm at a loss because the table isn't anything special:
>
> <table>
> <title>Framework Conventions</title>
> <tgroup>
> <colspec colwidth="1*" />
> <colspec colwidth="2*" />
> <thead>
> <row>
> <entry>Convention</entry>
> <entry>Description</entry>
> </row>
> </thead>
> <tbody>
> <row>
> <entry>Configuration Management</entry>
> <entry>BLAH</entry>
> </row>
> </tbody>
> </tgroup>
> </table>
>
> Any ideas? Thanks much.
>
> Jason
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:
>
>
>