On Aug 25, 2005, at 21:00, bharathi kongara wrote:

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 in the generated pdf(ofcorse it will). Is
there any way to remove that(either from the style
sheet directly or after the pdf is generated)?

You can do this in XSLT like so:

<xsl:template match="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>
    <!-- the rest = same as above -->
  </fo:block>
</xsl:template>


HTH!

Greetz,

Andreas


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to