]> source.dussan.org Git - xmlgraphics-fop.git/commitdiff
Examples 8-11 added to check:
authorGlen Mazza <gmazza@apache.org>
Wed, 20 Aug 2003 22:04:51 +0000 (22:04 +0000)
committerGlen Mazza <gmazza@apache.org>
Wed, 20 Aug 2003 22:04:51 +0000 (22:04 +0000)
1) implementation of border properties (border-color,
border-width, border-style, etc.) at the fo:table-row and fo:table-column level.
2) border property conflict resolutions as defined in CSS2 standard at
http://www.w3.org/TR/REC-CSS2/tables.html#border-conflict-resolution

git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@196819 13f79535-47bb-0310-9956-ffa450edef68

examples/fo/tables/borders.fo

index d1c119c33e777100627e3715b7a4d7c698849f86..b649f5505f0e311e6c822f642d6ce35fe0a2f8bc 100644 (file)
   </fo:table-body>
       </fo:table>
 
-      <fo:block space-before.optimum="15pt" space-after.optimum="15pt">
-      Table 1: row borders
+      <fo:block space-before.optimum="30pt" space-after.optimum="15pt">
+      Table 2: row borders
       </fo:block>
 
       <fo:table border-collapse="separate">
   </fo:table-body>
       </fo:table>
 
-      <fo:block space-before.optimum="15pt" space-after.optimum="15pt">
-      Table 1: column borders
+      <fo:block space-before.optimum="30pt" space-after.optimum="15pt">
+      Table 3: column borders
       </fo:block>
 
       <fo:table border-collapse="separate">
   </fo:table-body>
       </fo:table>
 
-      <fo:block space-before.optimum="15pt" space-after.optimum="15pt">
-      Table 1: column borders over page
+      <fo:block space-before.optimum="30pt" space-after.optimum="15pt">
+      Table 4: column borders over page
       </fo:block>
 
       <fo:table border-collapse="separate">
   </fo:table-body>
       </fo:table>
 
-      <fo:block space-before.optimum="15pt" space-after.optimum="15pt">
-      Table 1: body borders
+      <fo:block space-before.optimum="30pt" space-after.optimum="15pt">
+      Table 5: body borders
       </fo:block>
 
       <fo:table border-collapse="separate">
   </fo:table-body>
       </fo:table>
 
-      <fo:block space-before.optimum="15pt" space-after.optimum="15pt">
-      Table 1: table borders
+      <fo:block space-before.optimum="30pt" space-after.optimum="15pt">
+      Table 6: table borders
       </fo:block>
 
       <fo:table border-left-color="green" border-left-width="0.5pt" border-left-style="solid"
   </fo:table-body>
       </fo:table>
 
-      <fo:block space-before.optimum="15pt" space-after.optimum="15pt">
-      Table 1: combinations
+      <fo:block space-before.optimum="30pt" space-after.optimum="15pt">
+      Table 7: combinations
       </fo:block>
 
       <fo:table border-left-color="green" border-left-width="0.5pt" border-left-style="solid" border-collapse="separate">
   </fo:table-body>
       </fo:table>
 
