Re: last page and first page at the same time
"Nikolai Grigoriev" <[email protected]> Thu, 5 Dec 2002 21:48:15 +0300
| Newsgroups | gmane.text.xml.xsl.general |
|---|---|
| Message-ID | <01db01c29c8e$e490f730$0101a8c0@grig> |
Hi Ken, G. Ken Holman <[email protected]> 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" master-reference="the-only-page"/> </repeatable-page-master-alternatives> <!-- Sequence for multi-page documents --> <repeatable-page-master-alternatives> <conditional-page-master-reference page-position="first" master-reference="first-page-out-of-many"/> <conditional-page-master-reference page-position="last" master-reference="last-page-out-of-many"/> <conditional-page-master-reference master-reference="page-that-is-neither-first-nor-last"/> </repeatable-page-master-alternatives> </page-sequence-master> 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 RenderX