https://issues.apache.org/bugzilla/show_bug.cgi?id=40798
--- Comment #9 from Andreas L. Delmelle <[EMAIL PROTECTED]> 2008-09-20 06:40:26 PST --- Created an attachment (id=22617) --> (https://issues.apache.org/bugzilla/attachment.cgi?id=22617) Changes necessary to implement page-position="last" Just thought I'd have a look into this, and AFAICT, implementing page-position="only" would not really be that complex. Parts of it already have, but org.apache.fop.layoutmgr.PageProvider always passes false for the 'isOnlyPage' parameter. Now, I'm wondering whether this should be a parameter at all... If we pass isFirstPage and isLastPage, then isOnlyPage is always implied (?) Looking at the tests in ConditionalPageMasterReference.isValid() a little closer, this also needed some work to /properly/ take into account page-position="only". Before the patch, a master-reference with this attribute-value will make isValid() always return true, even if isOnlyPage is set to false. The small patch in attach fixes the issue in PageProvider (but does not yet eliminate the superfluous parameter). The changes in ConditionalPageMasterReference, IMO, perfectly reflect the definition of the values in the XSL-FO 1.1 Rec 6.4.12: ... "first", "last", "only" (both first and last), "rest" (not first nor last) or "any" (all of the previous). So, it does not really 'fix' the issue of not being able to use a 'last' page-master-reference for a first page. The only ones eligible in that case are those with page-position 'only' or 'any'. The correct specification for the document in attachment 22237 would be (IIC): ... <page-sequence-master master-name="whatever"> <repeatable-page-master-alternatives maximum-repeats="no-limit"> <conditional-page-master-reference master-reference="only-page-layout" page-position="only"/> <conditional-page-master-reference master-reference="first-page-layout" page-position="first"/> <conditional-page-master-reference master-reference="last-page-layout" page-position="last"/> <conditional-page-master-reference master-reference="rest-page-layout" page-position="rest"/> </repeatable-page-master-alternatives> </page-sequence-master> ... This works perfectly after applying the patch, and breaks no other testcases, so I'm contemplating a commit. -- Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug.
