docbook-apps

  • 1.  Fop unable to render tables ? (without intervention ?)

    Posted 12-17-2007 14:13
    I have a DocBook document which I wish to convert to pdf and I'm having
    a problem with Fop rendering the tables.

    I've used the Xsl stylesheet to convert it to Xsl-Fo. Originally with
    no parameters set. I then use Fop version 0.94 to generate pdf.

    The DocBook document contains several tables, one in particular is very
    large, and will stretch over several pages of the final document
    (another is perhaps just a little over the size that should fit on one
    page).

    The two symptoms I had were :
    1. There were many error messages from Fop.
    2. The tables in the pdf file were attempting to display on one page
    each, which seems wrong.

    The Fop error messages were as follows :

    17-Dec-2007 13:34:19 org.apache.fop.fo.FONode attributeWarning
    WARNING: Warning(994/42): fo:table, table-layout="auto" is currently not
    supported by FOP

    Once for each table.

    Then

    17-Dec-2007 13:34:20
    org.apache.fop.layoutmgr.inline.LineLayoutManager$LineBreakingAlgorithm
    updateData2
    WARNING: Line 1 of a paragraph overflows the available area. (fo:block,
    location: 2481/70)

    Many times. Possibly once per expected resulting page.

    I am assuming that these error messages indicate the reasons why the
    large tables were not rendered properly.

    So what I'd like to know is :
    How can I stop this happening ?
    Do I need to do something to change table-layout to something other than
    "auto", and if so how do I pass this in ?
    I expected that tables would just go through on the nod, and work
    without intervention, as they would seem to be a very common part of a
    technical document.


    Uncertainly,
    Richard.

    PS.
    Fop is version 0.94, which I think is the latest.
    Xsl template processing is being done by Saxon 6.5.5, which I believe is
    the most recent Saxon-6.
    I've also done the xsl processing using Saxon 9.0.0.1j, which gives
    almost exactly the same xsl-fo file output, except that it can be told
    to indent its output which I don't believe Saxon-6 can (see question by
    me last week), and I don't care to try reading unindented xml........

    PPS
    When I say "Originally with no parameters set." I mean that in order to
    stop getting messages about not being able to fetch the draft picture
    I'm now setting "draft.mode=no", and I'm now also setting
    "paper.type=A4" as I'm in Europe. As well as "!indent=yes", which only
    afects Saxon-9, to get the fo indented.



    Richard Kerry
    Colledia Control Engineer
    Siemens IT Solutions and Services Ltd
    Room 457 Design Building, BBC Television Centre, Wood Lane, London, W12
    7RJ
    T: +44 (0)20 82259063 F: +44 (0)20 8576 8182 M: +44 (0)7921 244993
    Email: richard.kerry@siemens.com
    <blocked::mailto:richard.kerry@siemens.com>
    Website: www.siemens.co.uk/it-solutions
    <blocked::outbind://47/www.siemens.co.uk/it-solutions>

    This e-mail contains confidential information and is for the exclusive
    use of the addressee/s. If you are not the addressee, then any
    distribution, copying or use of this e-mail is prohibited. If received
    in error, please advise the sender and delete it immediately. We accept
    no liability for any loss or damage suffered by any person arising from
    use of this e-mail.

    Siemens IT Solutions and Services Limited
    Registered No: 1203466 England
    Registered Office: Faraday House, Sir William Siemens Square, Frimley,
    Camberley, GU16 8QD





  • 2.  Re: [docbook-apps] Fop unable to render tables ? (without intervention ?)

    Posted 12-17-2007 15:49
    On 17/12/2007, Kerry, Richard <richard.kerry@siemens.com> wrote:

    <snip/>
    > Fop is version 0.94, which I think is the latest.
    <snip/>

    Try setting fop1.extensions

    http://docbook.sourceforge.net/release/xsl/current/doc/fo/fop1.extensions.html

    Also read chapter 30 of the Sagehill book,
    http://www.sagehill.net/docbookxsl/Tables.html

    And good luck. Tables drive me nuts :-)

    Andrew
    --
    We can't change the past, but each of us, by challenging prejudice and
    intolerance, can help to change the future.
    - Rabbi Jonathan Sacks, Address at Holocaust Memorial Day, Westminster
    Hall, London, 27th January 2005



  • 3.  RE: [docbook-apps] Fop unable to render tables ? (without intervention ?)

    Posted 12-18-2007 11:16

    I've tried setting fop1.extensions but I don't think it does anything
    for me regarding tables.
    It generates a bookmark-tree and gives a region the name "blank-body".

    One problem I'd had was that I'd missed the <colspec> elements within
    the <tgroup>. Having added those I'm no longer getting the many
    warnings about table-layout.

    However, I am still gettting Fop attempting to place each table on one
    page only, and I get the warnings shown below for the two long tables.
    I did get these when I sent my earlier message on this subject but
    thought the other messages, with their many repetitions, were more
    important, so I neglected to include them in my posting. I think
    actually these are the most significant in that they are telling me
    directly that it has placed the long tables on single pages. There's
    nothing I can see in DocBook, or Chapter 30 of Rob Stayton's book, to
    indicate that I need to tell it to split a table over multiple pages -
    indeed I'd have thought it would default to doing so. And I can't find
    any attributes or anything that looks like it will enable splitting
    tables across pages.



    These are the two warning messages that tell me directly that there are
    tables on pages 3 and 6 that can't be fitted onto the single page.

    17-Dec-2007 13:34:20 org.apache.fop.layoutmgr.PageBreaker$1
    notifyOverflow
    WARNING: Content of the region-body on page 6 overflows the available
    area in block-progression dimension. (fo:page-sequence, location:
    237/61)
    17-Dec-2007 13:34:20 org.apache.fop.layoutmgr.PageBreaker$1
    notifyOverflow
    WARNING: Content of the region-body on page 3 overflows the available
    area in block-progression dimension. (fo:page-sequence, location:
    237/61)


    Uncertainly,
    Richard.


    >


  • 4.  RE: [docbook-apps] Fop unable to render tables ? (without intervention ?)

    Posted 12-18-2007 15:00

    OK. I have some sort of progress.

    I found an answer on mail-archive.com (*) which explains how the
    keep-together on the fo:table block is unable to split the table over
    several pages using keep-together.within-column=auto because the
    surrounding fo:block has keep-together.within-column=always.

    I've got my document to display properly by editing the xsl-fo.
    This is, of course, a solution in the xsl-fo domain, and I want to get a
    fix at the DocBook level.

    I've used within my DocBook to
    get the innermost of these set correctly, but I need the parent block to
    somehow get the attribute changed.

    Can I do this from the DocBook level ? I don't want to need to patch
    the fo to get the formatting to work.
    Do I need to put another to get the
    parent fo:block's attribute fixed ?
    If so, where should this be done ?
    Is there something else I need to change ?



    Appreciatively,
    Richard.


    (*) fop-dev@xmlgraphics.apache.org/msg07904">http://www.mail-archive.com/fop-dev@xmlgraphics.apache.org/msg07904


    >


  • 5.  RE: [docbook-apps] Fop unable to render tables ? (without intervention ?)

    Posted 12-18-2007 16:39
    >


  • 6.  RE: [docbook-apps] Fop unable to render tables ? (without intervention ?)

    Posted 12-18-2007 16:59


    Thank you, but, recent snapshot release of what ?
    Docbook-xsl ? Or Fop ?

    Appreciatively,
    Richard.



    >


  • 7.  RE: [docbook-apps] Fop unable to render tables ? (without intervention ?)

    Posted 12-18-2007 17:13
    >


  • 8.  RE: [docbook-apps] Fop unable to render tables ? (without intervention ?)

    Posted 12-18-2007 17:02
    Looks like you can add <xsl:attribute
    name="keep-together.within-column">auto</xsl:attribute> to the
    table.table.properties attribute set in your customization layer to
    change the default behavior:

    http://www.sagehill.net/docbookxsl/PageBreaking.html
    http://www.sagehill.net/docbookxsl/PrintTableStyles.html#table.table.pro
    perties

    David

    >