Hi,

"only" works as expected.

Note that fo:conditional-page-master-reference order is taken into
account within the fo:repeatable-page-master-alternatives.
(this is a sequential test).

if you need a "only" master, you have to put it in 1st position,
otherwise another one can be used.
Same thing about "last" master, witch is probably more what you need in
this case.

See attached example, and try to change order, or comment some parts.

Le 24/01/2012 20:21, FPar a écrit :
> 
> You are indeed right, that works, thank you! For some reason it didn't occur
> to me to not include the page position attribute for the "all-but-last"
> layout.
> 
> Haven't retried the "only" page-position yet (I'm interested in confirming
> that this works.)
> 
> 
> 
> Amick, Eric wrote:
>>
>> I'm probably missing something, but won't this do what you want?
>>
>> <fo:page-sequence-master master-name="letter">
>>      <fo:repeatable-page-master-alternatives>
>>              <fo:conditional-page-master-reference page-position="last"
>> master-reference="letter-last"/>
>>              <fo:conditional-page-master-reference
>> master-reference="letter-all-but-last"/>
>>       </fo:repeatable-page-master-alternatives>
>> </fo:page-sequence-master>
>>
>> Eric Amick   Systems Engineer II
>> Legislative Computer Systems
>>
>>> -----Original Message-----
>>> From: FPar [mailto:[email protected]]
>>> Sent: Tuesday, January 24, 2012 8:09
>>> To: [email protected]
>>> Subject: Re: FOP 1.0 support for 'page-postion=only'
>>>
>>>
>>> Hmm, OK. The compliance page seems to be for all versions. Do you have
>>> an
>>> example of something that should work? I have a letter where there is a
>>> signature section that should appear (in the footer) of the last page
>>> (I
>>> want to keep it fixed to the bottom to the page). However, if the page
>>> is
>>> only one page long, I also want that signature section to appear.
>>>
>>> This is what I had that didn't work:
>>>
>>> <fo:page-sequence-master master-name="letter">
>>>     <fo:repeatable-page-master-alternatives>
>>>             <fo:conditional-page-master-reference page-position="only"
>>> master-reference="letter-last"/>
>>>             <fo:conditional-page-master-reference page-position="first"
>>> master-reference="letter-all-but-last"/>
>>>             <fo:conditional-page-master-reference page-position="rest"
>>> master-reference="letter-all-but-last"/>
>>>             <fo:conditional-page-master-reference page-position="last"
>>> master-reference="letter-last"/>
>>>
>>>
>>> </fo:repeatable-page-master-alternatives>
>>>     </fo:page-sequence-master>
>>>
>>> Does this look correct? Should this work? Thanks for any help with
>>> this!
>>>
>>>
>>>
>>> Pascal Sancho wrote:
>>>>
>>>> Hi,
>>>>
>>>> Page compliance says that partial support concerns only FOP 0.95.
>>> Latter
>>>> versions have full support for this property.
>>>>
>>>> After SVN check, the "only" support was added in rev 698280, witch
>>> was
>>>> prior to FOP 1.0.
>>>>
>>>> So, page compliance is up to date (regarding that feature), and FOP
>>> 1.0
>>>> should implement it fully.

-- 
Pascal
<?xml version="1.0" encoding="UTF-8"?>
<fo:root xmlns:xsl="http://www.w3.org/1999/XSL/Transform"; xmlns:fo="http://www.w3.org/1999/XSL/Format";>
  <fo:layout-master-set>
    <fo:simple-page-master master-name="masterOnly">
      <fo:region-body margin="1in"/>
      <fo:region-before region-name="before-only"/>
    </fo:simple-page-master>
   <fo:simple-page-master master-name="masterFirst">
      <fo:region-body margin="1in"/>
      <fo:region-before region-name="before-first"/>
    </fo:simple-page-master>
   <fo:simple-page-master master-name="masterLast">
      <fo:region-body margin="1in"/>
      <fo:region-before region-name="before-last"/>
    </fo:simple-page-master>
    <fo:simple-page-master master-name="masterOther">
      <fo:region-body margin="1in"/>
      <fo:region-before region-name="before-other"/>
    </fo:simple-page-master>
    <fo:page-sequence-master master-name="seqMaster">
      <fo:repeatable-page-master-alternatives>
        <fo:conditional-page-master-reference page-position="only" master-reference="masterOnly"/>
        <fo:conditional-page-master-reference page-position="first" master-reference="masterFirst"/>
        <fo:conditional-page-master-reference page-position="last" master-reference="masterLast"/>
        <fo:conditional-page-master-reference master-reference="masterOther"/>
      </fo:repeatable-page-master-alternatives>
    </fo:page-sequence-master>
  </fo:layout-master-set>
  <fo:page-sequence master-reference="seqMaster">
    <fo:static-content flow-name="before-only">
      <fo:block>Only</fo:block>
    </fo:static-content>
    <fo:static-content flow-name="before-first">
      <fo:block>First</fo:block>
    </fo:static-content>
    <fo:static-content flow-name="before-last">
      <fo:block>Last</fo:block>
    </fo:static-content>
    <fo:static-content flow-name="before-other">
      <fo:block>Other</fo:block>
    </fo:static-content>
    <fo:flow flow-name="xsl-region-body">
      <fo:block break-after="page">page 1</fo:block>
      <fo:block break-after="page">page 2</fo:block>
      <fo:block>page 3</fo:block>
    </fo:flow>
  </fo:page-sequence>
</fo:root>

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to