Bug 50391 - [PATCH] Add support for different flow-name of fo:region-body in FOP
Summary: [PATCH] Add support for different flow-name of fo:region-body in FOP
Status: CLOSED FIXED
Alias: None
Product: Fop - Now in Jira
Classification: Unclassified
Component: page-master/layout (show other bugs)
Version: trunk
Hardware: All All
: P2 normal
Target Milestone: ---
Assignee: fop-dev
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-12-01 06:34 UTC by Peter Hancock
Modified: 2012-03-28 06:34 UTC (History)
0 users



Attachments
Patch for enhancement (61.61 KB, patch)
2010-12-01 06:35 UTC, Peter Hancock
Details | Diff
example .fo demonstrating patch (1.75 KB, text/plain)
2010-12-01 06:36 UTC, Peter Hancock
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Peter Hancock 2010-12-01 06:34:37 UTC
This patch is not an implementation of flow-maps.  The intention is for simple-page-masters that reference flows that are not defined in the page-sequence should generate empty flows- that is pages with the content layed out in the region-body.
This implementation is not inconsistent with section 6.4.1.5 of the XSL recommendation (1.0 & 1.1)

example.fo (attached) will cause the trunk to throw due to unmapped flows, however this patch will produce an even and odd alternatives of empty and 'main flow' pages.

This patch also introduces 3 dependencies as part of the unit test coverage:
mockito-core-1.8.5.jar
hamcrest.core-1.1.0.jar
objenesis-1.0.0.jar
They are to be placed in lib/build.
Comment 1 Peter Hancock 2010-12-01 06:35:35 UTC
Created attachment 26360 [details]
Patch for enhancement
Comment 2 Peter Hancock 2010-12-01 06:36:52 UTC
Created attachment 26361 [details]
example .fo demonstrating patch
Comment 3 Peter Hancock 2010-12-01 06:47:34 UTC
All dependencies can be obtained from http://mockito.org/.
 mockito-1.8.5.zip has a directory called seperate-jars containing
mockito-core-1.8.5.jar
hamcrest.core-1.1.0.jar
objenesis-1.0.0.jar
Comment 4 Chris Bowditch 2012-01-10 14:54:18 UTC
Hi Peter,

Thanks for submitting this patch. I have reviewed it and found a couple of issues. There were some minor conflicts due to the age of the patch that I resolved. I also had to update the tests to Junit4. My question is around the AllTests class added to the pagination package. 2 test were added to this package:

PageSequenceMasterTestCase
RepeatablePageMasterAlternativesTestCase

but the AllTest class only references PageSequenceMasterTestCase. Is that intentional or should it also reference the RepeatablePageMasterAlternativesTestCase?

Thanks,

Chris
Comment 5 Peter Hancock 2012-01-10 15:24:10 UTC
Well spotted Chris, RepeatablePageMasterAlternativesTestCase should be run.

The AllTest class should contain something like

@SuiteClasses({ PageSequenceMasterTestCase.class, RepeatablePageMasterAlternativesTestCase.class })
Comment 6 Chris Bowditch 2012-01-10 16:17:22 UTC
Thanks Peter. I've committed you patch and unit tests in revision 1229622