W3C home > Mailing lists > Public > www-xsl-fo@w3.org > December 2002

Re: last page and first page at the same time

From: Nikolai Grigoriev <grig@renderx.com>
Date: Thu, 5 Dec 2002 21:48:15 +0300
Message-ID: <01db01c29c8e$e490f730$0101a8c0@grig>
To: <www-xsl-fo@w3.org>

Hi Ken,

G. Ken Holman <gkholman@cranesoftwrights.com> wrote:

>    <page-sequence-master master-name="frame-pages">
>      <repeatable-page-master-alternatives maximum-repeats="1">
>        <conditional-page-master-reference page-position="last"
>          master-reference="C"/>
>        <conditional-page-master-reference page-position="first"
>          master-reference="A"/>
>      </repeatable-page-master-alternatives>
>      <repeatable-page-master-alternatives>
>        <conditional-page-master-reference page-position="last"
>          master-reference="B"/>
>        <conditional-page-master-reference page-position="rest"
>          master-reference="A"/>
>      </repeatable-page-master-alternatives>
>    </page-sequence-master>

Just a suggestion: you can take the master for the first page
out of the first fo:repeatable-page-master-alternatives,
like this:

<page-sequence-master master-name="pages">

   <!-- Sequence for single-page documents -->
   <repeatable-page-master-alternatives maximum-repeats="1">
        <conditional-page-master-reference page-position="last"

   <!-- Sequence for multi-page documents -->
       <conditional-page-master-reference page-position="first"
       <conditional-page-master-reference page-position="last"


The first subsequence will match if and only if there is exactly
one page in the sequence. If there are two pages or more, the 
processing finds no suitable page-masters in the first subsequence,
and moves to the second subsequence, skipping the first one.

This is equivalent to your solution, but has a benefit of better 
logical separation between masters applicable to single-page 
sequences, and those applicable to multi-page ones.

Best regards,
Nikolai Grigoriev
Received on Thursday, 5 December 2002 13:50:15 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 20:58:27 UTC