xsl-list
[Top] [All Lists]

How to apply different page master

2005-02-08 05:13:03
Hi,

I have the following XML

<document>
 <chapter>
  ......
  .....
  </chapter>
 <chapter>
  ......
  .....
  </chapter>
 <chapter>
  ......
  .....
  </chapter>
</document>

For each chapter I need to print different heading as chapter title and restart the page
numbering for starting from 1.

The number of chapters are not known.

I tried setting the following page sequence :-

<fo:layout-master-set>
   <fo:simple-page-master
          master-name="document"
           page-height  ="297mm"
          page-width   ="210mm"
          margin-left  ="2mm"
          margin-right ="2mm">
        <fo:region-body margin-top="100mm" margin-bottom="5mm" />
        <fo:region-before extent="99mm"/>
         <fo:region-after extent="4mm"/>
  </fo:simple-page-master>

   <fo:page-sequence-master master-name="chapter">
         <xsl:for-each select="/document/chapter">
<fo:repeatable-page-master-reference master-reference="document" />
         </xsl:for-each>
   </fo:page-sequence-master>
</fo:layout-master-set>

<fo:page-sequence master-reference="chapter" 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">
        <fo:block break-before="page" />
        ......
   </fo:flow>
</fo:page-sequence>

But it doesn't work. It is printing only one page even if there is a break specified.

Is it the right way to apply different page sequence for different chapter?

Arun

_________________________________________________________________
Millions of possibilities - find your Partner http://www.bharatmatrimony.com/cgi-bin/bmclicks1.cgi?74 On BharatMatrimony.com


--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--



<Prev in Thread] Current Thread [Next in Thread>