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(_at_)CraneSoftwrights(_dot_)com
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