You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-users@xmlgraphics.apache.org by Rakesh Kumar S <Ra...@infosys.com> on 2008/05/19 10:19:44 UTC

Page Breaks in FOP 0.94

Hi guys,

I am migration to FOP 0.94, i notice that page breaks are not working.
This is a list of letters and i have to break after rendering the last row of each letter, i was earlier using this code and it was working fine.


<fo:table-row>

<fo:table-cell number-columns-spanned="18">

<fo:block><xsl:if test="position() != last()"><xsl:attribute name="break-after">page</xsl:attribute></xsl:if></fo:block>

</fo:table-cell>

</fo:table-row>



How do we go about doing this in FOP 0.94???



Its a bit urgent, please reply back



Rakesh Kumar






**************** CAUTION - Disclaimer *****************
This e-mail contains PRIVILEGED AND CONFIDENTIAL INFORMATION intended solely for the use of the addressee(s). If you are not the intended recipient, please notify the sender by e-mail and delete the original message. Further, you are not to copy, disclose, or distribute this e-mail or its contents to any other person and any such actions are unlawful. This e-mail may contain viruses. Infosys has taken every reasonable precaution to minimize this risk, but is not liable for any damage you may sustain as a result of any virus in this e-mail. You should carry out your own virus checks before opening the e-mail or attachment. Infosys reserves the right to monitor and review the content of all messages sent to or from this e-mail address. Messages sent to or from this e-mail address may be stored on the Infosys e-mail system.
***INFOSYS******** End of Disclaimer ********INFOSYS***

---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


RE: Page Breaks in FOP 0.94

Posted by Rakesh Kumar S <Ra...@infosys.com>.
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0"
  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  xmlns:fo="http://www.w3.org/1999/XSL/Format">


 <xsl:template match="/apportionment">


<fo:root>

    <fo:layout-master-set>
        <fo:simple-page-master master-name="my-page" page-width="9in">
          <fo:region-body margin="0.50in"/>
        </fo:simple-page-master>
      </fo:layout-master-set>

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


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

         <fo:block>

          <fo:table text-align="center" border-spacing="3pt">

           <fo:table-column column-number="1" />
           <fo:table-column column-number="2" />
           <fo:table-column column-number="3" />
    <fo:table-column column-number="4" />
    <fo:table-column column-number="5" />
    <fo:table-column column-number="6" />
    <fo:table-column column-number="7" />
    <fo:table-column column-number="8" />
    <fo:table-column column-number="9" />
    <fo:table-column column-number="10" />
    <fo:table-column column-number="11" />
    <fo:table-column column-number="12" />
    <fo:table-column column-number="13" />
    <fo:table-column column-number="14" />
    <fo:table-column column-number="15" />
    <fo:table-column column-number="16" />
    <fo:table-column column-number="17" />
    <fo:table-column column-number="18" />

    <fo:table-body>
    <!-- <fo:table-header> -->

     <!-- <fo:table-row>
        <fo:table-cell number-columns-spanned="18">
          <fo:block>
<fo:block font-size="10pt"
                    font-family="sans-serif"
                    space-after.optimum="15pt"
                    background-color="#DDE2CC"
                    line-height="18pt"
                    padding-top="3pt"
             padding-left="4pt" border="1pt solid black">

      <fo:block text-align="center" font-size="8pt">XXXXX Web Administration </fo:block>
      <fo:block text-align="center">APPORTIONMENT TIMETABLE</fo:block>
      <fo:block text-align="center"> <br/></fo:block>
      <fo:block  text-align="left" font-size="8pt" > Centre <xsl:value-of select="apportionment-timetable/centre-id"/> </fo:block>

      </fo:block>

          </fo:block>
      </fo:table-cell>
      </fo:table-row> -->

 <!-- </fo:table-header> -->



          <xsl:apply-templates select="apportionment-timetable"/>
  </fo:table-body>

   </fo:table>

        </fo:block>

      </fo:flow>

     </fo:page-sequence>

    </fo:root>
</xsl:template>


<xsl:template match="centreid">
       <fo:block font-size="10pt"
                    font-family="sans-serif"
                    space-after.optimum="15pt"
                    background-color="#DDE2CC"
                    line-height="18pt"
                    padding-top="3pt"
             padding-left="4pt" border="1pt solid black">

      <fo:block text-align="center" font-size="8pt">XXXXX Administration </fo:block>
      <fo:block text-align="center">APPORTIONMENT TIMETABLE</fo:block>
      <fo:block text-align="center"> <br/></fo:block>
      <fo:block  text-align="left" font-size="8pt" > Centre <xsl:value-of select="."/> </fo:block>

      </fo:block>

