W3C home > Mailing lists > Public > www-xsl-fo@w3.org > August 2006

Re: FOPException: Currently only Table Rows are supported in table body, header and footer

From: Mukul Gandhi <gandhi.mukul@gmail.com>
Date: Tue, 29 Aug 2006 21:45:41 +0530
Message-ID: <7870f82e0608290915k5f92e689m6349c7b4b76e19e2@mail.gmail.com>
To: Shital_Patil <Shital_Patil@infosys.com>
Cc: www-xsl-fo@w3.org
Posting attachments is banned on the list. Hope you'll be cautious next
time. If you really need to share your files, one way is you could post on
some server and give us the URL.

I debugged your code, and found the mistake.

In one of your table definition, there is an instruction:

  <xsl:when test="loan/product/productType = $PROD3">
     <fo:block font-size="7.3pt" font-family="Courier" line-height="10.5pt
     <fo:table-row height="16pt">

This generates the XSL-FO code:

      <fo:block line-height="10.5pt" font-family="Courier" font-size="7.3pt"/>
<!-- THIS IS WRONG -->
      <fo:table-row height="16pt">
       <fo:table-cell height="16pt">
        <fo:block line-height="10.5pt" font-family="Courier" font-size="

Please remove the line:
<fo:block line-height="10.5pt" font-family="Courier" font-size="7.3pt"/>

and your stylesheet will run fine.

I would like to share how I debugged your code.

If you run FOP like this:
fop -xml disburse.xml -xsl TW_TEMPLATE-Disbursement.xml -pdf test.pdf
you cannot see on which line there is the problem.

To debug, you must run FOP as 2 seperate steps:
Step 1 - Run Xalan as
java org.apache.xalan.xslt.Process -in disburse.xml -xsl TW_TEMPLATE-
Disbursement.xml -out test.fo

Step 2 - Run FOP as
fop -fo test.fo -pdf test.pdf
This step gives you the line number where the problem is.

On 8/28/06, Shital_Patil <Shital_Patil@infosys.com> wrote:

>   Hi
> When I am trying to run the XLT to get the PDF I am getting following
> error:
> javax.xml.transform.TransformerException: org.apache.fop.apps.FOPException:
> Currently only Table Rows are supported in table body, header and footer
> Please find the attachment for XML and XSLT file.
> Please give me the pointers why it's creating problem.
> Thanks & Regards
> Shital

Mukul Gandhi

Received on Tuesday, 29 August 2006 16:16:04 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 23:10:04 UTC