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

Re: Different header on first page (xsl:fo)?

Subject: Re: Different header on first page (xsl:fo)?
From: "G. Ken Holman" <gkholman@xxxxxxxxxxxxxxxxxxxx>
Date: Wed, 07 Apr 2004 11:21:05 -0400
header on first page
At 2004-04-07 14:49 +0200, Simon Dotschuweit wrote:
I really need to have a different fo:region-before for the first page,
but I have no idea how to do that, can I perhabs somehow access
the current page number?

No, this is not available to you algorithmically.


like:

<xsl:if test='pagenumber=1'>
        <fo:block>Do this!</fo:block>
</xsl:if>
<xsl:if test='pagenumber!=1'>
        <fo:block>Do that!</fo:block>
</xsl:if>

Note that you are attempting to use XSLT at the run time of XSL-FO which is not available to you because *all* of XSLT is complete before XSL-FO even begins to work. There is an arm's-length relationship between the two processes.


You set up your formatting with contingencies for different page geometries in a sequence of page geometries:

(1) - create a page geometry for the first page with a <region-before> name something like "before-on-first", name the geometry something like "first"
(2) - create a page geometry for all the other pages with a <region-before> name something like "before-rest", name the geometry something like "rest"
(3) - create a page sequence master, that delivers the first geometry for the first page and the other geometry for the remainder of your pages:


   <page-sequence-master name="all-pages">
     <single-page-master-reference master-reference="first"/>
     <repeatable-page-master-reference master-reference="rest"/>
   </page-sequence-master>

(4) - point to the page-sequence-master from your page sequence:

<page-sequence master-reference="all-pages">

(5) - define the static content you need on each of the two geometries:

     <static-content region-name="before-on-first">
       <block>Do this!</block>
     </static-content>
     <static-content region-name="before-rest
       <block>that</block>
     </static-content>

I hope this helps.

....................... Ken

--
Public courses: Spring 2004 world tour of hands-on XSL instruction
Each week:   Monday-Wednesday: XSLT/XPath; Thursday-Friday: XSL-FO
Hong Kong May 17-21; Bremen Germany May 24-28; Helsinki June 14-18

World-wide on-site corporate, govt. & user group XML/XSL training.
G. Ken Holman                 mailto:gkholman@xxxxxxxxxxxxxxxxxxxx
Crane Softwrights Ltd.          http://www.CraneSoftwrights.com/s/
Box 266, Kars, Ontario CANADA K0A-2E0    +1(613)489-0999 (F:-0995)
Male Breast Cancer Awareness  http://www.CraneSoftwrights.com/s/bc

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.