</xsl:template>

<xsl:template match="apportionment-timetable">
<fo:table-row>
        <fo:table-cell number-columns-spanned="18">
          <fo:block>
<fo:block font-size="10pt"
                    font-family="sans-serif"
                    space-after.optimum="15pt"
                    background-color="#DDE2CC"
                    line-height="18pt"
                    padding-top="3pt"
             padding-left="4pt" border="1pt solid black">

      <fo:block text-align="center" font-size="8pt">XXXXX Administration </fo:block>
      <fo:block text-align="center">APPORTIONMENT TIMETABLE</fo:block>
      <fo:block text-align="center"> <br/></fo:block>
      <fo:block  text-align="left" font-size="8pt" > Centre <xsl:value-of select="centre-id"/> </fo:block>

      </fo:block>

          </fo:block>
      </fo:table-cell>
      </fo:table-row>

<fo:table-row>

 <fo:table-cell number-columns-spanned="9">
  <fo:block text-align="left" font-size="8pt" space-after="10pt" keep-with-next.within-page="always">Examiner: <xsl:value-of select="examiner-name"/></fo:block>
 </fo:table-cell>

 <fo:table-cell number-columns-spanned="9">
  <fo:block text-align="left" font-size="8pt" space-after="10pt">Examiner ID: <xsl:value-of select="examiner-number"/></fo:block>
 </fo:table-cell>

</fo:table-row>

<fo:table-row >

 <fo:table-cell number-columns-spanned="18">
  <fo:block text-align="left" font-size="8pt" space-after="10pt">Exam: XXXXX</fo:block>
 </fo:table-cell>

</fo:table-row>

<fo:table-row>

 <fo:table-cell number-columns-spanned="6">
  <fo:block text-align="left" font-size="8pt" space-after="25pt">Session: <xsl:value-of select="session-id"/></fo:block>
 </fo:table-cell>

 <fo:table-cell number-columns-spanned="6">
  <fo:block text-align="left" font-size="8pt" space-after="25pt">Date: <xsl:value-of select="session-date"/></fo:block>
 </fo:table-cell>

 <fo:table-cell number-columns-spanned="6">
  <fo:block text-align="left" font-size="8pt" space-after="25pt">Venue: <xsl:value-of select="venue-name"/></fo:block>
 </fo:table-cell>

</fo:table-row>

<fo:table-row>

 <fo:table-cell number-columns-spanned="18">
  <fo:block border="1pt solid black " space-after="20pt"/>
 </fo:table-cell>

</fo:table-row>

<fo:table-row>

 <fo:table-cell number-columns-spanned="4">
  <fo:block text-align="left" font-size="8pt" space-after="5pt">Time Slot</fo:block>
 </fo:table-cell>

 <fo:table-cell number-columns-spanned="4">
  <fo:block text-align="left" font-size="8pt" space-after="5pt">Candidate ID</fo:block>
 </fo:table-cell>

 <fo:table-cell number-columns-spanned="5">
  <fo:block text-align="left" font-size="8pt" space-after="5pt">Family Name</fo:block>
 </fo:table-cell>

 <fo:table-cell number-columns-spanned="5">
  <fo:block text-align="left" font-size="8pt" space-after="5pt">Given Name</fo:block>
 </fo:table-cell>


</fo:table-row>

<fo:table-row>

 <fo:table-cell number-columns-spanned="18">
  <fo:block border="1pt solid black " space-after="20pt"/>
 </fo:table-cell>

</fo:table-row>

<xsl:apply-templates select="candidate-details"/>


<fo:table-row>

 <fo:table-cell number-columns-spanned="18">
  <fo:block border="1pt solid black " space-after="50pt" space-before="20pt"/>
 </fo:table-cell>
</fo:table-row>
<fo:table-row>
 <fo:table-cell number-columns-spanned="18">
 <fo:block><xsl:if test="position() != last()"><xsl:attribute name="break-after">page</xsl:attribute></xsl:if></fo:block>
 </fo:table-cell>
</fo:table-row>

</xsl:template>

<xsl:template match="candidate-details">

