First, you must have the page-sequence-master inside the
layout-master-set. Second, you should have only one page-sequence with
the master-reference set to "document". The page-sequence should contain
the static-content from your current "blank-page" page-sequence and the
flow from the current "simple" page-sequence. Once you've moved the
approriate pieces into this new page-sequence, delete the two you
currently have.
 
Eric Amick
Legislative Computer Systems
Office of the Clerk
 

________________________________

From: Chakravarty, Abhishek [mailto:abhis...@accidentfund.com] 
Sent: Monday, December 15, 2008 10:22
To: fop-users@xmlgraphics.apache.org
Subject: RE: Force page break to skip immediate next page and continue
writing on third page



I tried to use a second simple page master now however I am getting
stuck with the error as 

 

fo:Validation Exception: Error(Unknown location): fo:page-sequence is
missing child elements.

Required Content Model: (title?,static-content*,flow)

 

The updated stylesheet is below. Please tell me what exactly am doing
wrong over here

 

 

<xsl:template match="/">

 

 <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format";>

 

   <fo:layout-master-set>

     <fo:simple-page-master master-name="simple"

                   page-height="18.5cm" 

                   page-width="21.6cm"

                   >

       <fo:region-body />       

       <fo:region-after/>

     </fo:simple-page-master>

             

             <fo:simple-page-master master-name="blank-page"

                   page-height="18.5cm" 

                   page-width="21.6cm"

                   >

       <fo:region-body region-name="blank"/>       

       <fo:region-after/>

     </fo:simple-page-master>

   </fo:layout-master-set>

   

  <fo:page-sequence master-reference="blank-page">

            <fo:static-content flow-name="blank">                 

                        <fo:block font-size="32pt" font-weight="bold"
font-family="Helvetica">

                                    <xsl:value-of select="data/footer"/>

                        </fo:block>                      

            </fo:static-content>

</fo:page-sequence>

 

 

<fo:page-sequence master-reference="simple">

            <fo:flow flow-name="xsl-region-body">                 

                        <fo:block font-size="32pt" font-weight="bold"
font-family="Helvetica">

                                    <xsl:value-of select="data/header"/>

                        </fo:block>        

            </fo:flow>                      

</fo:page-sequence>

 </fo:root>   

 

  <fo:page-sequence-master master-name="document">

            <fo:single-page-master-reference master-reference="simple"/>

            <fo:single-page-master-reference
master-reference="blank-page"/>

            <fo:repeatable-page-master-reference
master-reference="simple"/>

</fo:page-sequence-master>

  

 </xsl:template>

________________________________

From: Amick, Eric [mailto:eric.am...@mail.house.gov] 
Sent: Monday, December 15, 2008 8:34 AM
To: fop-users@xmlgraphics.apache.org
Subject: RE: Force page break to skip immediate next page and continue
writing on third page

 

That isn't necessarily a problem. Is there only one data/footer element?
If so, you can just put the needed xsl:value-of in the
fo:static-content.

 

Eric Amick

Legislative Computer Systems

Office of the Clerk

 

 

________________________________

From: Chakravarty, Abhishek [mailto:abhis...@accidentfund.com] 
Sent: Friday, December 12, 2008 16:35
To: fop-users@xmlgraphics.apache.org
Subject: RE: Force page break to skip immediate next page and continue
writing on third page

Yes, unfortunately the footer content is dynamic and will change
depending on the content being pulled in by the xml. :-(

 

________________________________

From: Amick, Eric [mailto:eric.am...@mail.house.gov] 
Sent: Friday, December 12, 2008 4:26 PM
To: fop-users@xmlgraphics.apache.org
Subject: RE: Force page break to skip immediate next page and continue
writing on third page

 

I assume that simple is a simple-page-master. Create a second
simple-page-master called, say, blank-page which is a copy of simple
with one difference: Define the region-body in blank-page as

 

<fo:region-body region-name="blank"/>

 

You'll then need an fo:page-sequence-master that looks something like
this:

 

<fo:page-sequence-master master-name="document">

   <fo:single-page-master-reference master-reference="simple"/>

   <fo:single-page-master-reference master-reference="blank-page"/>

   <fo:repeatable-page-master-reference master-reference="simple"/>

</fo:page-sequence-master>

 

Take the page break off the fo:block as well. If you use that
page-sequence-master, you will get a blank second page if and only if
the data overflows the first page. Putting the footer on the second page
is trickier and depends on whether that footer can change. If this was
FO 1.1, you could use flow maps; you may have to resort to having
fo:static-content in blank-page instead.

 

Eric Amick

Legislative Computer Systems

Office of the Clerk

 

 

________________________________

From: Chakravarty, Abhishek [mailto:abhis...@accidentfund.com] 
Sent: Friday, December 12, 2008 14:53
To: fop-users@xmlgraphics.apache.org
Subject: Force page break to skip immediate next page and continue
writing on third page

Hi

 

I need to force page break within my fo block such that

If there is content from page 1('header') which is overflowing onto page
2 then it skips page 2 but continuous onto page 3 while at the same time
the 'footer' is written on page 2.

 

This is what my XSL looks like

 

<fo:page-sequence master-reference="simple">

            <fo:flow flow-name="xsl-region-body">                 

                        <fo:block break-after="page">

                                    <xsl:apply-templates
select="data/header"/>

                        </fo:block>

<fo:block>

                                    

                                    <xsl:apply-templates
select="data/footer"/>

                        </fo:block>                      

            </fo:flow>          

</fo:page-sequence>

  </fo:root> 

 </xsl:template>

 

 

 <xsl:template match="header">       

       <fo:block  

font-size="32pt" 

             font-weight="bold"

                         font-family="Helvetica"

                                     >

         <xsl:value-of select="."/>

       </fo:block> 

 </xsl:template>

 

<xsl:template match="footer">

              <fo:block  

font-size="32pt" 

             font-weight="bold"

                         font-family="Helvetica"

                                     >

         <xsl:value-of select="."/>

       </fo:block> 

 

</xsl:template>

 

 

 

Regards

Abhishek

 

 

 

Regards

Abhishek

 

Reply via email to