+  <fo:block space-before.optimum="30pt" space-after.optimum="15pt">
+  Table 8:  This is a table with border properties (border-style, 
+  border-width, border-color) defined at the fo:table-column and 
+  fo:table-row level.  Not all properties are currently 
+  implemented--check the compliance page on the FOP website for current 
+  implementation status.
+  </fo:block>
+
+    <fo:table border-collapse="collapse" table-layout="fixed">
+    <fo:table-column column-width="3cm" border-color="blue" border-width="0.5pt" border-style="solid"/>
+    <fo:table-column column-width="3cm" border-color="blue" border-width="0.5pt" border-style="solid"/>
+    <fo:table-column column-width="3cm" border-color="blue" border-width="0.5pt" border-style="solid"/>
+
+    <fo:table-body>
+         <fo:table-row border-color="blue" border-width="0.5pt" border-style="solid">
+           <fo:table-cell>
+             <fo:block text-align="center">
+             (1,1)
+             </fo:block>
+           </fo:table-cell>
+           <fo:table-cell>
+             <fo:block text-align="center">
+             (1,2)
+             </fo:block>
+           </fo:table-cell>
+           <fo:table-cell>
+             <fo:block text-align="center">
+             (1,3)
+             </fo:block>
+           </fo:table-cell>
+         </fo:table-row>
+         <fo:table-row  border-color="blue" border-width="0.5pt" border-style="solid">
+           <fo:table-cell>
+             <fo:block text-align="center">
+             (2,1)
+             </fo:block>
+           </fo:table-cell>
+           <fo:table-cell>
+             <fo:block text-align="center">
+             (2,2)
+             </fo:block>
+           </fo:table-cell>
+           <fo:table-cell>
+             <fo:block text-align="center">
+             (2,3)
+             </fo:block>
+           </fo:table-cell>
+         </fo:table-row>
+         <fo:table-row  border-color="blue" border-width="0.5pt" border-style="solid">
+           <fo:table-cell>
+             <fo:block text-align="center">
+             (3,1)
+             </fo:block>
+           </fo:table-cell>
+           <fo:table-cell>
+             <fo:block text-align="center">
+             (3,2)
+             </fo:block>
+           </fo:table-cell>
+           <fo:table-cell>
+             <fo:block text-align="center">
+             (3,3)
+             </fo:block>
+           </fo:table-cell>
+         </fo:table-row>
+       </fo:table-body>
+      </fo:table>
+
+  <fo:block space-before.optimum="30pt" space-after.optimum="15pt">
+  Table 9: This table has border properties defined at the 
+  fo:table-cell level.
+  </fo:block>
+
+    <fo:table border-collapse="collapse" table-layout="fixed">
+    <fo:table-column column-width="3cm"/>
+    <fo:table-column column-width="3cm"/>
+    <fo:table-column column-width="3cm"/>
+
+    <fo:table-body>
+         <fo:table-row>
+           <fo:table-cell border-color="blue" border-width="0.5pt" border-style="solid">
+             <fo:block text-align="center">
+             (1,1)
+             </fo:block>
+           </fo:table-cell>
+           <fo:table-cell border-color="blue" border-width="0.5pt" border-style="solid">
+             <fo:block text-align="center">
+             (1,2)
+             </fo:block>
+           </fo:table-cell>
+           <fo:table-cell border-color="blue" border-width="0.5pt" border-style="solid">
+             <fo:block text-align="center">
+             (1,3)
+             </fo:block>
+           </fo:table-cell>
+         </fo:table-row>
+         <fo:table-row>
+           <fo:table-cell border-color="blue" border-width="0.5pt" border-style="solid">
+             <fo:block text-align="center">
+             (2,1)
+             </fo:block>
+           </fo:table-cell>
+           <fo:table-cell border-color="blue" border-width="0.5pt" border-style="solid">
+             <fo:block text-align="center">
+             (2,2)
+             </fo:block>
+           </fo:table-cell>
+           <fo:table-cell border-color="blue" border-width="0.5pt" border-style="solid">
+             <fo:block text-align="center">
+             (2,3)
+             </fo:block>
+           </fo:table-cell>
+         </fo:table-row>
+         <fo:table-row>
+           <fo:table-cell border-color="blue" border-width="0.5pt" border-style="solid">
+             <fo:block text-align="center">
+             (3,1)
+             </fo:block>
+           </fo:table-cell>
+           <fo:table-cell border-color="blue" border-width="0.5pt" border-style="solid">
+             <fo:block text-align="center">
+             (3,2)
+             </fo:block>
+           </fo:table-cell>
+           <fo:table-cell border-color="blue" border-width="0.5pt" border-style="solid">
+             <fo:block text-align="center">
+             (3,3)
+             </fo:block>
+           </fo:table-cell>
+         </fo:table-row>
+       </fo:table-body>
+      </fo:table>
+
+  <fo:block space-before.optimum="30pt" space-after.optimum="15pt">
+  Table 10: This example is the first example given in the CSS2 border conflict 
+  resolution rules.  
+  (See http://www.w3.org/TR/REC-CSS2/tables.html#border-conflict-resolution)
+  Not all properties are currently implemented--Check the FOP compliance page
+  for current implementation status.
+  </fo:block>
+
+    <fo:table border-collapse="collapse" table-layout="fixed" 
+        border-style="solid" border-width="5pt" border-color="yellow">
+    <fo:table-column column-width="3cm" 
+        border-style="solid" border-width="3pt" border-color="black"/>
+    <fo:table-column column-width="3cm"/>
+    <fo:table-column column-width="3cm"/>
+
+    <fo:table-body>
+         <fo:table-row>
+           <fo:table-cell border-style="solid" border-width="1pt" border-color="red" padding="1em">
+             <fo:block text-align="center">
+             1
+             </fo:block>
+           </fo:table-cell>
+           <fo:table-cell border-style="solid" border-width="1pt" border-color="red" padding="1em">
+             <fo:block text-align="center">
+             2
+             </fo:block>
+           </fo:table-cell>
+           <fo:table-cell border-style="solid" border-width="1pt" border-color="red" padding="1em">
+             <fo:block text-align="center">
+             3
+             </fo:block>
+           </fo:table-cell>
+         </fo:table-row>
+         <fo:table-row>
+           <fo:table-cell border-style="solid" border-width="1pt" border-color="red" padding="1em">
+             <fo:block text-align="center">
+             4
+             </fo:block>
+           </fo:table-cell>
+           <fo:table-cell border-style="dashed" border-width="5pt" border-color="blue" padding="1em">
+             <fo:block text-align="center">
+             5
+             </fo:block>
+           </fo:table-cell>
+           <fo:table-cell border-style="solid" border-width="5pt" border-color="green" padding="1em">
+             <fo:block text-align="center">
+             6
+             </fo:block>
+           </fo:table-cell>
+         </fo:table-row>
+         <fo:table-row>
+           <fo:table-cell border-style="solid" border-width="1pt" border-color="red" padding="1em">
+             <fo:block text-align="center">
+             7
+             </fo:block>
+           </fo:table-cell>
+           <fo:table-cell border-style="solid" border-width="1pt" border-color="red" padding="1em">
+             <fo:block text-align="center">
+             8
+             </fo:block>
+           </fo:table-cell>
+           <fo:table-cell border-style="solid" border-width="1pt" border-color="red" padding="1em">
+             <fo:block text-align="center">
+             9
+             </fo:block>
+           </fo:table-cell>
+         </fo:table-row>
+         <fo:table-row>
+           <fo:table-cell border-style="solid" border-width="1pt" border-color="red" padding="1em">
+             <fo:block text-align="center">
+             10
+             </fo:block>
+           </fo:table-cell>
+           <fo:table-cell border-style="solid" border-width="1pt" border-color="red" padding="1em">
+             <fo:block text-align="center">
+             11
+             </fo:block>
+           </fo:table-cell>
+           <fo:table-cell border-style="solid" border-width="1pt" border-color="red" padding="1em">
+             <fo:block text-align="center">
+             12
+             </fo:block>
+           </fo:table-cell>
+         </fo:table-row>
+         <fo:table-row>
+           <fo:table-cell border-style="solid" border-width="1pt" border-color="red" padding="1em">
+             <fo:block text-align="center">
+             13
+             </fo:block>
+           </fo:table-cell>
+           <fo:table-cell border-style="solid" border-width="1pt" border-color="red" padding="1em">
+             <fo:block text-align="center">
+             14
+             </fo:block>
+           </fo:table-cell>
+           <fo:table-cell border-style="solid" border-width="1pt" border-color="red" padding="1em">
+             <fo:block text-align="center">
+             15
+             </fo:block>
+           </fo:table-cell>
+         </fo:table-row>
+       </fo:table-body>
+      </fo:table>
+
+  <fo:block space-before.optimum="30pt" space-after.optimum="15pt">
+  Table 11: This example is a test of Rule 4 of the CSS2 border conflict 
+  resolution rules.
+  (See http://www.w3.org/TR/REC-CSS2/tables.html#border-conflict-resolution)
+  This rule gives the order of precedence of resolution to be cell (highest), 
+  then row, then column, then table (lowest), in those cases where
+  the border properties differ only on color.
+  </fo:block>
+
+    <fo:table border-collapse="collapse" table-layout="fixed">
+
+    <fo:table-column column-width="3cm" 
+        border-style="solid" border-width="3pt" border-color="black"/>
+    <fo:table-column column-width="3cm"/>
+    <fo:table-column column-width="3cm"/>
+    <fo:table-column column-width="3cm"/>
+    <fo:table-column column-width="3cm"
+        border-style="solid" border-width="3pt" border-color="black"/>
+
+    <fo:table-body>
+         <fo:table-row border-style="solid" border-width="3pt" border-color="red">
+           <fo:table-cell border-style="solid" border-width="3pt" border-color="blue">
+             <fo:block text-align="center">cell, row, col</fo:block>
+           </fo:table-cell>
+           <fo:table-cell>
+             <fo:block text-align="center">row</fo:block>
+           </fo:table-cell>
+           <fo:table-cell border-style="solid" border-width="3pt" border-color="blue">
+             <fo:block text-align="center">cell, row</fo:block>
+           </fo:table-cell>
+           <fo:table-cell>
+             <fo:block text-align="center">row</fo:block>
+           </fo:table-cell>
+           <fo:table-cell>
+             <fo:block text-align="center">row, col</fo:block>
+           </fo:table-cell>
+         </fo:table-row>
+         <fo:table-row>
+           <fo:table-cell>
+             <fo:block text-align="center">col</fo:block>
+           </fo:table-cell>
+           <fo:table-cell>
+             <fo:block text-align="center">none</fo:block>
+           </fo:table-cell>
+           <fo:table-cell>
+             <fo:block text-align="center">none</fo:block>
+           </fo:table-cell>
+           <fo:table-cell>
+             <fo:block text-align="center">none</fo:block>
+           </fo:table-cell>
+           <fo:table-cell>
+             <fo:block text-align="center">col</fo:block>
+           </fo:table-cell>
+         </fo:table-row>
+         <fo:table-row>
+           <fo:table-cell border-style="solid" border-width="3pt" border-color="blue">
+             <fo:block text-align="center">cell, col</fo:block>
+           </fo:table-cell>
+           <fo:table-cell>
+             <fo:block text-align="center">none</fo:block>
+           </fo:table-cell>
+           <fo:table-cell border-style="solid" border-width="3pt" border-color="blue">
+             <fo:block text-align="center">cell</fo:block>
+           </fo:table-cell>
+           <fo:table-cell>
+             <fo:block text-align="center">none</fo:block>
+           </fo:table-cell>
+           <fo:table-cell>
+             <fo:block text-align="center">col</fo:block>
+           </fo:table-cell>
+         </fo:table-row>
+       </fo:table-body>
+  </fo:table>
+      
     </fo:flow>
   </fo:page-sequence>
 </fo:root>