[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: Deleting a blank page after a last element

Subject: RE: Deleting a blank page after a last element
From: <Jarno.Elovirta@xxxxxxxxx>
Date: Thu, 25 Aug 2005 08:45:08 +0300
deleting about blank
Hi,

> > I've the following template in the style sheet
> >
> > <xsl:template match="Section">
> >        <fo:block keep-together="always"
> > break-after="page" white-space-collapse = "false">
> >         <xsl:apply-templates select="SectionName"/>
> >        	<xsl:apply-templates select="SectionHeader"/>
> >        	<xsl:apply-templates select="Question"/>
> > 	   </fo:block>
> >  </xsl:template>
> >
> > I'm using a break-after="page" to force a page break,
> > as  my requirement is that each section starts on a
> > new page. But this is forcing a blank page after the
> > last section. Is there any way to remove that?
>
> Don't generate the break-after formatting property on the
> last Section.
>
> <fo:block keep-together="always" white-space-collapse = "false">
>   <xsl:if test="not(position() = last())">
>     <xsl:attribute name="break-after">page</xsl:attribute>
>   </xsl:if>
>   ...

(It's too early to think, but) of course this only applies if the Section
element being processed is the last node in the context. Use e.g.

  <xsl:if test="following::Section">

to make sure the current Section is the last section in the document.

Cheers,

Jarno

--
Andy Vinal: Andy Vinal & Dan Devotion get 'Lost In Hardcore'
<http://www.nuenergy.co.uk/new/musicEvents/djMixDetail.php?id=42>

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.