You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-users@xmlgraphics.apache.org by irene23 <ba...@yahoo.es> on 2008/01/02 15:53:53 UTC

Re: 'conditional-page-master-reference' default required?

Hello,

I have made this, but when fop renders to a 1 page document, I get the "any"
page footer (instead of the "last" page footer), even though the  page is
the last page (when the fop renders to a 2+ page document, the last page
gets the last footer and the other pages get the other footer).

Could you give me any idea to get the same in other way? Is there some
attibute to place a <block> at the end of the body?


Thanks.



Jerzy Jalocha wrote:
> 
> I have a two-page document with two 'simple-page-master's, one for the
> first page, and one for the last one. When I use a conditional
> sequence with 'repeatable-page-master-alternatives', and I don't
> provide a default 'conditional-page-master-reference', FOP complains
> about "subsequences exhausted in page-sequence-master", and crashes.
> 
> As seen in the example below, it is easy to circumvent the problem by
> providing a default, but I'm not sure if this behavior is expected, or
> a bug. The specification doesn't seem to require a default
> (http://www.w3.org/TR/xsl/#fo_conditional-page-master-reference).
> 
> More in general, I have the following question. Since I'm new to both
> FOP and XSL-FO, I am quite prone to breaking things. Is it OK to
> report them here when I think I might have found a bug? Or shall I
> wait until I have more expertise?
> 
> Thanks in advance,
> -Jerzy
> 
> 
> <?xml version="1.0" encoding="utf-8"?>
> <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
> 
>    <fo:layout-master-set>
> 
>       <fo:simple-page-master master-name="first-page"
>             page-height="11in" page-width="8.5in"
>             margin-top="0mm" margin-left="0mm" margin-right="0mm"
> margin-bottom="0mm">
>          <fo:region-body
>                border-style="none"
>                margin-top="80mm" margin-bottom="20mm"
> margin-left="20mm" margin-right="20mm"/>
>          <fo:region-before region-name="first-region-before"
>                border-style="none"/>
>          <fo:region-after region-name="first-region-after"
>                border-style="none"/>
>       </fo:simple-page-master>
> 
>       <fo:simple-page-master master-name="last-page"
>             page-height="11in" page-width="8.5in"
>             margin-top="0mm" margin-left="0mm" margin-right="0mm"
> margin-bottom="0mm">
>          <fo:region-body
>                border-style="none"
>                margin-top="40mm" margin-bottom="20mm"
> margin-left="20mm" margin-right="20mm"/>
>          <fo:region-before region-name="last-region-before"
>                border-style="none"/>
>          <fo:region-after region-name="last-region-after"
>                border-style="none"/>
>       </fo:simple-page-master>
> 
>       <fo:page-sequence-master master-name="document-sequence">
>          <fo:repeatable-page-master-alternatives>
>             <fo:conditional-page-master-reference
> master-reference="first-page"
>                   page-position="first"/>
> <!-- Enable this default in order to make it work with FOP.
>             <fo:conditional-page-master-reference
> master-reference="last-page"
>                   page-position="rest"/>
> -->
>             <fo:conditional-page-master-reference
> master-reference="last-page"
>                   page-position="last"/>
>          </fo:repeatable-page-master-alternatives>
>       </fo:page-sequence-master>
> 
>    </fo:layout-master-set>
> 
> 
>    <fo:page-sequence master-reference="document-sequence">
> 
>       <fo:flow flow-name="xsl-region-body"
>             font-size="11pt">
> 
> <!-- Please, fill two pages with 15 copies of this block: -->
> 
>          <fo:block>Lorem ipsum dolor sit amet, consectetur adipisicing
> elit, sed do eiusmod tempor incididunt ut labore et dolore magna
> aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco
> laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor
> in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla
> pariatur. Excepteur sint occaecat cupidatat non proident, sunt in
> culpa qui officia deserunt mollit anim id est laborum.</fo:block>
> 
>       </fo:flow>
> 
>    </fo:page-sequence>
> </fo:root>
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
> For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/%27conditional-page-master-reference%27-default-required--tp14274827p14579654.html
Sent from the FOP - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


R: 'conditional-page-master-reference' default required?

Posted by Roberto Bonsignori <bo...@caribel.it>.
try this:

<?xml version="1.0" encoding="utf-8"?>
<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
<fo:layout-master-set>
  <fo:simple-page-master master-name='simple'
      page-height='246mm'
      page-width='349mm'
      margin-top='10mm'    margin-bottom='10mm'
      margin-left='10mm'   margin-right='10mm'>
    <fo:region-body margin-top='10mm' margin-bottom='10mm'/>
    <fo:region-before extent='10mm'/>
    <fo:region-after extent='10mm'/>
  </fo:simple-page-master>
</fo:layout-master-set>

<fo:page-sequence master-name='simple'>
  <fo:static-content flow-name='xsl-region-before'>
    <fo:table font-size='10pt' width='auto'>
      <fo:table-column column-width='269mm'/>
      <fo:table-column column-width='60mm'/>
      <fo:table-body>
        <fo:table-row height='10pt'>
          <fo:table-cell text-align='start'>
            <fo:block start-indent='1mm' end-indent='1mm'
padding-top='0.5mm'
              >HEADER TITLE</fo:block>
          </fo:table-cell>
          <fo:table-cell text-align='end'>
            <fo:block start-indent='1mm' end-indent='1mm'
padding-top='0.5mm'
              >Pag. <fo:page-number/></fo:block>
          </fo:table-cell>
        </fo:table-row>
      </fo:table-body>
    </fo:table>
  </fo:static-content>

  <fo:static-content flow-name='xsl-region-after'>
    <fo:table font-size='8pt' width='auto'>
      <fo:table-column column-width='269mm'/>
      <fo:table-column column-width='60mm'/>
      <fo:table-body>
        <fo:table-row height='10pt'>
          <fo:table-cell text-align='start'>
            <fo:block start-indent='1mm' end-indent='1mm'
padding-top='0.5mm'
              >FOOTER LEFT TITLE</fo:block>
          </fo:table-cell>
          <fo:table-cell text-align='end'>
            <fo:block start-indent='1mm' end-indent='1mm'
padding-top='0.5mm'
              >FOOTER RIGHT TITLE</fo:block>
          </fo:table-cell>
        </fo:table-row>
      </fo:table-body>
    </fo:table>
  </fo:static-content>

  <fo:flow flow-name='xsl-region-body'>
    <fo:block font-size='10pt' start-indent='1mm' end-indent='1mm'
padding-top='0.5mm' space-before.optimum='3mm' space-after.optimum='5mm'
>SUBTITLE</fo:block>
  </fo:flow>
</fo:page-sequence>
</fo:root>

-----Messaggio originale-----
Da: irene23 [mailto:basura2400@yahoo.es]
Inviato: mercoledi 2 gennaio 2008 15.54
A: fop-users@xmlgraphics.apache.org
Oggetto: Re: 'conditional-page-master-reference' default required?



Hello,

I have made this, but when fop renders to a 1 page document, I get the "any"
page footer (instead of the "last" page footer), even though the  page is
the last page (when the fop renders to a 2+ page document, the last page
gets the last footer and the other pages get the other footer).

Could you give me any idea to get the same in other way? Is there some
attibute to place a <block> at the end of the body?


Thanks.



Jerzy Jalocha wrote:
>
> I have a two-page document with two 'simple-page-master's, one for the
> first page, and one for the last one. When I use a conditional
> sequence with 'repeatable-page-master-alternatives', and I don't
> provide a default 'conditional-page-master-reference', FOP complains
> about "subsequences exhausted in page-sequence-master", and crashes.
>
> As seen in the example below, it is easy to circumvent the problem by
> providing a default, but I'm not sure if this behavior is expected, or
> a bug. The specification doesn't seem to require a default
> (http://www.w3.org/TR/xsl/#fo_conditional-page-master-reference).
>
> More in general, I have the following question. Since I'm new to both
> FOP and XSL-FO, I am quite prone to breaking things. Is it OK to
> report them here when I think I might have found a bug? Or shall I
> wait until I have more expertise?
>
> Thanks in advance,
> -Jerzy
>
>
> <?xml version="1.0" encoding="utf-8"?>
> <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
>
>    <fo:layout-master-set>
>
>       <fo:simple-page-master master-name="first-page"
>             page-height="11in" page-width="8.5in"
>             margin-top="0mm" margin-left="0mm" margin-right="0mm"
> margin-bottom="0mm">
>          <fo:region-body
>                border-style="none"
>                margin-top="80mm" margin-bottom="20mm"
> margin-left="20mm" margin-right="20mm"/>
>          <fo:region-before region-name="first-region-before"
>                border-style="none"/>
>          <fo:region-after region-name="first-region-after"
>                border-style="none"/>
>       </fo:simple-page-master>
>
>       <fo:simple-page-master master-name="last-page"
>             page-height="11in" page-width="8.5in"
>             margin-top="0mm" margin-left="0mm" margin-right="0mm"
> margin-bottom="0mm">
>          <fo:region-body
>                border-style="none"
>                margin-top="40mm" margin-bottom="20mm"
> margin-left="20mm" margin-right="20mm"/>
>          <fo:region-before region-name="last-region-before"
>                border-style="none"/>
>          <fo:region-after region-name="last-region-after"
>                border-style="none"/>
>       </fo:simple-page-master>
>
>       <fo:page-sequence-master master-name="document-sequence">
>          <fo:repeatable-page-master-alternatives>
>             <fo:conditional-page-master-reference
> master-reference="first-page"
>                   page-position="first"/>
> <!-- Enable this default in order to make it work with FOP.
>             <fo:conditional-page-master-reference
> master-reference="last-page"
>                   page-position="rest"/>
> -->
>             <fo:conditional-page-master-reference
> master-reference="last-page"
>                   page-position="last"/>
>          </fo:repeatable-page-master-alternatives>
>       </fo:page-sequence-master>
>
>    </fo:layout-master-set>
>
>
>    <fo:page-sequence master-reference="document-sequence">
>
>       <fo:flow flow-name="xsl-region-body"
>             font-size="11pt">
>
> <!-- Please, fill two pages with 15 copies of this block: -->
>
>          <fo:block>Lorem ipsum dolor sit amet, consectetur adipisicing
> elit, sed do eiusmod tempor incididunt ut labore et dolore magna
> aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco
> laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor
> in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla
> pariatur. Excepteur sint occaecat cupidatat non proident, sunt in
> culpa qui officia deserunt mollit anim id est laborum.</fo:block>
>
>       </fo:flow>
>
>    </fo:page-sequence>
> </fo:root>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
> For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
>
>
>

--
View this message in context:
http://www.nabble.com/%27conditional-page-master-reference%27-default-requir
ed--tp14274827p14579654.html
Sent from the FOP - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org

No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.5.516 / Virus Database: 269.17.12/1203 - Release Date: 30/12/2007
11.27

No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.5.516 / Virus Database: 269.17.12/1203 - Release Date: 30/12/2007
11.27


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org