page-sequence conditional-page-master-reference criteria for last odd page

Darryl Beallie <[email protected]> Mon, 27 Jan 2025 20:41:44 +0000
Newsgroups gmane.text.xml.fop.user
Message-ID <YT3PR01MB81146BE50551FDB2BCC044CDB8EC2@YT3PR01MB8114.CANPRD01.PROD.OUTLOOK.COM>
--_000_YT3PR01MB81146BE50551FDB2BCC044CDB8EC2YT3PR01MB8114CANP_
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable

Hi FOP users,
I am having trouble with the page-master layouts used for a page sequence.

The page sequence uses force-page-count=3D"end-on-even". This appears to wo=
rk as expected, no matter the content, the sequence always ends on an even =
page, creating a blank if necessary.
My trouble is with the last odd page when is preceding a forced end-on-even=
 page.  I want for that preceding last odd page to use a different footer l=
ayout.

I have created simple-page-masters for even , odd , blank, and last odd pag=
es.
I have created the page-sequence-master to use repeatable-page-master-alter=
natives > conditional-page-master-reference as follows

<fo:conditional-page-master-reference master-reference=3D"blank" blank-or-n=
ot-blank=3D"blank"/>
<fo:conditional-page-master-reference master-reference=3D"last_odd" blank-o=
r-not-blank=3D"not-blank" page-position=3D"last" odd-or-even=3D"odd"/>
<fo:conditional-page-master-reference master-reference=3D"even" blank-or-no=
t-blank=3D"not-blank" odd-or-even=3D"even"/>
<fo:conditional-page-master-reference master-reference=3D"odd" blank-or-not=
-blank=3D"not-blank" odd-or-even=3D"odd"/>

No matter the order of the above  conditional-page-master-reference element=
s, the last_odd  never gets selected.

I have verified this by generating  "intermediate-format"  output and see t=
he if:page page-master-name=3D"blank" correctly used for the last page in s=
equence but the preceding odd page is using if:page page-master-name=3D"odd=
".

<if:page-squence>
<if:page page-master-name=3D"odd">..</if:page>
<if:page page-master-name=3D"even">..</if:page>
<if:page page-master-name=3D"odd">..</if:page>
<if:page page-master-name=3D"blank">..</if:page>
</if:page-squence>

Am I misunderstanding  how  force-page-count=3D"end-on-even" works?  Or do =
I have my conditional-page-master-ref criteria wrong or ordered incorrectly=
?  Any help/ideas would be much appreciated.


System details:
Windows 11
Oxygen 26
JRE 17.0.8+7 (From Oxygen installed jre)
Apache FOP 2.9  (From Oxygen installed fop)

Thanks,

Darryl

--_000_YT3PR01MB81146BE50551FDB2BCC044CDB8EC2YT3PR01MB8114CANP_
Content-Type: text/html; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable

