Hi,

I tried replicating the issue with your code but I wasn't able to. I replaced 
the xsl:value-of with blank values. I can't see how the dates would cause an 
issue.
If you could share the complete fo to test would be appreciated.

Regards,
Joao Andre Goncalves

From: Anirban De <anirban.de2...@gmail.com>
Sent: Wednesday, August 14, 2024 12:31 PM
To: fop-users@xmlgraphics.apache.org
Subject: Validation error with stable version FOP 2.9

You don't often get email from 
anirban.de2...@gmail.com<mailto:anirban.de2...@gmail.com>. Learn why this is 
important<https://aka.ms/LearnAboutSenderIdentification>
Hi team,

We have a requirement for converting XSL-FO to PDF. Recently we have migrated 
from FOP 0.95 FOP 2.9. We are facing a problem with nested <fo:table>'s with 
the current version. The exception that we are getting is:
org.apache.fop.fo.ValidationException:the column-number or number of cells in 
the row overflows the number of fo:table-columns specified for the table. (See 
position 0:0).

Sample XSL file code like below:
 <fo:table font-size="8px" table-layout="fixed" width="100%">
            <fo:table-column column-width="proportional-column-width(1)"/>
            <fo:table-column column-width="proportional-column-width(1)"/>

            <fo:table-body>
                <fo:table-row>
                    <fo:table-cell number-columns-spanned="2">
                        <fo:table table-layout="fixed" width="100%">
                            <fo:table-column 
column-width="proportional-column-width(1)"/>
                            <fo:table-column 
column-width="proportional-column-width(1)"/>

                            <fo:table-body>
                                <fo:table-row>
                                    <fo:table-cell>
                                        <fo:block color="#0a70b6" 
font-weight="bold" font-size="9px">Individual Case Report</fo:block>
                                        <fo:block font-weight="bold">
                                            <fo:wrapper color="#0a70b6">Date 
Learned:</fo:wrapper>
                                            <fo:wrapper>
                                                <xsl:value-of 
select="dateFormat:format($dateLearned, 'yyyy-MM-dd')"/>
                                            </fo:wrapper>
                                        </fo:block>
                                    </fo:table-cell>
                                    <fo:table-cell text-align="right">
                                        <fo:block data-path="studyId" 
font-weight="bold" font-size="9px">
                                            <fo:wrapper color="#0a70b6">
                                                Protocol #
                                            </fo:wrapper>
                                            <fo:wrapper>
                                                <xsl:value-of 
select="java:getStudyId($trial)"/>
                                            </fo:wrapper>
                                        </fo:block>
                                        <fo:block font-weight="bold">
                                            <fo:wrapper color="#0a70b6">
                                                Initial Date Learned:
                                            </fo:wrapper>
                                            <fo:wrapper>
                                                <xsl:value-of 
select="dateFormat:format($initialDateLearned, 'yyyy-MM-dd')"/>
                                            </fo:wrapper>
                                        </fo:block>
                                    </fo:table-cell>
                                </fo:table-row>
                            </fo:table-body>
                        </fo:table>
                    </fo:table-cell>
                </fo:table-row>

Please guide me what changes need to be done to address the bug or exception.

Regards
Anirban

________________________________
Joao Andre Goncalves
Customer Developer

t | m 07733161880
jgoncal...@smartcommunications.com
smartcommunications.com<https://www.smartcommunications.com/>

[https://scale.smartcommunications.com/rs/041-BQO-927/images/INV24-Email-Signature-450x160_v2.png]<https://www.smartcommunications.com/resources/events/innovate/innovate-24-london/>

INNOVATE is back and bigger than ever! Join us October 8, 2024 at the Royal 
Lancaster, London. Register 
now!<https://www.smartcommunications.com/resources/events/innovate/innovate-24-london/>
 Smart Communications is a trading name of SmartComms SC Limited which is 
registered in England under No. 4303041 whose registered office is at Suite 23, 
LCLB, 95 Mortimer Street, London, W1W 7GB. Please consider the environment 
before printing. The contents of this e-mail are intended for the named 
addressee only. It contains confidential information. Unless you are the named 
addressee or an authorized designee, you may not copy or use it, or disclose it 
to anyone else. If you received it in error please notify us immediately and 
then destroy it. Smart Communications will process your data as described in 
the Smart Communications' External Privacy 
Policy.<https://www.smartcommunications.com/external-privacy-policy/>

Follow us on LinkedIn<https://www.linkedin.com/company/15166060/admin/> and 
Twitter<https://twitter.com/ccminnovators?lang=en>

Reply via email to