Re: Catch-22 with fo:sequence-specifier-alternating

Subject: Re: Catch-22 with fo:sequence-specifier-alternating
From: Stephen Deach <sdeach@xxxxxxxxx>
Date: Fri, 24 Sep 1999 07:40:36 -0700
We have taken a philosophy of "allowing capability" over "preventing
stupidity". There are many cases where a designer can provide input
values/designs that will give unacceptable results.

We also have chosen not to define specific algorithms or error
handling/recovery in a number of cases (this one included).

There are quite a few documents that use different header/footer
content/layouts or omit the footer on the last page of a sequence. We chose
to allow a unique page design, even though it leave open the potential for
'highly contrived' cases such as the one you describe.

Personally, I would use the lower cost approach of setting the first page
using the appropriate master, then attemting to use the repeating masters
until data ran out, then backing up to the start of the page and restarting
it using the appropriate last-page master. If is overflows, you have an
inappropriate design (error) so we don't dictate recovery -- one can either
use the overflow treatment for the body region, use the non-last master
instead, stretch out the body content over the page or the whole chapter to
require another page, or tighten up the body content over the page or the
whole chapter so it fits.



At 02:54 1999-09-24 GMT, you wrote:
>I'm curious as to the nature of the pagination algorithm the XSL
>designers had in mind when they gave page-master-last-even and
>page-master-last-odd properties to fo:sequence-specifier-alternating.
>
>Consider the following scenario: 
>
>In a particular flow object tree, page-master-even and page-master-odd
>both specify page layouts that happen to have relatively large
>fo:region-body areas, while page-master-last-even and
>page-master-last-odd both specify page layouts that happen to have
>quite small fo:region-body areas. The formatter processes the flow
>object tree, and finds itself near the end of the document with about
>a half-page of text left to go, with this text to be placed on an even
>page. This amount of text fits just fine in the page-master-even
>layout, but won't fit in the page-master-last-even layouts. 
>
>The formatter is now faced with a dilemma: It can use the
>page-master-even layout, and fit all of the text, but that means the
>last page of the document will have used the wrong page master. Or it
>can use the page-master-last-even layout, and not fit all of the text,
>but that means a non-last page will have used the wrong page master.
>
>The above scenario is somewhat contrived, of course, but it points out
>another problem, which is quite real: In general, there is no way to
>know ahead of time whether or not the flow object tree is going to
>"run out" on a certain page. The only way to know for sure is to
>format the flow objects onto the page. But this means that in practice
>nearly _every_ page must be laid out twice, first as a potential last
>page, and then, if it turns out that it wasn't the last page after
>all, as a normal page.
>
>-Steve Schafer
>
>
> XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
>
>

-----------------------------------------------------------------------------
This e-mail reflects the personal opinion of the author.
 -- Unless explicitly so stated in the text, it does not represent an
    official position of Adobe Systems, Inc.
 -- Unless explicitly so stated in the text, it does not represent an
    official opinion of the W3C XSL Working group.
-----------------------------------------------------------------------------
  Stephen Deach                            |  Sr Computer Scientist
  408-536-6521 (office)                    |  Adobe Systems Inc.
  408-537-4214 (fax)                       |  Mail Stop E15-420
  sdeach@xxxxxxxxx                         |  345 Park Ave
                                           |  San Jose, CA 95110-2704
                                           |  USA
-----------------------------------------------------------------------------


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread