Definitive XSL-FO
7.3 Page Sequence Master Interleave (PSMI)
Sometimes it is necessary to change page geometry based on content.
To use XSL-FO, you must package all content for each page geometry into the flow of a page sequence.
A two-step process can make this very easy to implement.
The Page Sequence Master Interleave (PSMI) semantic implements this algorithm.
Consider the need to flow a landscape table in a portrait page geometry, as shown in Figure 7-6. Here's how this is addressed using the PSMI.
Figure 7-6. Page Sequence Master Interleave (PSMI)
An example of flow implementing the change in page geometry is shown in Example 7-5. Example 7-5 PSMI constructs in example
Line 01 <simple-page-master master-name="frame-portraitbody" ...> 02 <region-body region-name="frame-body" .../> 03 <region-before region-name="frame-before" .../> 04 <region-after region-name="frame-after" .../> 05 </simple-page-master> 06 <simple-page-master master-name="frame-landbody" ...> 07 <region-body region-name="frame-body" 08 reference-orientation="90deg" .../> 09 <region-before region-name="frame-before" .../> 10 <region-after region-name="frame-after" .../> 11 </simple-page-master> 12 ... 13 <page-sequence master-reference="frame-portraitbody"> 14 <flow flow-name="frame-body"> 15 <block>Portrait information</block> 16 ... 17 <block>Next is landscaped</block> 18 <psmi:page-sequence master-reference="frame-landbody" 19 xmlns:psmi="http://www.CraneSoftwrights.com/resources/psmi"> 20 <flow flow-name="frame-body"> 21 <table> 22 <table-body> 23 <table-row> 24 <table-cell border="solid"> 25 <block>This is a test</block> 26 <block>This is a test</block> 27 ... 28 <block>This is a test</block> 29 <block>This is a test</block> 30 </table-cell> 31 </table-row> 32 </table-body> 33 </table> 34 </flow> 35 </psmi:page-sequence> 36 <block>Back to portrait</block> 37 ... 38 </flow> |