I have the same problem as Richard. On the web all examples I found do use
".fo" files with static contents. 

To simplify, I will try to explain my problem usin the same example as
Richard (may be we will have our solutions in the same time?!): 

<all_invoices>
    <client name="client1">
        <letter ref_let="letter1">
        </letter>
        <invoices>
            <invoice ref_inv="inv1"></invoice>
        </invoices>
     </client>
    <client name="client2">
        <letter ref_let ="letter2">
        </letter>
        <invoices>
            <invoice ref_inv="inv2"></invoice>
            <invoice ref_inv="inv3"></invoice>
        </invoices>
     </client>
</all_invoices>

1* I have tried to use two simple page master:
<fo:simple-page-master master-name="letter" ...
 <fo:region-body margin-top="0cm" margin-bottom="0cm"/>
</fo:simple-page-master>
                                
<fo:simple-page-master master-name="invoice" ...
        <fo:region-body margin-top="9.1cm" margin-bottom="0.5cm"/>
        <fo:region-before extent="9cm" />
</fo:simple-page-master>

2** Then I defined a <fo:page-sequence-master> to be able to alternate these
page masters:

<fo:page-sequence-master master-name="alternating">
  <fo:repeatable-page-master-alternatives maximum-repeats="no-limit">
   <fo:conditional-page-master-reference master-reference="letter"
page-position="first"/>
    <fo:conditional-page-master-reference master-reference="invoice"
page-position="rest"/>
  </fo:repeatable-page-master-alternatives>
</fo:page-sequence-master>

3*** Page sequences:
<fo:page-sequence master-reference="letter">
        <fo:flow flow-name="xsl-region-body">
                <fo:block>
                        <xsl:apply-templates select="
all_invoices/client/letter"/>
                </fo:block>
        </fo:flow>
</fo:page-sequence>

<fo:page-sequence master-reference="type-crg">
        <fo:static-content flow-name="xsl-region-before">
                <fo:block>
                        <xsl:call-template name="invoice-header"/>
                </fo:block>
        </fo:static-content>
        <fo:flow flow-name="xsl-region-body">
                <fo:block>
                <xsl:apply-templates select="
all_invoices/client/invoices/invoice"/>
                </fo:block>
        </fo:flow>
</fo:page-sequence>

==> RESULTING PDF: I have all letters for all clients, and then all
invoices!! No alternating page masters.

What is the right xsl-fo transformation to have per client: the letter and
then all his invoices??

Thanx for any help.

-----Message d'origine-----
De : J.Pietschmann [mailto:[EMAIL PROTECTED] 
Envoyé : lundi 30 juillet 2007 23:11
À : fop-users@xmlgraphics.apache.org
Objet : Re: About page sequences

Richard FARAND wrote:
> I have to print a set of clients' invoices. For each client I have to 
> print a letter first, and then print all his invoices.
> So I have an XML File with structure like this:
[snip]
> Which page-sequence (conditional or not), should I use to print for each 
> client, his letter in the right page-master and then all his invoices in 
> the second one.

Please clarify whether you need help writing the FO or whether you
need help writing the transformation from your XML source to the FO.
In the latter case, you'll get help more easily on the XSL list:
  http://www.mulberrytech.com/xsl/xsl-list/

There are several examples for FO documents using multiple page masters
in the FOP distribution, for example
  examples/fo/pagination/franklin_2pageseqs.fo
You can find more on the internet, in particular in Dave Pawson's XSL
FAQ.

J.Pietschmann

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to