[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [lmi] help with orphan-control in xsl-fo
From: |
Greg Chicares |
Subject: |
Re: [lmi] help with orphan-control in xsl-fo |
Date: |
Fri, 22 Jul 2016 17:01:26 +0000 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Icedove/38.8.0 |
On 2009-05-17 10:24, Vaclav Slavik wrote:
> On Sun, 2009-05-17 at 03:36 +0000, Greg Chicares wrote:
>> SEVERE: Exception
>> javax.xml.transform.TransformerException: \
>> org.apache.fop.fo.ValidationException: Error(4889/27): \
>> column-number or number of cells in the row overflows the number of
>> \
>> fo:table-column specified for the table.
>> followed by what appears (to me) to be a java stack trace; and no pdf
>> file is produced.
I guess the older version of fop (which we still use in production) didn't
diagnose this, but this patch was supposed to have been applied nevertheless,
so...better late than never: commit 55c9fbee0f209b0627a857ea25dc3baf792eab40.
(I'm not pushing that commit yet because a release is about to be prepared.)
> Here's the fix for this error:
>
> === modified file 'reg_d_individual.xsl'
> --- reg_d_individual.xsl revid:address@hidden
> +++ reg_d_individual.xsl 2009-05-17 10:19:17 +0000
> @@ -935,7 +935,12 @@
> <fo:table-cell number-columns-spanned="7">
> <fo:block/>
> </fo:table-cell>
> - <fo:table-cell number-columns-spanned="7">
> + <fo:table-cell>
> + <xsl:attribute name="number-columns-spanned">
> + <!-- generate-table-columns adds one extra column and
> + 7 columns are taken by the table-cell above: -->
> + <xsl:value-of select="count($columns) - 7 + 1"/>
> + </xsl:attribute>
> <xsl:call-template name="header-cell-with-border"/>
> <fo:block text-align="center">
> <xsl:value-of
> select="$scalars/InitAnnSepAcctGrossInt_Guaranteed"/>
>
> Alternatively, if this header shouldn't span over the extra column (with
> proportional-column-width(1)), remove the " + 1" part. Or, if the number
> of columns is always a fixed number for this template, simply replace
> "7" with "5" (or "4") in the second <fo:table-cell> above.
We can make that decision in testing. AFAICT, the "Hypothetical" header
was intended to apply to the last four columns only. I don't know whether
that intention was correct: perhaps it should apply to the last four,
five, six, or seven.