Shaun:
This is some code I use to break up my large tables every n rows.  I'm sure you can modify it to do what you want or use pieces of it.

                <xsl:for-each select="details/data/reportrow[position() mod $rowCount = 1]">  <!--YOU WILL PROBABLY WANT TO CHANGE THIS TO LOOP BY caseReport-->
                        <fo:page-sequence master-reference="generic" language="en" country="us">
                                <fo:static-content flow-name="xsl-region-before">
                                        <xsl:call-template name = "pageHeader"/>
                                </fo:static-content>

                                <fo:static-content flow-name="xsl-region-after">
                                        <xsl:call-template name = "copyright"/>
                                </fo:static-content>

                                <fo:flow flow-name="xsl-region-body">
                                        <fo:table table-layout="fixed" width="100%">
                                                <xsl:for-each select="../layout/columns/column">
                                                        <fo:table-column>
                                                                <xsl:call-template name="formatTableColumnAttributes"/>
                                                        </fo:table-column>
                                                   </xsl:for-each>
                                                <fo:table-header>
                                                        <!--TABLE HEADER STUFF HERE-->
                                                </fo:table-header>

                                                <fo:table-body>
                                                        <xsl:for-each select=".|following-sibling::reportrow[position() &lt; $rowCount]">
                                                                <fo:table-row>
                                                                        <!--TABLE ROW STUFF HERE-->
                                                                </fo:table-row>
                                                        </xsl:for-each>
                                                </fo:table-body>
                                        </fo:table>
                                </fo:flow>
                        </fo:page-sequence>
                </xsl:for-each>

HTH,
Lou

Shaun Shoaee <[EMAIL PROTECTED]> wrote on 08/30/2006 10:08:55 AM:

> Hello all and Pascal;
>
> Thank you for your reply and but here is the part that
> I am trying to challenge is to reset the page to 1 for
> each record/or element <caseReport> fetched from xml
> file.
>
> Any idea how to approach?
>
> Here is sample pseudo code:
> <fo:root>
>   <fo:layout-master-set>
>   ....
>   </fo:layout-master-set>
>   <fo:page-sequence master-reference="simple" initial-
>  page-number="1">
>     <fo:static-content flow-name="xsl-region-before">
>      .....
>     </fo:static-content>
>     <fo:static-content flow-name="xsl-region-after">
>     .....
>     </fo:static-content>
>
>     <fo:flow flow-name="xsl-region-body">
>        <xsl:for-each select="caseReport">
>        ......
>        </xsl:for-each>
>        <fo:block id="last-page"/> --for page counting
>     </fo:flow>
>   </fo:page-sequence>
> </fo:root>
>
> --- Pascal Sancho <[EMAIL PROTECTED]> wrote:
>
> > > -----Original Message-----
> > > From: Shaun Shoaee [mailto:[EMAIL PROTECTED]
> > > Sent: Tuesday, August 29, 2006 9:42 PM
> > >
> > > How to implement an XSL-FO stylesheet in
> > FOP-0.20.5 to have a
> > > page sequence for each record (in xml file)?
> > >
> > > In other word how to reset page sequence for new
> > records
> > > selected in XML file.
> > >
> > > don't want: 1/7 2/7 3/7 4/7 5/7 6/7 7/7
> > > want this:  1/2 2/2 1/3 2/3 3/3 1/2 2/2 - Total 7
> > pages
> >
> > Hi Shaun,
> > You can easily reset each pages-sequence with the
> > property
> > initial-page-number="1".
> > However, in this case there is no XSL-FO mechanism
> > to get the global
> > page number.
> >
> > Pascal
> >
> >
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail:
> > [EMAIL PROTECTED]
> > For additional commands, e-mail:
> > [EMAIL PROTECTED]
> >
> >
>
>
> Shaun Shoaee
>
> __________________________________________________
> Do You Yahoo!?
> Tired of spam?  Yahoo! Mail has the best spam protection around
> http://mail.yahoo.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>

Reply via email to