Re: [xep-support] Rendering DocBook sets as multiple documents

From: G. Ken Holman (gkholman@CraneSoftwrights.com)
Date: Sun Sep 07 2003 - 18:22:12 PDT

  • Next message: Bob Stayton: "Re: [xep-support] Rendering DocBook sets as multiple documents"

    At 2003-09-08 10:07 +1000, Kevin Yank wrote:
    >I am starting work on a DocBook XML project that will be published as a two
    >volume set of books. Each of these books must contain an index to both
    >books, with page number citations of the form "I-123" for page 123 of volume
    >I.
    >
    >DocBook XML appears to have all the tools to model this. I can enclose the
    >two <book>s in a <set> and end both <book>s with a <setindex>.
    >
    >Things are less straightforward when it comes to the rendering process,
    >though. As far as I can tell, XSL-FO in general and XEP in particular don't
    >let you produce two output documents from a single source document in one
    >process, do they?

    True, XSL-FO is defined for only one process. Cross references used for
    page number citations are to locations inside of the area tree, and there
    is only one area tree in a process.

    >I would appreciate any suggestions on how to go about producing two
    >PostScript output files which share page number citations as described
    >above.

    Would you accept a single PostScript file with both volumes, the second one
    starting at page 1, and splitting the resulting file in two? Or creating a
    PDF from the PDF and then splitting the PDF into two using a publicly
    available PDF library like iText?

    Because the process works over only a single FO file you will get your
    "cross-volume" references resolved correctly.

    My approach would be three sets of pages in one output FO file: volume 1, a
    magic one-page signal file, then volume 2. I would then produce the PDF
    from the PostScript and write a Python program accessing the iText library
    in Java through Jython, streaming the pages of the PDF to a volume 1 output
    file, tripping over the magic page as a signal to start volume 2, then
    putting the rest of the pages of the PDF file out to a volume 2 output
    file. I suppose if I really needed PostScript results I could probably go
    from the PDF to PostScript, but I've never researched how that might be ...
    of course if there were a library that split PostScript files then I would
    just split the result and not bother with the PDF.

    It would be totally automated and unattended and result in two distinct files.

    I hope this helps!

    ................... Ken

    --
    Next public European delivery:  3-day XSLT/2-day XSL-FO 2003-09-22
    Next public US delivery:        3-day XSLT/2-day XSL-FO 2003-10-13
    Instructor-led on-site corporate, government & user group training
    for XSLT and XSL-FO world-wide:  please contact us for the details
    G. Ken Holman                 mailto:gkholman@CraneSoftwrights.com
    Crane Softwrights Ltd.          http://www.CraneSoftwrights.com/f/
    Box 266, Kars, Ontario CANADA K0A-2E0    +1(613)489-0999 (F:-0995)
    ISBN 0-13-065196-6                       Definitive XSLT and XPath
    ISBN 0-13-140374-5                               Definitive XSL-FO
    ISBN 1-894049-08-X   Practical Transformation Using XSLT and XPath
    ISBN 1-894049-11-X               Practical Formatting Using XSL-FO
    Member of the XML Guild of Practitioners:     http://XMLGuild.info
    Male Breast Cancer Awareness  http://www.CraneSoftwrights.com/f/bc
    -------------------
    (*) 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 : Sun Sep 07 2003 - 18:24:59 PDT