[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: XSL-FO: Suppressing Header on First Page of Chapte

Subject: Re: XSL-FO: Suppressing Header on First Page of Chapter
From: Wendell Piez <wapiez@xxxxxxxxxxxxxxxx>
Date: Mon, 20 Mar 2006 12:10:01 -0500
fo repeatable page master alternatives
Hi Jordan,

This can be done by setting up a page-sequence-master that uses different page-masters for its first and subsequent pages.

An example is provided in the Docbook XSL-FO documentation: see

http://www.sagehill.net/docbookxsl/PageDesign.html

This is also documented in any reasonably decent book about how to use XSL-FO. But if you get the names of the elements you need from the docbook page, you can probably work out what you want to do from the spec and other resources.

You'd have a new page sequence for each chapter, which would flow the chapter into a sequence of pages, only the first of which would use a special "first-page" design. So you'd have something like

<fo:page-sequence-master master-name="chapter">
    <fo:repeatable-page-master-alternatives>
        <fo:conditional-page-master-reference
                  master-reference="chapter-first"
                  page-position="first"/>
        <fo:conditional-page-master-reference
                  master-reference="rector"
                  odd-or-even="odd"/>
        <fo:conditional-page-master-reference
                  master-reference="verso"
                  odd-or-even="even"/>
        <fo:conditional-page-master-reference
                  master-reference="blank"
                  blank-or-not-blank="blank"/>
    </fo:repeatable-page-master-alternatives>
</fo:page-sequence-master>

Enjoy,
Wendell

At 12:44 AM 3/19/2006, you wrote:
Hey folks,

I'm trying to create a book-quality PDF, including headers, running
footers, odd and even pages, etc.  I've been stumped by one problem
however, so I'm requesting some advice.

At the beginning of each chapter (which is on a new page), I have a
large-font title on it.  On these pages (and only these pages), I want to
suppress the header section (as you often see in published books).  I
searched Google and couldn't find anything directly relevant.

I'm not exactly sure how what approach to take with this.  I could use a
new page-sequence, but I'm not sure how I'd call it just for the one
page.  Alternatively, I was thinking there may be a way to suppress it
with a xsl:if when displaying the header, but I have no idea what sort of
condition to use.

A short example of my XML is as follows:

<div1>
  <div2 title="Chapter 1">
    <p>...</p>
  </div2>
  <div2 title="Chapter 2">
    <p>...</p>
  </div2>
  <div2 title="Chapter 3">
    <p>...</p>
  </div2>
</div1>

And my main p.s.m. (which generates all the content):

<fo:page-sequence-master master-name="body">
  <fo:repeatable-page-master-alternatives>
    <fo:conditional-page-master-reference master-reference="BodyRight"
odd-or-even="odd" />
    <fo:conditional-page-master-reference master-reference="BodyLeft"
odd-or-even="even" />
  </fo:repeatable-page-master-alternatives>
</fo:page-sequence-master>


Obviously, those div2 elements would generate numerous pages each. I can provide some more XSL if that would be helpful, but it didn't see that as necessary at this point.

Thanks for any guidance you can provide,
Jordan D.

BTW, I'm using FOP 0.20.5


======================================================================
Wendell Piez                            mailto:wapiez@xxxxxxxxxxxxxxxx
Mulberry Technologies, Inc.                http://www.mulberrytech.com
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

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.