You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-dev@xmlgraphics.apache.org by bu...@apache.org on 2001/04/12 14:56:36 UTC

[Bug 1318] New - problems with tables (column width and when used in the xsl-after-region)

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=1318

*** shadow/1318	Thu Apr 12 05:56:36 2001
--- shadow/1318.tmp.21934	Thu Apr 12 05:56:36 2001
***************
*** 0 ****
--- 1,434 ----
+ +============================================================================+
+ | problems with tables (column width and when used in the xsl-after-region)  |
+ +----------------------------------------------------------------------------+
+ |        Bug #: 1318                        Product: Fop                     |
+ |       Status: NEW                         Version: 0.17                    |
+ |   Resolution:                            Platform: PC                      |
+ |     Severity: Normal                   OS/Version: Windows NT/2K           |
+ |     Priority: Medium                    Component: page-master/layout      |
+ +----------------------------------------------------------------------------+
+ |  Assigned To: Arved_37@chebucto.ns.ca,fop-dev@xml.apache.org               |
+ |  Reported By: patrick.schonckert@lombard.lu                                |
+ |      CC list: Cc:                                                          |
+ +----------------------------------------------------------------------------+
+ |          URL:                                                              |
+ +============================================================================+
+ |                              DESCRIPTION                                   |
+ When upgrading my system to FOP 0.17 I noticed the following two bugs in 
+ version 0.17 related to the use of tables :
+ 
+ 1. When using tables that have no border at all but that contain some columns 
+ that exceed 350pt, the content of the columns that follow does not get 
+ correctly positioned (however you do not have that problem when you specify a 
+ border of at least 1pt). This problem did not occur with FOP 0.12x (and quite 
+ annoying as I have some reports that need much more than 350pt)
+ 
+ 2. In the xsl-after-region, I also use a table. The last column for some 
+ reasons does not get completely displayed although it contains less data than 
+ the first column (which is correctly displayed). When you play with the 
+ <fo:region-after extent="xxx"/>, you end up getting the third column displayed 
+ correctly. This is not very logical as the height must be correct if FOP 
+ manages to render correctly the first column (and also quite annoying because 
+ of the waste of space).
+ 
+ Appended FO file :
+ The first page contains the wrong display, 
+ The second page contains the expected result (by playing with the column-width 
+ and extend attributes)
+ 
+ <?xml version="1.0" encoding="UTF-8"?>
+ <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 
+ xmlns:fo="http://www.w3.org/1999/XSL/Format" version="1.0">
+   <xsl:template match="/">  
+     <fo:root>
+       <xsl:apply-templates/>
+     </fo:root>
+   </xsl:template>
+ 
+   <xsl:template match="LOMBARD">
+     <fo:layout-master-set>
+       <!-- the layout to be used for the cover page -->
+       <fo:simple-page-master master-name="cover" page-width="297mm" page-
+ height="210mm" margin-left="30pt" 
+        margin-right="30pt" margin-top="10pt" margin-bottom="10pt">
+         <fo:region-body margin-top="10pt" margin-bottom="110pt" margin-
+ left="10pt" margin-right="10pt"/>
+         <fo:region-before extent="170pt"/>
+         <fo:region-after extent="90pt"/>
+       </fo:simple-page-master>
+ 
+       <!-- the layout to be used for the summary page -->
+       <fo:simple-page-master master-name="summary" page-width="297mm" page-
+ height="210mm" margin-left="30pt" 
+        margin-right="30pt" margin-top="10pt" margin-bottom="10pt">
+         <fo:region-body margin-top="10pt" margin-bottom="110pt" margin-
+ left="10pt" margin-right="10pt"/>
+         <fo:region-before extent="170pt"/>
+         <fo:region-after extent="110pt"/>
+       </fo:simple-page-master>
+     </fo:layout-master-set>
+ 
+     <!-- the cover page -->
+     <fo:page-sequence master-name="cover">
+       <fo:static-content flow-name="xsl-region-after">
+         <fo:block line-height="1pt"><fo:leader leader-pattern="rule" leader-
+ length="760pt"/></fo:block>
+       <fo:table>
+ 	<fo:table-column column-width="288pt"/>
+ 	<fo:table-column column-width="200pt"/>
+ 	<fo:table-column column-width="268pt"/>
+ 	<fo:table-body>
+   	  <fo:table-row line-height="7pt">
+           <fo:table-cell>
+ 	    <fo:block font-size="7pt" font-family="sans-serif" text-
+ align="center">
+ 	      <fo:block space-before.optimum="5pt" >BlaBla 1</fo:block>
+ 	      <fo:block>BlaBla 2</fo:block>
+ 	      <fo:block space-before.optimum="5pt">BlaBla 3</fo:block>
+ 	      <fo:block>BlaBla 4</fo:block>
+ 	      <fo:block>BlaBla 5</fo:block>
+ 	      <fo:block>BlaBla 6</fo:block>
+             </fo:block>
+ 	    <fo:block font-style="italic" text-align="start" font-size="7pt" 
+ space-before.optimum="5pt"
+              font-family="sans-serif">SIGNATURE : xxxxx</fo:block>
+ 	  </fo:table-cell>
+ 	  <fo:table-cell>
+ 	    <fo:block space-before.optimum="10pt" text-align="center" font-
+ size="7pt" font-family="sans-serif">
+                - Page <fo:page-number/> -
+   	    </fo:block>
+ 	  </fo:table-cell>
+ 	  <fo:table-cell>
+ 	    <fo:block font-size="7pt" font-family="sans-serif" text-
+ align="center">
+ 	      <fo:block space-before.optimum="5pt" >BlaBla 1</fo:block>
+ 	      <fo:block>BlaBla 2</fo:block>
+ 	      <fo:block space-before.optimum="5pt">BlaBla 3</fo:block>
+ 	      <fo:block>BlaBla 4</fo:block>
+ 	      <fo:block>BlaBla 5</fo:block>
+ 	      <fo:block>BlaBla 6</fo:block>
+             </fo:block>
+ 	  </fo:table-cell>	  
+ 	  </fo:table-row>
+ 	</fo:table-body>
+       </fo:table>
+      </fo:static-content>
+ 
+       <fo:flow flow-name="xsl-region-body">
+        <fo:block>
+   <fo:block font-weight="bold">Problem 1:</fo:block>
+   <fo:block>First column 450pt, each table cell has a border of 1pt :</fo:block>
+   <fo:table>
+       <fo:table-column column-width="450pt" border-width="0pt"/>
+       <fo:table-column column-width="100pt" border-width="0pt"/>
+       <fo:table-body>                 
+         <fo:table-row line-height="12pt">
+ 	  <fo:table-cell border-width="1pt"><fo:block text-
+ align="start">AAA</fo:block></fo:table-cell>
+ 	  <fo:table-cell border-width="1pt"><fo:block text-
+ align="end">100.00</fo:block></fo:table-cell>	
+         </fo:table-row>
+         <fo:table-row line-height="12pt">
+ 	  <fo:table-cell border-width="1pt"><fo:block text-
+ align="start">AAABBB</fo:block></fo:table-cell>
+ 	  <fo:table-cell border-width="1pt"><fo:block text-
+ align="end">1,000.00</fo:block></fo:table-cell>	
+         </fo:table-row>
+         <fo:table-row line-height="12pt">
+ 	  <fo:table-cell border-width="1pt"><fo:block text-
+ align="start">AAABBBCCC</fo:block></fo:table-cell>
+ 	  <fo:table-cell border-width="1pt"><fo:block text-
+ align="end">10,000.00</fo:block></fo:table-cell>	
+         </fo:table-row>
+         <fo:table-row line-height="12pt">
+ 	  <fo:table-cell border-width="1pt"><fo:block text-
+ align="start">AAA</fo:block></fo:table-cell>
+ 	  <fo:table-cell border-width="1pt"><fo:block text-
+ align="end">100.00</fo:block></fo:table-cell>	
+         </fo:table-row>
+         <fo:table-row line-height="12pt">
+ 	  <fo:table-cell border-width="1pt"><fo:block text-
+ align="start">AAA</fo:block></fo:table-cell>
+ 	  <fo:table-cell border-width="1pt"><fo:block text-
+ align="end">1000,000.00</fo:block></fo:table-cell>	
+         </fo:table-row>
+       </fo:table-body>
+     </fo:table>	
+ 
+     <fo:block space-before.optimum="15pt">Exactly the same table but with each 
+ table cell having a border of 0pt :</fo:block>
+     <fo:table>
+       <fo:table-column column-width="450pt" border-width="0pt"/>
+       <fo:table-column column-width="100pt" border-width="0pt"/>
+       <fo:table-body>                 
+         <fo:table-row line-height="12pt">
+ 	  <fo:table-cell border-width="0pt"><fo:block text-
+ align="start">AAA</fo:block></fo:table-cell>
+ 	  <fo:table-cell border-width="0pt"><fo:block text-
+ align="end">100.00</fo:block></fo:table-cell>	
+         </fo:table-row>
+         <fo:table-row line-height="12pt">
+ 	  <fo:table-cell border-width="0pt"><fo:block text-
+ align="start">AAABBB</fo:block></fo:table-cell>
+ 	  <fo:table-cell border-width="0pt"><fo:block text-
+ align="end">1,000.00</fo:block></fo:table-cell>	
+         </fo:table-row>
+         <fo:table-row line-height="12pt">
+ 	  <fo:table-cell border-width="0pt"><fo:block text-
+ align="start">AAABBBCCC</fo:block></fo:table-cell>
+ 	  <fo:table-cell border-width="0pt"><fo:block text-
+ align="end">10,000.00</fo:block></fo:table-cell>	
+         </fo:table-row>
+         <fo:table-row line-height="12pt">
+ 	  <fo:table-cell border-width="0pt"><fo:block text-
+ align="start">AAA</fo:block></fo:table-cell>
+ 	  <fo:table-cell border-width="0pt"><fo:block text-
+ align="end">100.00</fo:block></fo:table-cell>	
+         </fo:table-row>
+         <fo:table-row line-height="12pt">
+ 	  <fo:table-cell border-width="0pt"><fo:block text-
+ align="start">AAA</fo:block></fo:table-cell>
+ 	  <fo:table-cell border-width="0pt"><fo:block text-
+ align="end">1000,000.00</fo:block></fo:table-cell>	
+         </fo:table-row>
+       </fo:table-body>
+     </fo:table>	
+ 
+     <fo:block space-before.optimum="15pt">Exactly the same table but no table 
+ cell has any border-width specified.</fo:block>
+     <fo:table>
+       <fo:table-column column-width="450pt"/>
+       <fo:table-column column-width="100pt"/>
+       <fo:table-body>                 
+         <fo:table-row line-height="12pt">
+ 	  <fo:table-cell><fo:block text-align="start">AAA</fo:block></fo:table-
+ cell>
+ 	  <fo:table-cell><fo:block text-align="end">100.00</fo:block></fo:table-
+ cell>	
+         </fo:table-row>
+         <fo:table-row line-height="12pt">
+ 	  <fo:table-cell><fo:block text-
+ align="start">AAABBB</fo:block></fo:table-cell>
+ 	  <fo:table-cell><fo:block text-
+ align="end">1,000.00</fo:block></fo:table-cell>	
+         </fo:table-row>
+         <fo:table-row line-height="12pt">
+ 	  <fo:table-cell><fo:block text-
+ align="start">AAABBBCCC</fo:block></fo:table-cell>
+ 	  <fo:table-cell><fo:block text-
+ align="end">10,000.00</fo:block></fo:table-cell>	
+         </fo:table-row>
+         <fo:table-row line-height="12pt">
+ 	  <fo:table-cell><fo:block text-align="start">AAA</fo:block></fo:table-
+ cell>
+ 	  <fo:table-cell><fo:block text-align="end">100.00</fo:block></fo:table-
+ cell>	
+         </fo:table-row>
+         <fo:table-row line-height="12pt">
+ 	  <fo:table-cell><fo:block text-align="start">AAA</fo:block></fo:table-
+ cell>
+ 	  <fo:table-cell><fo:block text-
+ align="end">1000,000.00</fo:block></fo:table-cell>	
+         </fo:table-row>
+       </fo:table-body>
+     </fo:table>	
+        </fo:block>
+        <fo:block space-before.optimum="55pt" font-weight="bold">Problem 
+ 2:</fo:block>
+        <fo:block>
+  	 The flow-name="xsl-region-after" does not display properly all the 
+ data contained in the 3rd column (it simply          
+ 
+ stops after the 2nd block (the first column however is properly displayed 
+ although it contains a supplementary 
+          block).
+        </fo:block>
+      </fo:flow>    
+    </fo:page-sequence>
+ 
+     <!-- the summary page -->
+     <fo:page-sequence master-name="summary" initial-page-number="2" >
+       <fo:static-content flow-name="xsl-region-after">
+         <fo:block line-height="1pt"><fo:leader leader-pattern="rule" leader-
+ length="760pt"/></fo:block>
+       <fo:table>
+ 	<fo:table-column column-width="288pt"/>
+ 	<fo:table-column column-width="200pt"/>
+ 	<fo:table-column column-width="268pt"/>
+ 	<fo:table-body>
+   	  <fo:table-row line-height="7pt">
+           <fo:table-cell>
+ 	    <fo:block font-size="7pt" font-family="sans-serif" text-
+ align="center">
+ 	      <fo:block space-before.optimum="5pt" >BlaBla 1</fo:block>
+ 	      <fo:block>BlaBla 2</fo:block>
+ 	      <fo:block space-before.optimum="5pt">BlaBla 3</fo:block>
+ 	      <fo:block>BlaBla 4</fo:block>
+ 	      <fo:block>BlaBla 5</fo:block>
+ 	      <fo:block>BlaBla 6</fo:block>
+             </fo:block>
+ 	    <fo:block font-style="italic" text-align="start" font-size="7pt" 
+ space-before.optimum="5pt"
+              font-family="sans-serif">SIGNATURE : xxxxx</fo:block>
+ 	  </fo:table-cell>
+ 	  <fo:table-cell>
+ 	    <fo:block space-before.optimum="10pt" text-align="center" font-
+ size="7pt" font-family="sans-serif">
+                - Page <fo:page-number/> -
+   	    </fo:block>
+ 	  </fo:table-cell>
+ 	  <fo:table-cell>
+ 	    <fo:block font-size="7pt" font-family="sans-serif" text-
+ align="center">
+ 	      <fo:block space-before.optimum="5pt" >BlaBla 1</fo:block>
+ 	      <fo:block>BlaBla 2</fo:block>
+ 	      <fo:block space-before.optimum="5pt">BlaBla 3</fo:block>
+ 	      <fo:block>BlaBla 4</fo:block>
+ 	      <fo:block>BlaBla 5</fo:block>
+ 	      <fo:block>BlaBla 6</fo:block>
+             </fo:block>
+ 	  </fo:table-cell>	  
+ 	  </fo:table-row>
+ 	</fo:table-body>
+       </fo:table>
+      </fo:static-content>
+ 
+      <fo:flow flow-name="xsl-region-body">
+        <fo:block space-after.optimum="25pt">
+  	 The only difference with the previous table is that the first column 
+ width is 350pt, all columns following 
+ 	 a column that is larger than 350pt get shifted...
+        </fo:block>
+        <fo:block>	
+   <fo:block font-weight="bold">Problem 1:</fo:block>
+   <fo:block>Same as on previous page but first column has always a width of 
+ 350pt</fo:block>
+   <fo:block space-after.optimum="15pt">First column 350pt, each table cell has 
+ a border of 1pt :</fo:block>
+   <fo:table>
+       <fo:table-column column-width="350pt" border-width="0pt"/>
+       <fo:table-column column-width="100pt" border-width="0pt"/>
+       <fo:table-body>                 
+         <fo:table-row line-height="12pt">
+ 	  <fo:table-cell border-width="1pt"><fo:block text-
+ align="start">AAA</fo:block></fo:table-cell>
+ 	  <fo:table-cell border-width="1pt"><fo:block text-
+ align="end">100.00</fo:block></fo:table-cell>	
+         </fo:table-row>
+         <fo:table-row line-height="12pt">
+ 	  <fo:table-cell border-width="1pt"><fo:block text-
+ align="start">AAABBB</fo:block></fo:table-cell>
+ 	  <fo:table-cell border-width="1pt"><fo:block text-
+ align="end">1,000.00</fo:block></fo:table-cell>	
+         </fo:table-row>
+         <fo:table-row line-height="12pt">
+ 	  <fo:table-cell border-width="1pt"><fo:block text-
+ align="start">AAABBBCCC</fo:block></fo:table-cell>
+ 	  <fo:table-cell border-width="1pt"><fo:block text-
+ align="end">10,000.00</fo:block></fo:table-cell>	
+         </fo:table-row>
+         <fo:table-row line-height="12pt">
+ 	  <fo:table-cell border-width="1pt"><fo:block text-
+ align="start">AAA</fo:block></fo:table-cell>
+ 	  <fo:table-cell border-width="1pt"><fo:block text-
+ align="end">100.00</fo:block></fo:table-cell>	
+         </fo:table-row>
+         <fo:table-row line-height="12pt">
+ 	  <fo:table-cell border-width="1pt"><fo:block text-
+ align="start">AAA</fo:block></fo:table-cell>
+ 	  <fo:table-cell border-width="1pt"><fo:block text-
+ align="end">1000,000.00</fo:block></fo:table-cell>	
+         </fo:table-row>
+       </fo:table-body>
+     </fo:table>	
+ 
+     <fo:block space-before.optimum="15pt">Exactly the same table but with each 
+ table cell having a border of 0pt :</fo:block>
+     <fo:table>
+       <fo:table-column column-width="350pt" border-width="0pt"/>
+       <fo:table-column column-width="100pt" border-width="0pt"/>
+       <fo:table-body>                 
+         <fo:table-row line-height="12pt">
+ 	  <fo:table-cell border-width="0pt"><fo:block text-
+ align="start">AAA</fo:block></fo:table-cell>
+ 	  <fo:table-cell border-width="0pt"><fo:block text-
+ align="end">100.00</fo:block></fo:table-cell>	
+         </fo:table-row>
+         <fo:table-row line-height="12pt">
+ 	  <fo:table-cell border-width="0pt"><fo:block text-
+ align="start">AAABBB</fo:block></fo:table-cell>
+ 	  <fo:table-cell border-width="0pt"><fo:block text-
+ align="end">1,000.00</fo:block></fo:table-cell>	
+         </fo:table-row>
+         <fo:table-row line-height="12pt">
+ 	  <fo:table-cell border-width="0pt"><fo:block text-
+ align="start">AAABBBCCC</fo:block></fo:table-cell>
+ 	  <fo:table-cell border-width="0pt"><fo:block text-
+ align="end">10,000.00</fo:block></fo:table-cell>	
+         </fo:table-row>
+         <fo:table-row line-height="12pt">
+ 	  <fo:table-cell border-width="0pt"><fo:block text-
+ align="start">AAA</fo:block></fo:table-cell>
+ 	  <fo:table-cell border-width="0pt"><fo:block text-
+ align="end">100.00</fo:block></fo:table-cell>	
+         </fo:table-row>
+         <fo:table-row line-height="12pt">
+ 	  <fo:table-cell border-width="0pt"><fo:block text-
+ align="start">AAA</fo:block></fo:table-cell>
+ 	  <fo:table-cell border-width="0pt"><fo:block text-
+ align="end">1000,000.00</fo:block></fo:table-cell>	
+         </fo:table-row>
+       </fo:table-body>
+     </fo:table>	
+ 
+     <fo:block space-before.optimum="15pt">Exactly the same table but no table 
+ cell has any border-width specified.</fo:block>
+     <fo:table>
+       <fo:table-column column-width="350pt"/>
+       <fo:table-column column-width="100pt"/>
+       <fo:table-body>                 
+         <fo:table-row line-height="12pt">
+ 	  <fo:table-cell><fo:block text-align="start">AAA</fo:block></fo:table-
+ cell>
+ 	  <fo:table-cell><fo:block text-align="end">100.00</fo:block></fo:table-
+ cell>	
+         </fo:table-row>
+         <fo:table-row line-height="12pt">
+ 	  <fo:table-cell><fo:block text-
+ align="start">AAABBB</fo:block></fo:table-cell>
+ 	  <fo:table-cell><fo:block text-
+ align="end">1,000.00</fo:block></fo:table-cell>	
+         </fo:table-row>
+         <fo:table-row line-height="12pt">
+ 	  <fo:table-cell><fo:block text-
+ align="start">AAABBBCCC</fo:block></fo:table-cell>
+ 	  <fo:table-cell><fo:block text-
+ align="end">10,000.00</fo:block></fo:table-cell>	
+         </fo:table-row>
+         <fo:table-row line-height="12pt">
+ 	  <fo:table-cell><fo:block text-align="start">AAA</fo:block></fo:table-
+ cell>
+ 	  <fo:table-cell><fo:block text-align="end">100.00</fo:block></fo:table-
+ cell>	
+         </fo:table-row>
+         <fo:table-row line-height="12pt">
+ 	  <fo:table-cell><fo:block text-align="start">AAA</fo:block></fo:table-
+ cell>
+ 	  <fo:table-cell><fo:block text-
+ align="end">1000,000.00</fo:block></fo:table-cell>	
+         </fo:table-row>
+       </fo:table-body>
+     </fo:table>
+        </fo:block>
+        <fo:block space-before.optimum="55pt" font-weight="bold">Problem 
+ 2:</fo:block>
+          <fo:block>
+  	 The only difference with the previous table is that the simple-page-
+ master "summary" has the 
+         region-after extent="110pt" (instead of 90 as before).
+        </fo:block>
+      </fo:flow>
+    </fo:page-sequence>
+  </xsl:template>
+ </xsl:stylesheet>

---------------------------------------------------------------------
To unsubscribe, e-mail: fop-dev-unsubscribe@xml.apache.org
For additional commands, email: fop-dev-help@xml.apache.org