[xep-support] Re: Dynamic Content in a Static Table

From: Nikolai Grigoriev (grig@renderx.com)
Date: Thu Oct 23 2003 - 02:43:28 PDT

  • Next message: Nikolai Grigoriev: "Re: [xep-support] XEP and SVG"

    Valeri,

    > We try to produce a PDF file (see example attached) of so called Industrial Statistics
    > Country tables, currently printed by the mainframe system.
    >
    > The requirement is to have it fixed like in the mainframe printout. That is why we have
    > chosen the static table with fixed layout.

    This is natural in your case. What appears less natural is the fact that all data in a single
    column are rendered _as a single table cell_. You have data elements that need to be aligned
    vertically wrt to each other. A straightforward approach would be to have the following:

    <fo:table-row>
        <fo:table-cell><fo:block>151</fo:block></fo:table-cell>
        <fo:table-cell><fo:block>10</fo:block></fo:table-cell>
        <fo:table-cell><fo:block>a/</fo:block></fo:table-cell>
    </fo:table-row>
    <fo:table-row>
        <fo:table-cell><fo:block>1511</fo:block></fo:table-cell>
        <fo:table-cell><fo:block>20</fo:block></fo:table-cell>
        <fo:table-cell><fo:block>b/</fo:block></fo:table-cell>
    </fo:table-row>
    <fo:table-row>
        <fo:table-cell><fo:block>1512</fo:block></fo:table-cell>
        <fo:table-cell><fo:block>30</fo:block></fo:table-cell>
        <fo:table-cell><fo:block>c/</fo:block></fo:table-cell>
    </fo:table-row>

    Instead, you create _one_ row for several dozens of data items:

    <fo:table-row>
        <fo:table-cell>
            <fo:block>151</fo:block>
            <fo:block>1511</fo:block>
            <fo:block>1512</fo:block>
        </fo:table-cell>
        <fo:table-cell>
            <fo:block>10</fo:block>
            <fo:block>20</fo:block>
            <fo:block>30</fo:block>
        </fo:table-cell>
        <fo:table-cell>
            <fo:block>a/</fo:block>
            <fo:block>b/</fo:block>
            <fo:block>c/</fo:block>
        </fo:table-cell>
    </fo:table-row>

    This creates lots of alignment problems. Look at the last
    column of notest in the first big table in the new.pdf file:
    it is centered vertically, and vertical syncronization
    with the rest of the columns is lost.

    > The main data row has 29 columns again with fixed widths
    > and the data is assembled from different elements and attributes
    > of the input XML file. The actual number of real data rows to
    > be inputted in one static row is not fixed and depends on the
    > input XML data. Normally one table will be spread over few
    > (2-4) pages and thats whre it hits current XEP limitation for
    > one data row.

    I admit there is indeed a problem in processing of very large
    table cells: XEP splits columns in a not-so-obvious way. We are
    going to investigate the issue; thank you for the sample.

    But anyway, your layout seems to obscure the fact that you need
    those items aligned. From the formatter's point of view, there is
    nothing especially wrong in XEP's behaviour: data in each
    cell is independent from the other cells, and so may be splitted
    in many different points to satisfy various constraints (keeps,
    orphans/widows, etc.etc.). XEP is strange, but not formally
    incorrect at your layout: all data are kept in the respective row, and
    all contents is centered vertically in the respective parts.

    > What can you suggest as a workaround?

    Just make your intentions clear in the markup. If certain things
    constitute a row in a table, wrap them in a <fo:table-row>.
    If you need white space after a block, add padding or space-before
    to it; don't use intercalary leader-filled blocks.

    Best regards,
    Nikolai Grigoriev
    RenderX

    ----- Original Message -----
    From: <valeri.kniazev@chello.at>
    To: <xep-support@renderx.com>
    Cc: <grig@renderx.com>
    Sent: Wednesday, October 22, 2003 8:01 PM
    Subject: Dynamic Content in a Static Table

    Hi,

    I try to reformulate our issues and recap on the explanation you gave.

    We try to produce a PDF file (see example attached) of so called Industrial Statistics Country tables, currently printed by the
    mainframe system.

    The requirement is to have it fixed like in the mainframe printout. That is why we have chosen the static table with fixed layout.

    The main data row has 29 columns again with fixed widths and the data is assembled from different elements and attributes of the
    input XML file. The actual number of real data rows to be inputted in one static row is not fixed and depends on the input XML data.
    Normally one table will be spread over few (2-4) pages and thats whre it hits current XEP limitation for one data row.

    What can you suggest as a workaround? We want to keep the fixed layout of the table and possibility to assemble it from different
    nodes of the input XML file, but to keep the number of data rows dynamic.

    Kind regards,
    Valeri Knyazev
    Industrial Statistics Section
    UNIDO,
    Vienna, Austria
    tel. +431 26026 3668

    -------------------
    (*) 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 : Thu Oct 23 2003 - 02:37:42 PDT