XSL-FO, region-body

Region body

1. Understanding Region-body

1.

Understanding Region-body

Elliotte Rusty Harold / Arved Sandstrom


>
>The position and size of the region-viewport-area is
>specified relative to the content-rectangle of the page-reference-
>area generated by fo:simple-page-master. The content-rectangle
>of the region-viewport-area is indented from the content-rectangle
>of the page-reference-area by the values of the "margin-top",
>"margin-bottom", "margin-left" and "margin-right" properties.

    

to make sure I have this right: the region-body occupies the entire page, irrespective of the sizes of the before and after and start and end regions. You set the margins of the region body to keep the content drawn in the body from overlapping with the content drawn in the other regions. Is that an accurate description? --

I'm not sure I'd phrase it quite like that. :-) In particular, the region-body would not occupy the entire page, per se (although you could effectively make it do so). But sizing the region body to allow for other regions is true enough.

fo:simple-page-master has margin properties that indent in from page-width and page-height to set the dimensions of the content rectangle of the page reference area.

All of the 5 possible regions fall within this content rectangle.

The region-body margin traits are used to size the "viewport" reference area for the region body, which is considered to be centered, to leave room for the viewport areas for one or more of the before, after, start and end regions. The "region-reference-area" for the fo:region-body could be larger, so that if "overflow" is set to scroll we would have to implement scrolling. In any case what we see is constrained by the margins on the region body, so as to leave room for the other regions.

To sum up, there are 2 sets of margins to consider.

As an example, let us start with a US page, 8.5" by 11" (sorry). These dimensions (page width and page-height) are the dimensions of the content rectangle of the page viewport area. We set the simple-page-master margins to 0.5" all round, so the content-rectangle of the page-reference-area is 7.5" by 10". The margins 0.5" start and end, 1" before and after, on the fo:region-body, give us a centered content rectangle for the region viewport area which is now 6.5" wide and 8" tall. We have also allowed for fo:region-before and fo:region-after of 1", and fo:region-start and fo:region-end of 0.5".

As far as the content rectangle for the region body reference area is concerned, in the above example, the default if fo:flow is assigned to region body is "paginate", which means that we construct new pages when overflow occurs. In other words, as far as content in region-body is concerned, we have a 6.5" by 8" area to work with in the example. You can also modify this with space and indents, but I don't want to muddy the waters.

Hope this helps some. It's intricate stuff. :-)