[xep-support] Padding within cells of proportional-width table columns?

From: Dean, Tim (STP) (Tim.Dean@guidant.com)
Date: Fri Aug 06 2004 - 11:07:50 PDT

  • Next message: Bob Stayton: "[xep-support] Mixing Chinese and English fonts"

    I have a table that uses proportional widths for its columns, and I want to pad the cells of those columns. One version I have tried looks like this:

        <fo:table table-layout="fixed" inline-progression-direction="100%" ...>
            <fo:table-column column-width="proportional-column-width(10)" .../>
            <fo:table-column column-width="proportional-column-width(30)" .../>
            <fo:table-column column-width="proportional-column-width(20)" .../>
            <fo:table-column column-width="proportional-column-width(30)" .../>

            <fo:table-body>
                <fo:table-row>
                    <fo:table-cell padding="5px">
                       <fo:block>Some stuff</fo:block>
                    </fo:table-cell>
                </fo:table-row>
            </fo:table-body>

        </fo:table>

    This works as I expect: the contents of the block within the cell are surrounded by the requested padding.

    Now - For a variety of reasons, my XSLT transformation that generates this FO could be greatly simplified if could place the padding on the table cell's block element rather than on the table cell, as follows:

                    <fo:table-cell>
                       <fo:block padding="5px">Some stuff</fo:block>
                    </fo:table-cell>

    When I do this, I do not see the expected padding. By placing a visible border around the block I've padded, it appears that the bounds of the block are being pushed beyond the bounds of the table cell. The end result is that the block's content rectangle is kept in the cell while the padding area and border are outside of the table cell.

    So, I have a few questions:

    1) Why is this happening? Can someone please explain the basic algorithm being used here?

    2) Is this the way things are supposed to work according to the spec, or is this a side affect of XEP's incomplete implementation of table column layout models?

    3) Are there any workarounds I can consider that would allow me to pad the block(s) within a table cell directly rather then putting the padding attribute on the table cell FO element?

    Thanks,

    Tim Dean
    Principal Software Engineer
    Telephone: (651) 582-4791

    -------------------
    (*) To unsubscribe, send a message with words 'unsubscribe xep-support'
    in the body of the message to majordomo@renderx.com from the address
    you are subscribed from.
    (*) By using the Service, you expressly agree to these Terms of Service http://www.renderx.com/tos.html



    This archive was generated by hypermail 2.1.5 : Fri Aug 06 2004 - 11:28:07 PDT