<fo:table-row>

  <fo:table-cell number-columns-spanned="4">
   <fo:block text-align="left" font-size="8pt" space-after="5pt"><xsl:value-of select="start-time"/></fo:block>
  </fo:table-cell>

  <fo:table-cell number-columns-spanned="4">
   <fo:block text-align="left" font-size="8pt" space-after="5pt"><xsl:value-of select="idnumber"/></fo:block>
  </fo:table-cell>

  <fo:table-cell number-columns-spanned="5">
   <fo:block text-align="left" font-size="8pt" space-after="5pt"><xsl:value-of select="familyname"/></fo:block>
  </fo:table-cell>

  <fo:table-cell number-columns-spanned="5">
   <fo:block text-align="left" font-size="8pt" space-after="5pt"><xsl:value-of select="givenname"/></fo:block>
  </fo:table-cell>


</fo:table-row>

</xsl:template>


 </xsl:stylesheet>

________________________________________
From: Rakesh Kumar S [Rakesh_Kumar06@infosys.com]
Sent: Monday, May 19, 2008 3:49 PM
To: fop-users@xmlgraphics.apache.org
Subject: RE: Page Breaks in FOP 0.94

Hi

Please find the XSL:FO file attached.

Thanks a lot for your help.

Regards,
Rakesh Kumar S

________________________________________
From: Vincent Hennebert [vincent.hennebert@anyware-tech.com]
Sent: Monday, May 19, 2008 3:03 PM
To: fop-users@xmlgraphics.apache.org
Subject: Re: Page Breaks in FOP 0.94

Hi,

Rakesh Kumar S wrote:
> Hi guys,
>
> I am migration to FOP 0.94, i notice that page breaks are not working.
> This is a list of letters and i have to break after rendering the last row of each letter, i was earlier using this code and it was working fine.
>
>
> <fo:table-row>
>
> <fo:table-cell number-columns-spanned="18">
>
> <fo:block><xsl:if test="position() != last()"><xsl:attribute name="break-after">page</xsl:attribute></xsl:if></fo:block>
>
> </fo:table-cell>
>
> </fo:table-row>

This works for me. Can you provide a complete XSL-FO file? No XML
please, only the result of the XSLT transformation.


Thanks,
Vincent


--
Vincent Hennebert                            Anyware Technologies
http://people.apache.org/~vhennebert         http://www.anyware-tech.com
Apache FOP Committer                         FOP Development/Consulting

---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


**************** CAUTION - Disclaimer *****************
This e-mail contains PRIVILEGED AND CONFIDENTIAL INFORMATION intended solely for the use of the addressee(s). If you are not the intended recipient, please notify the sender by e-mail and delete the original message. Further, you are not to copy, disclose, or distribute this e-mail or its contents to any other person and any such actions are unlawful. This e-mail may contain viruses. Infosys has taken every reasonable precaution to minimize this risk, but is not liable for any damage you may sustain as a result of any virus in this e-mail. You should carry out your own virus checks before opening the e-mail or attachment. Infosys reserves the right to monitor and review the content of all messages sent to or from this e-mail address. Messages sent to or from this e-mail address may be stored on the Infosys e-mail system.
***INFOSYS******** End of Disclaimer ********INFOSYS***

---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


Re: Page Breaks in FOP 0.94

Posted by Vincent Hennebert <vi...@anyware-tech.com>.
Rakesh Kumar S wrote:
> Hi
>
> Please find the XSL:FO file attached.

I said the XSL-FO file... You provided the stylesheet (XSLT) used for
the transformation. There’s nothing we can do with it. Send the file
resulting from a run of this stylesheet on a source XML file.


> Thanks a lot for your help.
>
> Regards,
> Rakesh Kumar S


Vincent



-- 
Vincent Hennebert                            Anyware Technologies
http://people.apache.org/~vhennebert         http://www.anyware-tech.com
Apache FOP Committer                         FOP Development/Consulting

---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


RE: Page Breaks in FOP 0.94

Posted by Rakesh Kumar S <Ra...@infosys.com>.
Hi

Please find the XSL:FO file attached.

Thanks a lot for your help.

Regards,
Rakesh Kumar S

________________________________________
From: Vincent Hennebert [vincent.hennebert@anyware-tech.com]
Sent: Monday, May 19, 2008 3:03 PM
To: fop-users@xmlgraphics.apache.org
Subject: Re: Page Breaks in FOP 0.94

Hi,

