diff options
-rw-r--r-- | examples/fo/tables/borders.fo | 335 |
1 files changed, 323 insertions, 12 deletions
diff --git a/examples/fo/tables/borders.fo b/examples/fo/tables/borders.fo index d1c119c33..b649f5505 100644 --- a/examples/fo/tables/borders.fo +++ b/examples/fo/tables/borders.fo @@ -183,8 +183,8 @@ </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"> @@ -307,8 +307,8 @@ </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"> @@ -374,8 +374,8 @@ </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"> @@ -441,8 +441,8 @@ </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"> @@ -625,8 +625,8 @@ </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" @@ -810,8 +810,8 @@ </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"> @@ -1018,6 +1018,317 @@ </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> |