Loading ...
Sorry, an error occurred while loading the content.

Re: [XSL-FO] Conditional page break

Expand Messages
  • G. Ken Holman
    ... I started thinking in that direction, Eliot, but there is a problem with using always . If the tuning isn t just right, and more than a page worth of
    Message 1 of 4 , Jan 7, 2003
    • 0 Attachment
      At 2003-01-07 09:42 -0600, W. Eliot Kimber wrote:
      >pmdgexinc wrote:
      >
      > > Now there is a new requirement that the page break
      > > occur only if the <intro-section> is contained on the first page. If
      > > it overflows to the second page, no page break should occur.
      >
      >There is no complete solution because XSL 1.0 does not provide any
      >"layout aware" formatting controls that would allow you to put
      >page-aware conditional processing in the XSL-FO instance.
      >
      >However, you can get a lot of mileage from the keep-together and
      >keep-with-* properties. It would require some experimentation, but if
      >you set the keep-together.on-page value to "always" or a very high
      >number for the block that *follows* the introduction, that should force
      >it to start on a new page as long as it can't fit on the first page with
      >the intro. This may require tuning based on the typical content of your
      >documents.

      I started thinking in that direction, Eliot, but there is a problem with
      using "always". If the tuning isn't just right, and more than a page worth
      of content will trigger an overflow condition. Less than a page worth
      might still fit on the first page if the intro is short enough. Using more
      than a page worth with a numeric value will flow as if no keep was specified.

      I think your suggestion regarding adding some authoring controls for this
      condition is best in the absence of XSL-FO 1.0 page status awareness.

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


      --
      Upcoming hands-on in-depth North America: February 3- 7,2003
      XSLT/XPath and XSL-FO Europe: February 17-21,2003

      G. Ken Holman mailto:gkholman@...
      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-10-1 Practical Formatting Using XSL-FO
      Male Breast Cancer Awareness http://www.CraneSoftwrights.com/f/bc
    • pmdgexinc <peter.drivas@gexinc.com>
      Thanks Eliot, I had a feeling that there wasn t a consistent way to do this. I ll probably go with the attribute the author can set, since it s probably the
      Message 2 of 4 , Jan 7, 2003
      • 0 Attachment
        Thanks Eliot, I had a feeling that there wasn't a consistent way to
        do this. I'll probably go with the attribute the author can set,
        since it's probably the most reliable solution.

        Peter

        --- In XSL-FO@yahoogroups.com, "W. Eliot Kimber" <eliot@i...> wrote:
        > pmdgexinc wrote:
        >
        > > Now there is a new requirement that the page break
        > > occur only if the <intro-section> is contained on the first page.
        If
        > > it overflows to the second page, no page break should occur.
        >
        > There is no complete solution because XSL 1.0 does not provide any
        > "layout aware" formatting controls that would allow you to put
        > page-aware conditional processing in the XSL-FO instance.
        >
        > However, you can get a lot of mileage from the keep-together and
        > keep-with-* properties. It would require some experimentation, but
        if
        > you set the keep-together.on-page value to "always" or a very high
        > number for the block that *follows* the introduction, that should
        force
        > it to start on a new page as long as it can't fit on the first page
        with
        > the intro. This may require tuning based on the typical content of
        your
        > documents.
        >
        > Another workaround is to provide authors with an attribute to
        indicate
        > whether or not there should be a break after the intro. This type
        of
        > author-provided format tuning can solve a lot of problems that XSL
        1.0
        > is simply not set up to solve.
        >
        > Cheers,
        >
        > Eliot
        > --
        > W. Eliot Kimber, eliot@i...
        > Consultant, ISOGEN International
        >
        > 1016 La Posada Dr., Suite 240
        > Austin, TX 78752 Phone: 512.656.4139
      Your message has been successfully submitted and would be delivered to recipients shortly.