lmi
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [lmi] help with orphan-control in xsl-fo


From: Vaclav Slavik
Subject: Re: [lmi] help with orphan-control in xsl-fo
Date: Sun, 17 May 2009 12:24:26 +0200

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.

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.

Vaclav





reply via email to

[Prev in Thread] Current Thread [Next in Thread]