Rakesh Kumar S wrote:
> Hi guys,
>
> I am migration to FOP 0.94, i notice that page breaks are not working.
> This is a list of letters and i have to break after rendering the last row of each letter, i was earlier using this code and it was working fine.
>
>
> <fo:table-row>
>
> <fo:table-cell number-columns-spanned="18">
>
> <fo:block><xsl:if test="position() != last()"><xsl:attribute name="break-after">page</xsl:attribute></xsl:if></fo:block>
>
> </fo:table-cell>
>
> </fo:table-row>

This works for me. Can you provide a complete XSL-FO file? No XML
please, only the result of the XSLT transformation.


Thanks,
Vincent


--
Vincent Hennebert                            Anyware Technologies
http://people.apache.org/~vhennebert         http://www.anyware-tech.com
Apache FOP Committer                         FOP Development/Consulting

---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


**************** CAUTION - Disclaimer *****************
This e-mail contains PRIVILEGED AND CONFIDENTIAL INFORMATION intended solely for the use of the addressee(s). If you are not the intended recipient, please notify the sender by e-mail and delete the original message. Further, you are not to copy, disclose, or distribute this e-mail or its contents to any other person and any such actions are unlawful. This e-mail may contain viruses. Infosys has taken every reasonable precaution to minimize this risk, but is not liable for any damage you may sustain as a result of any virus in this e-mail. You should carry out your own virus checks before opening the e-mail or attachment. Infosys reserves the right to monitor and review the content of all messages sent to or from this e-mail address. Messages sent to or from this e-mail address may be stored on the Infosys e-mail system.
***INFOSYS******** End of Disclaimer ********INFOSYS***

Re: Page Breaks in FOP 0.94

Posted by Vincent Hennebert <vi...@anyware-tech.com>.
Hi,

Rakesh Kumar S wrote:
> Hi guys,
>
> I am migration to FOP 0.94, i notice that page breaks are not working.
> This is a list of letters and i have to break after rendering the last row of each letter, i was earlier using this code and it was working fine.
>
>
> <fo:table-row>
>
> <fo:table-cell number-columns-spanned="18">
>
> <fo:block><xsl:if test="position() != last()"><xsl:attribute name="break-after">page</xsl:attribute></xsl:if></fo:block>
>
> </fo:table-cell>
>
> </fo:table-row>

This works for me. Can you provide a complete XSL-FO file? No XML
please, only the result of the XSLT transformation.


Thanks,
Vincent


-- 
Vincent Hennebert                            Anyware Technologies
http://people.apache.org/~vhennebert         http://www.anyware-tech.com
Apache FOP Committer                         FOP Development/Consulting

---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


Re: Page Breaks in FOP 0.94

Posted by Lo...@log-net.com.
Give this a shot:

<xsl:attribute 
name="break-after"><xsl:text>page</xsl:text></xsl:attribute>

-Lou

Rakesh Kumar S <Ra...@infosys.com> wrote on 05/19/2008 04:19:44 
AM:

> 
> Hi guys,
> 
> I am migration to FOP 0.94, i notice that page breaks are not working.
> This is a list of letters and i have to break after rendering the 
> last row of each letter, i was earlier using this code and it was 
> working fine.
> 
> 
> <fo:table-row>
> 
> <fo:table-cell number-columns-spanned="18">
> 
> <fo:block><xsl:if test="position() != last()"><xsl:attribute 
> name="break-after">page</xsl:attribute></xsl:if></fo:block>
> 
> </fo:table-cell>
> 
> </fo:table-row>
> 
> 
> 
> How do we go about doing this in FOP 0.94???
> 
> 
> 
> Its a bit urgent, please reply back
> 
> 
> 
> Rakesh Kumar
> 
> 
> 
> 
> 
> 
> **************** CAUTION - Disclaimer *****************
> This e-mail contains PRIVILEGED AND CONFIDENTIAL INFORMATION 
> intended solely for the use of the addressee(s). If you are not the 
> intended recipient, please notify the sender by e-mail and delete 
> the original message. Further, you are not to copy, disclose, or 
> distribute this e-mail or its contents to any other person and any 
> such actions are unlawful. This e-mail may contain viruses. Infosys 
> has taken every reasonable precaution to minimize this risk, but is 
> not liable for any damage you may sustain as a result of any virus 
> in this e-mail. You should carry out your own virus checks before 
> opening the e-mail or attachment. Infosys reserves the right to 
> monitor and review the content of all messages sent to or from this 
> e-mail address. Messages sent to or from this e-mail address may be 
> stored on the Infosys e-mail system.
> ***INFOSYS******** End of Disclaimer ********INFOSYS***
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
> For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
>