Re: [xsl] XSL-FO page layout question

Subject: Re: [xsl] XSL-FO page layout question
From: Wendell Piez <wapiez@xxxxxxxxxxxxxxxx>
Date: Thu, 29 Mar 2007 12:26:13 -0400

You're almost there.

Currently, you're flowing your entire content into a single page-sequence, as shown here:

At 09:58 AM 3/29/2007, you wrote:
<fo:page-sequence master-reference="my-sequence">
  <fo:static-content flow-name="first-before"> ... </fo:static-content>
  <!-- This code sets up running head for odd pages -->
  <fo:static-content flow-name="odd-before"> ... </fo:static-content>
  <!-- This code sets up running head for even pages -->
  <fo:static-content flow-name="even-before"> ... </fo:static-content>
  <fo:flow flow-name="xsl-region-body">
     <xsl:apply-templates select="/book/body"/>

Instead, you want each chapter to get its own page sequence. Something like

(where the above appeared)
     <xsl:apply-templates select="/book/body/chapter"/>

and then

<xsl:template match="chapter">
  <fo:page-sequence master-reference="my-sequence">
     ... first, your static contents ...
     <fo:flow flow-name="xsl-region-body">

(with adjustments made for the actual structure of your input).

Then each chapter gets its own page sequence and thus its own first page.

You may have to adjust settings on the page-sequence-master to get pagination to be continuous, control where the first page appears (on an odd or even page), etc.


====================================================================== Wendell Piez mailto:wapiez@xxxxxxxxxxxxxxxx Mulberry Technologies, Inc. 17 West Jefferson Street Direct Phone: 301/315-9635 Suite 207 Phone: 301/315-9631 Rockville, MD 20850 Fax: 301/315-8285 ---------------------------------------------------------------------- Mulberry Technologies: A Consultancy Specializing in SGML and XML ======================================================================

Current Thread