xmlgraphics-fop-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Hani Elabed <h...@elabed.net>
Subject Re: Unknown # of pages and static content
Date Mon, 02 Oct 2000 15:48:56 GMT
Sebastian,

I am working with Ken M. on the same project...

While the solution you suggested allows us to change the Layout
of the remaining pages, it does NOT allow
us to change the content( i.e data ) of the
<fo:static-content flow-name="xsl-region-before">

This is because the  <fo: static-content ... >
is defined inside <fo: page-sequence as follows...>
and there is NO WAY to tell FOP to use ONE
<fo:static-content flow-name="xsl-region-before">
for the 1st page and ANOTHER for subsequent pages...

While the Layout can be changed as you suggest from
first page to subsequent pages... Ken and I and others here
at the Wisconsin Court System have failed in finding a way
that allows us to change the content of the header from one
page to the other, i.e all within the same page-sequence that
happens to have the <fo: flow ...> object.

Again, we might be collectively missing something here...

Your suggestions for a plan of attack is greatly appreciated.

Thanks in advance to all.

Hani

<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
    <fo:layout-master-set>

        <!-- sebastian's code STARTS here -->

        <fo:simple-page-master master-name="firstpage"
                               page-height="297mm" page-width="210mm"
                               margin-top="20mm"  margin-bottom="10mm"
                               margin-left="25mm" margin-right="20mm">
          <fo:region-body
                          margin-top="0mm" margin-bottom="15mm"
                          margin-left="0mm" margin-right="0mm"/>
          <fo:region-before
                region-name="xsl-region-before-firstpage"
                extent="10mm"/>
          <fo:region-after
                region-name="xsl-region-after-firstpage"
                extent="10mm"/>
        </fo:simple-page-master>
        <!-- layout for the even page -->
        <fo:simple-page-master master-name="evenpage"
                               page-height="297mm" page-width="210mm"
                               margin-top="20mm"  margin-bottom="10mm"
                               margin-left="25mm" margin-right="20mm">
          <fo:region-body
                          margin-top="0mm" margin-bottom="15mm"
                          margin-left="0mm" margin-right="0mm"/>
          <fo:region-before
                region-name="xsl-region-before-evenpage"
                extent="10mm"/>
          <fo:region-after
                region-name="xsl-region-after-evenpage"
                extent="10mm"/>
        </fo:simple-page-master>
        <!-- layout for the odd page -->
        <fo:simple-page-master master-name="oddpage"
                               page-height="297mm" page-width="210mm"
                               margin-top="20mm"  margin-bottom="10mm"
                               margin-left="25mm" margin-right="20mm">
          <fo:region-body
                          margin-top="0mm" margin-bottom="15mm"
                          margin-left="0mm" margin-right="0mm"/>
          <fo:region-before
                region-name="xsl-region-before-oddpage"
                extent="10mm"/>
          <fo:region-after
                region-name="xsl-region-after-oddpage"
                extent="10mm"/>
        </fo:simple-page-master>
     <fo:page-sequence-master master-name="twoside">

      <fo:repeatable-page-master-alternatives>
        <fo:conditional-page-master-reference
                master-name="firstpage"
                page-position="first"/>
        <fo:conditional-page-master-reference
                master-name="oddpage"
                odd-or-even="odd"/>
        <fo:conditional-page-master-reference
                master-name="evenpage"
                odd-or-even="even"/>
      </fo:repeatable-page-master-alternatives>
     </fo:page-sequence-master>

        <!-- sebastian's code ENDS here -->

    </fo:layout-master-set>
    <fo:page-sequence master-name="psmA">
        <fo:static-content flow-name="xsl-region-before">
            .... header data ........
        </fo:static-content>
        <fo:static-content flow-name="xsl-region-after">
            .....footer data ......
        </fo:static-content>
        <fo:flow flow-name="xsl-region-body">

        ...... plenty of data........

        </fo:flow>
    </fo:page-sequence>
</fo:root>


Sebastian Rahtz wrote:

> Ken McKelvey writes:
>  > I would like to have one header (<fo:static-content
>  > flow-name="xsl-region-before">) on the first page, and a
>  > distinctly different header on the 2nd and subsequent pages.
>  > These headers (1st page vs the rest) will have different content
>  > as well as page positioning.  I think I've figured out how to
>
> Try something like the appended. It defines 3 simplepage masters, for first,
> even, and odd, and then makes a composite one which calls on the
> others if the conditions are right. The key is
> "fo:repeatable-page-master-alternatives"
>
> I am not sure whether FOP implements all this.
>
> sebastian
>
>         <fo:simple-page-master master-name="firstpage"
>                                page-height="297mm" page-width="210mm"
>                                margin-top="20mm"  margin-bottom="10mm"
>                                margin-left="25mm" margin-right="20mm">
>           <fo:region-body
>                           margin-top="0mm" margin-bottom="15mm"
>                           margin-left="0mm" margin-right="0mm"/>
>           <fo:region-before
>                 region-name="xsl-region-before-firstpage"
>                 extent="10mm"/>
>           <fo:region-after
>                 region-name="xsl-region-after-firstpage"
>                 extent="10mm"/>
>         </fo:simple-page-master>
>         <!-- layout for the even page -->
>         <fo:simple-page-master master-name="evenpage"
>                                page-height="297mm" page-width="210mm"
>                                margin-top="20mm"  margin-bottom="10mm"
>                                margin-left="25mm" margin-right="20mm">
>           <fo:region-body
>                           margin-top="0mm" margin-bottom="15mm"
>                           margin-left="0mm" margin-right="0mm"/>
>           <fo:region-before
>                 region-name="xsl-region-before-evenpage"
>                 extent="10mm"/>
>           <fo:region-after
>                 region-name="xsl-region-after-evenpage"
>                 extent="10mm"/>
>         </fo:simple-page-master>
>         <!-- layout for the odd page -->
>         <fo:simple-page-master master-name="oddpage"
>                                page-height="297mm" page-width="210mm"
>                                margin-top="20mm"  margin-bottom="10mm"
>                                margin-left="25mm" margin-right="20mm">
>           <fo:region-body
>                           margin-top="0mm" margin-bottom="15mm"
>                           margin-left="0mm" margin-right="0mm"/>
>           <fo:region-before
>                 region-name="xsl-region-before-oddpage"
>                 extent="10mm"/>
>           <fo:region-after
>                 region-name="xsl-region-after-oddpage"
>                 extent="10mm"/>
>         </fo:simple-page-master>
>      <fo:page-sequence-master master-name="twoside">
>
>       <fo:repeatable-page-master-alternatives>
>         <fo:conditional-page-master-reference
>                 master-name="firstpage"
>                 page-position="first"/>
>         <fo:conditional-page-master-reference
>                 master-name="oddpage"
>                 odd-or-even="odd"/>
>         <fo:conditional-page-master-reference
>                 master-name="evenpage"
>                 odd-or-even="even"/>
>       </fo:repeatable-page-master-alternatives>
>      </fo:page-sequence-master>


Mime
View raw message