<html xmlns:v=3D"urn:schemas-microsoft-com:vml" xmlns:o=3D"urn:schemas-micr=
osoft-com:office:office" xmlns:w=3D"urn:schemas-microsoft-com:office:word" =
xmlns:m=3D"http://schemas.microsoft.com/office/2004/12/omml" xmlns=3D"http:=
//www.w3.org/TR/REC-html40">
<head>
<meta http-equiv=3D"Content-Type" content=3D"text/html; charset=3Dus-ascii"=
>
<meta name=3D"Generator" content=3D"Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
	{font-family:"Cambria Math";
	panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
	{font-family:Aptos;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
	{margin:0in;
	font-size:11.0pt;
	font-family:"Aptos",sans-serif;
	mso-ligatures:standardcontextual;}
span.EmailStyle17
	{mso-style-type:personal-compose;
	font-family:"Aptos",sans-serif;
	color:windowtext;}
.MsoChpDefault
	{mso-style-type:export-only;
	font-size:11.0pt;}
@page WordSection1
	{size:8.5in 11.0in;
	margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
	{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext=3D"edit" spidmax=3D"1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext=3D"edit">
<o:idmap v:ext=3D"edit" data=3D"1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang=3D"EN-US" link=3D"#0563C1" vlink=3D"#954F72" style=3D"word-wrap:=
break-word">
<div class=3D"WordSection1">
<p class=3D"MsoNormal">Hi <span lang=3D"EN-CA">FOP users,<o:p></o:p></span>=
</p>
<p class=3D"MsoNormal"><span lang=3D"EN-CA">I am having trouble with the pa=
ge-master layouts used for a page sequence.
<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span lang=3D"EN-CA"><o:p>&nbsp;</o:p></span></p>
<p class=3D"MsoNormal"><span lang=3D"EN-CA">The page sequence uses force-pa=
ge-count=3D&quot;end-on-even&quot;. This appears to work as expected, no ma=
tter the content, the sequence always ends on an even page, creating a blan=
k if necessary. &nbsp;<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span lang=3D"EN-CA">My trouble is with the last odd=
 page when is preceding a forced end-on-even page.&nbsp; I want for that pr=
eceding last odd page to use a different footer layout.&nbsp;
<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span lang=3D"EN-CA"><o:p>&nbsp;</o:p></span></p>
<p class=3D"MsoNormal"><span lang=3D"EN-CA">I have created simple-page-mast=
ers for even , odd , blank, and last odd pages.
<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span lang=3D"EN-CA">I have created the </span>page-=
sequence-master to use repeatable-page-master-alternatives &gt; conditional=
-page-master-reference as follows<o:p></o:p></p>
<p class=3D"MsoNormal"><o:p>&nbsp;</o:p></p>
<p class=3D"MsoNormal">&lt;fo:conditional-page-master-reference master-refe=
rence=3D&quot;blank&quot; blank-or-not-blank=3D&quot;blank&quot;/&gt;<br>
&lt;fo:conditional-page-master-reference master-reference=3D&quot;last_odd&=
quot; blank-or-not-blank=3D&quot;not-blank&quot; page-position=3D&quot;last=
&quot; odd-or-even=3D&quot;odd&quot;/&gt;<br>
&lt;fo:conditional-page-master-reference master-reference=3D&quot;even&quot=
; blank-or-not-blank=3D&quot;not-blank&quot; odd-or-even=3D&quot;even&quot;=
/&gt;<br>
&lt;fo:conditional-page-master-reference master-reference=3D&quot;odd&#8221=
; blank-or-not-blank=3D&quot;not-blank&quot; odd-or-even=3D&quot;odd&quot;/=
&gt;<o:p></o:p></p>
<p class=3D"MsoNormal"><o:p>&nbsp;</o:p></p>
<p class=3D"MsoNormal">No matter the order of the above&nbsp; conditional-p=
age-master-reference elements, the last_odd&nbsp; never gets selected.
<o:p></o:p></p>
<p class=3D"MsoNormal"><o:p>&nbsp;</o:p></p>
<p class=3D"MsoNormal">I have verified this by generating &nbsp;&#8220;inte=
rmediate-format&#8221;&nbsp; output and see the if:page page-master-name=3D=
&quot;blank&quot; correctly used for the last page in sequence but the prec=
eding odd page is using if:page page-master-name=3D&quot;odd&quot;.
<o:p></o:p></p>
<p class=3D"MsoNormal"><o:p>&nbsp;</o:p></p>
<p class=3D"MsoNormal">&lt;if:page-squence&gt;<o:p></o:p></p>
<p class=3D"MsoNormal">&lt;if:page page-master-name=3D&quot;odd&quot;&gt;..=
&lt;/if:page&gt;<o:p></o:p></p>
<p class=3D"MsoNormal">&lt;if:page page-master-name=3D&quot;even&quot;&gt;.=
.&lt;/if:page&gt;<o:p></o:p></p>
<p class=3D"MsoNormal">&lt;if:page page-master-name=3D&quot;odd&quot;&gt;..=
&lt;/if:page&gt;<o:p></o:p></p>
<p class=3D"MsoNormal">&lt;if:page page-master-name=3D&quot;blank&quot;&gt;=
..&lt;/if:page&gt;<o:p></o:p></p>
<p class=3D"MsoNormal">&lt;/if:page-squence&gt;<o:p></o:p></p>
<p class=3D"MsoNormal"><o:p>&nbsp;</o:p></p>
<p class=3D"MsoNormal">Am I misunderstanding&nbsp; how&nbsp; <span lang=3D"=
EN-CA">force-page-count=3D&quot;end-on-even&quot; works?&nbsp; Or do I have=
 my conditional-page-master-ref criteria wrong or ordered incorrectly? &nbs=
p;Any help/ideas would be much appreciated.</span><o:p></o:p></p>
<p class=3D"MsoNormal"><span lang=3D"EN-CA"><o:p>&nbsp;</o:p></span></p>
<p class=3D"MsoNormal"><span lang=3D"EN-CA"><o:p>&nbsp;</o:p></span></p>
<p class=3D"MsoNormal"><span lang=3D"EN-CA">System details:<o:p></o:p></spa=
n></p>
<p class=3D"MsoNormal"><span lang=3D"EN-CA">Windows 11<o:p></o:p></span></p=
>
<p class=3D"MsoNormal"><span lang=3D"EN-CA">Oxygen 26<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span lang=3D"EN-CA">JRE 17.0.8+7 (From Oxygen insta=
lled jre)<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span lang=3D"EN-CA">Apache FOP 2.9 &nbsp;(From Oxyg=
en installed fop)<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span lang=3D"EN-CA"><o:p>&nbsp;</o:p></span></p>
<p class=3D"MsoNormal"><span lang=3D"EN-CA">Thanks,<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span lang=3D"EN-CA"><o:p>&nbsp;</o:p></span></p>
<p class=3D"MsoNormal"><span lang=3D"EN-CA">Darryl<o:p></o:p></span></p>
</div>
</body>
</html>

--_000_YT3PR01MB81146BE50551FDB2BCC044CDB8EC2YT3PR01MB8114CANP_--