AH Formatter / XSL Formatter
Q&A



XSLT/XSL-FO/SVG/MathML Conformance

XSL-FO

Top
Basic, General
About AH Formatter
About XSL Formatter
Operation
Programming
XSLT/XSL-FO/SVG/MathML Conformance
XSLT/XSL-FO/MathML Technics
Index
Q.  I specified width="100%" for the nested table. However, the width of an inside table doesn't extend up to the width of the cell, and there is space in the right side. Why? [No.2004050602]
A. 

In your FO:

<fo:block margin-right="8.0px" margin-left="8.0px" ...>
  ...
  <fo:table margin-right="2.0px" margin-left="2.0px"
            border-left-width="2.0px" border-right-width="2.0px" ...
            width="100.0%">
    ...
      <fo:table-cell padding-left="1.0px" padding-right="1.0px" ...>
        <fo:block>
          ...
          <fo:table margin-right="0pt" margin-left="0pt"
                    border-left-width="2.0px" border-right-width="2.0px" ...
                    width="100.0%">
            ...
              <fo:table-cell padding-left="1.0px" padding-right="1.0px" ...>
                <fo:block>
                  <fo:table margin-right="0pt" margin-left="0pt"
                    border-left-width="2.0px" border-right-width="2.0px" ...
                    width="100.0%">
                    ...

It is important that the base value of the width of the area for which % was specified is width of content-rectangle of the parents area in the area. The first outside table width (width=100%) is width of content-rectangle of block where the table is included. margin-right="8.0px" and margin-left="8.0px" are specified for this block. Therefore, tables narrow more than the width of region-body by the value (16px).

The second table similarly has the width of content-rectangle of the parents' block. This block has the inherited indent value. This indent value is total value of margin-left/right (each 2px) and border-left/right (each 2px) specified for an outside table. Please refer to 5.3.2 Margin, Space, and Indent Properties in the W3C Recommendation for XSL-FO. Therefore, it narrows more than the width of an outside cell by this value (total 8px).

The third table is also similar to the second table. However, because margin-left/right specified for the second table is 0pt, a value that is narrower than the width of an outside cell is border-left/right of the second table (total 4px).


Copyright © 1999-2011 Antenna House, Inc. All rights reserved.
Antenna House is a trademark of Antenna House, Inc.