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

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:

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

This generates the XSL-FO code:

 <fo:table-body>
      <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="
6.9pt">PLEASE BE ADVISED THAT THE ABOVE MENTIONED BILL HAS BEEN </fo:block>
       </fo:table-cell>
      </fo:table-row>

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
>

-- 
Regards,
Mukul Gandhi

http://gandhimukul.tripod.com

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