[xep-support] Setting widths for table and table-cell with inches and/or %

From: Nathan Stenzel <nathanstenzel@sebis.com>
Date: Thu Nov 29 2012 - 10:24:48 PST

I have XSL that takes HTML code and translates it into XSL. There is a problem
where the HTML has too much HTML5. What the HTML5 style (as opposed to HTML4
or lower) means is that it is too hard to calculate table-column entries to
put before the table-body.

This works:

<fo:table width="5in" border="1pt solid black">
        <fo:table-body>
                <fo:table-row>
                        <fo:table-cell width="40%" border="1pt solid black">
                                <fo:block>40%</fo:block>
                        </fo:table-cell>
                        <fo:table-cell width="10%" border="1pt solid black">
                                <fo:block>10%</fo:block>
                        </fo:table-cell>
                        <fo:table-cell width="20%" border="1pt solid black">
                                <fo:block>20%</fo:block>
                        </fo:table-cell>
                        <fo:table-cell width="30%" border="1pt solid black">
                                <fo:block>30%</fo:block>
                        </fo:table-cell>
                </fo:table-row>
        </fo:table-body>
</fo:table>

This does not work:

<fo:table width="100%" border="1pt solid black">
        <fo:table-body>
                <fo:table-row>
                        <fo:table-cell width="40%" border="1pt solid black">
                                <fo:block>40%</fo:block>
                        </fo:table-cell>
                        <fo:table-cell width="10%" border="1pt solid black">
                                <fo:block>10%</fo:block>
                        </fo:table-cell>
                        <fo:table-cell width="20%" border="1pt solid black">
                                <fo:block>20%</fo:block>
                        </fo:table-cell>
                        <fo:table-cell width="30%" border="1pt solid black">
                                <fo:block>30%</fo:block>
                        </fo:table-cell>
                </fo:table-row>
        </fo:table-body>
</fo:table>

I saw some posts from 2003 and 2006 about table-layout="fixed" being the
default in XEP as opposed to "auto" like it looked like it was supposed to
be. The posts also suggested that setting width="100%" for the table and
width="30%" for the cell made contradictory requirements for the widths of
things.

Is this issue resolved by now? If so, what XEP version was it fixed in?

Any suggestions on how to resolve this requirement?

Is the width % in the table-cell the % of the desired table width? If so, 5in
specified table width with 50%,10%,20%,30% would add up to 110% of 5in or
5.5in.

!DSPAM:87,50b7a89463731498653877!

_______________________________________________
(*) To unsubscribe, please visit http://lists.renderx.com/mailman/options/xep-support
(*) By using the Service, you expressly agree to these Terms of Service http://w
ww.renderx.com/terms-of-service.html
Received on Thu Nov 29 10:12:44 2012

This archive was generated by hypermail 2.1.8 : Thu Nov 29 2012 - 10:12:54 PST