This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 6320 - Explicit Row Height, table-cells Borders and border-separation
Summary: Explicit Row Height, table-cells Borders and border-separation
Status: ASSIGNED
Alias: None
Product: XSLFO
Classification: Unclassified
Component: XSL-FO (show other bugs)
Version: 2.0 Working Draft
Hardware: All All
: P2 normal
Target Milestone: ---
Assignee: Anders Berglund
QA Contact: Mailing list for comments on XSL (XSl-FO)
URL: http://lists.w3.org/Archives/Public/x...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-12-18 14:43 UTC by Tony Graham
Modified: 2009-01-13 12:45 UTC (History)
1 user (show)

See Also:


Attachments

Description Tony Graham 2008-12-18 14:43:01 UTC
As far as I can tell the XSL-FO 1.1 Recommendation doesnt indicate 
whether an explicit height set on a table-row element should include the 
tables border-separation and the children cells border widths, or not. 
In section 7.15.6, a reference to CSS 2 is made for a discussion of the 
height property in tables, but the CSS 2 Recommendation is itself not 
clear what the height of a cell should be in this context.

Also, in section 6.7.9, fo:table-row, the row-height trait is 
mentioned but is not referenced anywhere else.

So, in the following example:
    <fo:table table-layout="fixed" width="100%" 
      border-collapse="separate"
      border="1pt solid black"
      border-separation="6pt">
      <fo:table-body font-size="8pt" line-height="10pt">
        <fo:table-row block-progression-dimension="45pt">
          <fo:table-cell border="2pt solid black">
            <fo:block>Cell 1</fo:block>
          </fo:table-cell>
          <fo:table-cell border="5pt solid black">
            <fo:block>Cell 2</fo:block>
          </fo:table-cell>
        </fo:table-row>
      </fo:table-body>
    </fo:table>

What should be the final block-progression-dimensions for the cells?
There are 3 possibilities:
1. the explicit row height shall include the cells borders and the 
   tables border-separation:
   - height of cell 1 = 3 (half of border-separation)
            + 2 (border-before)
            + 10 (b-p-d)
            + 2 (border-after)
            + 3 (half of border-separation)
            = 20pt
   - height of cell 2 = 3 + 5 + 10 + 5 + 3 = 26pt  
   - height of row = max(explicit row height, height of cell 1, height of cell 2)
                   = 45pt
   As a consequence the final block-progression-dimensions of the cells 
   are re-evaluated to match the rows explicit height:
   - b-p-d of cell 1 = 45 - (3 + 2 + 2 + 3) = 35pt
   - b-p-d of cell 2 = 45 - (3 + 5 + 5 + 3) = 29pt

2. the explicit row height shall include the cells borders but not the 
   tables border-separation:
   - height of cell 1 = 2 + 10 + 2 = 14pt
   - height of cell 2 = 5 + 10 + 5 = 20pt
   - height of row = max(45, 14, 20) = 45pt
   So the final block-progression-dimensions of the cells would be:
   - b-p-d of cell 1 = 45 - (2 + 2) = 41pt
   - b-p-d of cell 2 = 45 - (5 + 5) = 35pt

3. the explicit row height shall include only the cells 
   block-progression-dimensions:
   - height of cell 1 = 10pt
   - height of cell 2 = 10pt
   - height of row = max(45, 10, 10) = 45pt
   So the final block-progression-dimensions of the cells would be:
   - b-p-d of cell 1 = 45pt
   - b-p-d of cell 2 = 45pt
   But then what would be the final row height? Should it be re-computed 
   as in the case where the row height is left to auto? Then:
   - height of cell 1 = 2 + 45 + 2 = 49pt
   - height of cell 2 = 5 + 45 + 5 = 55pt
   - height of row = max(49, 55) = 55pt
   So final b-p-ds of the cells:
   - b-p-d of cell 1 = 55 - (2 + 2) = 51pt
   - b-p-d of cell 2 = 45pt

There are some hints in the Recommendation which would tend towards 
solution #2, but a clarification in this area would be much appreciated.
Comment 1 Tony Graham 2008-12-18 14:45:52 UTC
From http://lists.w3.org/Archives/Public/xsl-editors/2008JanMar/0011:

For version 2.0 of XSL the WG has decided to rewrite the text of
the table formatting objects to be independent of the CSS2
Recommendation in order to be able to specify more fully the expected
results that in many cases are left open by the current text with its
references. The lack of precision that you have identified will be
corrected.

As these modifications will lead to some of the existing implementations
becoming non-conformant (having taken a different imlementation choice,
that is permitted in XSL 1.0 and 1.1, than what will become normative)
the WG feels that this cannot be part of an erratum to 1.0 or 1.1, but
will have to wait until 2.0. 
Comment 2 Tony Graham 2009-01-13 12:45:07 UTC
Adding original poster as CC.  Response from original poster required to resolve bug report.