xmlgraphics-fop-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Amick, Eric" <Eric.Am...@mail.house.gov>
Subject RE: break-after, Exclude last page
Date Thu, 26 Mar 2009 19:00:27 GMT
One possible solution, assuming no item contains another item, would be this:
<xsl:template match="item"> 
    <fo:block xmlns:fo= <http://www.w3.org/1999/XSL/Format> http://www.w3.org/1999/XSL/Format
<http://www.w3.org/1999/XSL/Format"> ">
       <xsl:if test="following::item">
            <xsl:attribute name="break-after">page</xsl:attribute>
        <-- call other templates -->

If my assumption is wrong, you should be able to use "following::item | descendant::item"
for the test.
Eric Amick
Legislative Computer Systems
Office of the Clerk


From: Sam Fuqua [mailto:samfuqua@gmail.com] 
Sent: Thursday, March 26, 2009 14:24
To: fop-users@xmlgraphics.apache.org
Subject: break-after, Exclude last page

I'm generating a PDF from an xml feed.  The feed has a list of items, and I want each new
item on a new page, but I don't want the last page to break onto a new blank page.  How would
I do this?
Right now, I have the following:

    <fo:page-sequence initial-page-number="1" master-reference="PageMaster">
    <fo:static-content flow-name="xsl-region-before">
        <fo:block font-size="8pt" text-align="right"><fo:page-number/>/<fo:page-number-citation
    <fo:flow flow-name="xsl-region-body"> 
    <fo:block id="last-page"/> 

<xsl:template match="item"> 
    <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format"  break-after="page"> 
        <-- call other templates -->

Sam Fuqua
ΣΝ ΘΗ 454

View raw message