This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: different first page using sequence-specifier-repeating


Steve,

> I've seen lot's of examples such as:
>
> <fo:layout-master-set>
>     <fo:simple-page-master
>          page-master-name="one"
> ...
>
<skip/>
>
> But can anyone give me an example of how to have two different
> page layouts?  I want to have a different page header on the first
> page than the rest of the pages.

Your examples follow the old version of XSL Working Draft (namely, that of April
21, 1999). At that time, what you are asking for was impossible.

The current version of XSL FO (Candidate Recommendation of November 21, 2000)
has means to switch headers put on different pages - you can give custom names
to regions, and than specify these names in flow-name property of a
fo:static-content element (see code below).

Most XSL FO formatters now support the Candidate Recommendation. Which one are
you using? Probably, it needs upgrading. By the way: we have a stylesheet to
convert Apr'99 XSLFO files to XSL CR (available from
http://www.renderx.com/Tests/validator/FO99to00.xsl; also part of XEP2.01 eval
version distribution).

Regards,

Nikolai Grigoriev
RenderX

============================================
<fo:layout-master-set>
  <!-- even pages -->
  <fo:simple-page-master master-name="left">
    <fo:region-body margin="1in"/>
    <fo:region-before extent="1in" region-name="left-header"/>
  </fo:simple-page-master>
  <!-- odd pages -->
  <fo:simple-page-master master-name="right">
    <fo:region-body margin="1in"/>
    <fo:region-before extent="1in" region-name="right-header"/>
  </fo:simple-page-master>

  <!-- page sequence master - replaces sequence-specification -->
  <fo:page-sequence-master master-name="alternating">
    <fo:repeatable-page-master-alternatives>
      <fo:conditional-page-master-reference master-name="left"
            odd-or-even="even"/>
      <fo:conditional-page-master-reference master-name="right"/>
    </fo:repeatable-page-master-alternatives>
  </fo:page-sequence-master>
</fo:layout-master-set>

<fo:page-sequence master-name="alternating">
  <fo:static-content flow-name="left-header">
    <fo:block text-align="start">Left Header</fo:block>
  </fo:static-content>

  <fo:static-content flow-name="right-header">
    <fo:block text-align="end">Right Header</fo:block>
  </fo:static-content>

  <fo:flow>
    ......








 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]