W3C home > Mailing lists > Public > www-xsl-fo@w3.org > January 2009

Re: fo:block with no break

From: <mark.gebhardt@kodak.com>
Date: Fri, 23 Jan 2009 09:35:32 -0500
To: dave.pawson@gmail.com
Cc: www-xsl-fo@w3.org
Message-ID: <OFD49A5E5D.991F77C6-ON85257547.004FA082-85257547.00502A00@knotes.kodak.com>
Dave - thanks for your patience,

Maybe I am being 'fussy', and I can do pre-process (but only in a batch 
mode following rules - not a case-by-case basis).

the property keep-together.within-page="#" brings the block to the next 
area if it won't fit in current area.  However, if block won't fit in next 
area, the "keep" is suppose to be ignored, and the block flows from the 
last area and into the new area, not start in this new area. 

The sample below has 3 sections.  Section 2 is too big to fit on page one, 
following section 1.  So it should move to the next area (page 2). 
However, since section 2 is still too large to fit in this area, the keep 
should fail, and section 2 should begin on page 1 and carry over to page 
2. 

In short, I am trying to get each section to start at the top of a page, 
unless they are too large, then they should start immediately following 
the previous section (same page previous section ends).
(I am using antennaHouse formatterv4.3mr5 which is suppose to support 
numeric keep values.

I'll drop this soon if I am just beating a dead horse, but wanted one last 
chance to explain what I am trying/expecting to produce.  Am I asking too 
much from FO constructs, or just missing the boat?

help?
Mark

mySAMPLE.fo
<?xml version="1.0" encoding="UTF-8"?>
<fo:root xmlns:xdt="http://www.w3.org/2005/02/xpath-datatypes" xmlns:xs="
http://www.w3.org/2001/XMLSchema" xmlns:fo="
http://www.w3.org/1999/XSL/Format" xmlns:axf="
http://www.antennahouse.com/names/XSL/Extensions" xmlns:svg="
http://www.w3.org/2000/svg" xmlns:fn="
http://www.w3.org/2005/02/xpath-functions">
        <fo:layout-master-set>
                <fo:simple-page-master master-name="odd-PrefaceMaster" 
page-width="5.5in" page-height="2.5in" margin-top="0in" margin-bottom="0in
" margin-left="0in" margin-right="0in">
                        <fo:region-body region-name="body" margin-right="
.75in" margin-left=".375in" margin-top=".375in" margin-bottom=".375in"/>
                        <fo:region-before region-name="odd-before" extent
=".375in" padding-start=".25in" padding-end=".25in" display-align="after
"/>
                        <fo:region-after region-name="odd-after" extent="
.375in" padding-start=".25in" padding-end=".25in"/>
                        <fo:region-start region-name="odd-start" extent="
.5in" reference-orientation="270"/>
                        <fo:region-end region-name="odd-end" extent=".5in" 
reference-orientation="90" padding-before=".25in" display-align="center" 
background-color="#333333"/>
                </fo:simple-page-master>
                <fo:simple-page-master master-name="even-PrefaceMaster" 
page-width="5.5in" page-height="2.5in" margin-top="0in" margin-bottom="0in
" margin-left="0in" margin-right="0in">
                        <fo:region-body region-name="body" margin-right="
.375in" margin-left=".75in" margin-top=".375in" margin-bottom=".375in"/>
                        <fo:region-before region-name="even-before" extent
=".375in" padding-start=".25in" padding-end=".25in" display-align="after
"/>
                        <fo:region-after region-name="even-after" extent="
.375in" padding-start=".25in" padding-end=".25in"/>
                        <fo:region-start region-name="even-start" extent="
.5in" reference-orientation="270" padding-before=".25in" display-align="
center" background-color="#333333"/>
                        <fo:region-end region-name="even-end" extent=".5in
" reference-orientation="90"/>
                </fo:simple-page-master>
                <fo:page-sequence-master master-name="prefaceMaster">
                        <fo:repeatable-page-master-alternatives>
                                <fo:conditional-page-master-reference 
master-reference="odd-PrefaceMaster" odd-or-even="odd" page-position="rest
"/>
                                <fo:conditional-page-master-reference 
master-reference="even-PrefaceMaster" odd-or-even="even" page-position="
rest"/>
                        </fo:repeatable-page-master-alternatives>
                </fo:page-sequence-master>
        </fo:layout-master-set>
        <fo:page-sequence master-reference="prefaceMaster" 
initial-page-number="1" format="1" writing-mode="from-page-master-region()
" reference-orientation="from-page-master-region()">
                <fo:static-content flow-name="odd-before"/>
                <fo:static-content flow-name="even-before"/>
                <fo:static-content flow-name="odd-after">
                        <fo:block text-align-last="justify">
                                <fo:inline>footer line<fo:page-number/></
fo:inline>
                        </fo:block>
                </fo:static-content>
                <fo:static-content flow-name="even-after">
                        <fo:block text-align-last="justify">
                                <fo:inline><fo:page-number/>footer line</
fo:inline>
                        </fo:block>
                </fo:static-content>
                <fo:static-content flow-name="odd-start"/>
                <fo:static-content flow-name="even-start">
                        <fo:block text-align="start">
                                <fo:inline font-size="18pt" color="#FFFFFF
" background-color="#333333">ENGLISH</fo:inline>
                        </fo:block>
                </fo:static-content>
                <fo:static-content flow-name="even-end"/>
                <fo:static-content flow-name="odd-end">
                        <fo:block text-align="end">
                                <fo:inline text-align="end" font-size="
18pt" color="#FFFFFF" background-color="#333333">ENGLISH</fo:inline>
                        </fo:block>
                </fo:static-content>
                <fo:flow flow-name="body">
 
                        <fo:block keep-together.within-page="5">
                                <fo:block><fo:inline>SECTION ONE (small 
&lt; page)(start and end on page 1)</fo:inline></fo:block>
                                <fo:block><fo:inline>This is a sample 
paragragh.</fo:inline></fo:block>
                        </fo:block> 
 
                        <fo:block keep-together.within-page="5">
                                <fo:block keep-with-next.within-page="9"><
fo:inline>SECTION TWO (larger than 1 page)(should start on page 1 and flow 
to page 2 since it can't fit fully on page 2 )</fo:inline></fo:block>
                                <fo:block keep-with-next.within-page="9"><
fo:inline>This is a sample paragragh.</fo:inline></fo:block><fo:block 
keep-with-next.within-page="9"><fo:inline>This is a sample paragragh.</
fo:inline></fo:block><fo:block keep-with-next.within-page="9"><fo:inline>
This is a sample paragragh.</fo:inline></fo:block><fo:block 
keep-with-next.within-page="9"><fo:inline>This is a sample paragragh.</
fo:inline></fo:block><fo:block keep-with-next.within-page="9"><fo:inline>
This is a sample paragragh.</fo:inline></fo:block><fo:block 
keep-with-next.within-page="9"><fo:inline>This is a sample paragragh.</
fo:inline></fo:block><fo:block keep-with-next.within-page="9"><fo:inline>
This is a sample paragragh.</fo:inline></fo:block><fo:block 
keep-with-next.within-page="9"><fo:inline>This is a sample paragragh.</
fo:inline></fo:block><fo:block keep-with-next.within-page="9"><fo:inline>
This is a sample paragragh.</fo:inline></fo:block><fo:block 
keep-with-next.within-page="9"><fo:inline>This is a sample paragragh.</
fo:inline></fo:block>
                        </fo:block>

                        <fo:block keep-together.within-page="5">
                                <fo:block><fo:inline>SECTION THREE (large 
- fits 1 page)(should be page 3 all by itself)</fo:inline></fo:block>
                                <fo:block><fo:inline>This is a sample 
paragragh.</fo:inline></fo:block><fo:block><fo:inline>This is a sample 
paragragh.</fo:inline></fo:block><fo:block><fo:inline>This is a sample 
paragragh.</fo:inline></fo:block><fo:block><fo:inline>This is a sample 
paragragh.</fo:inline></fo:block><fo:block><fo:inline>This is a sample 
paragragh.</fo:inline></fo:block><fo:block><fo:inline>This is a sample 
paragragh.</fo:inline></fo:block><fo:block><fo:inline>This is a sample 
paragragh.</fo:inline></fo:block><fo:block><fo:inline>This is a sample 
paragragh.</fo:inline></fo:block><fo:block><fo:inline>This is a sample 
paragragh.</fo:inline></fo:block>
                        </fo:block>
 
                </fo:flow>
        </fo:page-sequence>
</fo:root>

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Mark Gebhardt  (x15654)
Eastman Kodak Company
mark.gebhardt@kodak.com



Dave Pawson <dave.pawson@gmail.com> 
Sent by: www-xsl-fo-request@w3.org
01/23/2009 09:20 AM

To
mark.gebhardt@kodak.com
cc
www-xsl-fo@w3.org
Subject
Re: fo:block with no break







2009/1/23  <mark.gebhardt@kodak.com>:
>
> I'm not blaming the engine, just trying to understand it.  I undersand 
the
> content is too large to fit on my page.  But since the content needs to
> break between 2 pages, I was hoping to have it break so that the content
> starts on the current page (not start a new page), and then flow to a 
new
> page; rather than starting a new page and still flowing to yet another 
new
> page.
>
> Maybe I am asking too much, or just not understanding.
>
> Sorry if I am going down a dead end, butFrameMaker manages this, and if 
I
> cannot replicate with FO,  I've got some level setting to do.


fo != frame engine :-)

1. You split it if you're fussy and want it just so.
2. Give the engine a 'hint' where to break it (or break it yourself,
pre-process step)
3. Give the break strength a low number and accept it's decision.


HTH


-- 
Dave Pawson
XSLT XSL-FO FAQ.
Docbook FAQ.
http://www.dpawson.co.uk
Received on Friday, 23 January 2009 14:38:44 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Friday, 23 January 2009 14:38:44 GMT