Stylus Studio XML Editor

Table of contents

Appendices

7.25 Pagination and Layout Properties

Pagination and Layout Properties

The following pagination and layout properties are all XSL only.

blank-or-not-blank[top]

"blank-or-not-blank"

XSL Definition:

0prop-summary lefttoplefttoplefttoplefttoplefttoplefttop
11lefttopValue: 11lefttopblank | not-blank | any | inherit
11lefttopInitial: 11lefttopany
11lefttopApplies to: 11lefttopfo:conditional-page-master-reference
11lefttopInherited: 11lefttopno
11lefttopPercentages: 11lefttopN/A
11lefttopMedia: 11lefttopvisual

This property forms part of a selection rule to determine if the referenced page-master is eligible for selection at this point in the page-sequence.

The values have the following meanings:

blank

This master is eligible for selection if a page must be generated (e.g., to maintain proper page parity at the start or end of the page-sequence) and there are no areas from the fo:flow to be put on that page.

not-blank

This master is eligible for selection if this page contains areas from the fo:flow.

any

This master is always eligible for selection.

column-count[top]

"column-count"

XSL Definition:

0prop-summary lefttoplefttoplefttoplefttoplefttoplefttop
11lefttopValue: 11lefttop<number> | inherit
11lefttopInitial: 11lefttop1
11lefttopApplies to: 11lefttopfo:region-body
11lefttopInherited: 11lefttopno
11lefttopPercentages: 11lefttopN/A
11lefttopMedia: 11lefttopvisual

Values have the following meanings:

<integer>

A positive integer. If a negative or non-integer value is provided, the value will be rounded to the nearest integer value greater than or equal to 1.

Specifies the number of columns in the region.

A value of 1 indicates that this is not a multi-column region.

column-gap[top]

"column-gap"

XSL Definition:

0prop-summary lefttoplefttoplefttoplefttoplefttoplefttop
11lefttopValue: 11lefttop<length> | <percentage> | inherit
11lefttopInitial: 11lefttop12.0pt
11lefttopApplies to: 11lefttopfo:region-body
11lefttopInherited: 11lefttopno
11lefttopPercentages: 11lefttoprefer to width of the region being divided into columns.
11lefttopMedia: 11lefttopvisual

Values have the following meanings:

<length>

This is an unsigned length. If a negative value has been specified a value of 0pt will be used.

<percentage>

The value is a percentage of the inline-progression-dimension of the content-rectangle of the region.

Specifies the width of the separation between adjacent columns in a multi-column region. See the description in [fo_region-body] for further details.

extent[top]

"extent"

XSL Definition:

0prop-summary lefttoplefttoplefttoplefttoplefttoplefttop
11lefttopValue: 11lefttop<length> | <percentage> | inherit
11lefttopInitial: 11lefttop0.0pt
11lefttopApplies to: 11lefttopfo:region-before, fo:region-after, fo:region-start, fo:region-end
11lefttopInherited: 11lefttopno
11lefttopPercentages: 11lefttoprefer to the corresponding height or width of the page-viewport-area.
11lefttopMedia: 11lefttopvisual

Values have the following meanings:

<length>

This is an unsigned length. If a negative value has been specified a value of 0pt will be used.

<percentage>

The value is a percentage of corresponding height or width of the page.

Specifies the width of the region-start or region-end or the height of the region-before or region-after.

flow-name[top]

"flow-name"

XSL Definition:

0prop-summary lefttoplefttoplefttoplefttoplefttoplefttop
11lefttopValue: 11lefttop<name>
11lefttopInitial: 11lefttopan empty name
11lefttopApplies to: 11lefttopfo:flow, fo:static-content
11lefttopInherited: 11lefttopno, a value is required
11lefttopPercentages: 11lefttopN/A
11lefttopMedia: 11lefttopvisual

Values have the following meanings:

<name>

Names used as identifiers must be unique within an fo:page-sequence.

If the name is empty or if a name-conflict is encountered, an error shall be reported. A processor may then continue processing.

Defines the name of the flow.

The flow-name and region-name are used to assign the flow's content (or static-content's content) to a specific region or series of regions in the layout. In XSL this is done by specifying the name of the target region as the flow-name. (For example, text placed in the region-body would specify flow-name="xsl-region-body".)

NOTE: 

The flow-names reserved in XSL are: xsl-region-body, xsl-region-before, xsl-region-after, xsl-region-start, xsl-region-end, xsl-before-float-separator, xsl-footnote-separator.

force-page-count[top]

"force-page-count"

XSL Definition:

0prop-summary lefttoplefttoplefttoplefttoplefttoplefttop
11lefttopValue: 11lefttopauto | even | odd | end-on-even | end-on-odd | no-force | inherit
11lefttopInitial: 11lefttopauto
11lefttopApplies to: 11lefttopfo:page-sequence
11lefttopInherited: 11lefttopno
11lefttopPercentages: 11lefttopN/A
11lefttopMedia: 11lefttopvisual

Force-page-count is used to impose a constraint on the number of pages in a page-sequence. In the event that this constraint is not satisfied, an additional page will be added to the end of the sequence. This page becomes the "last" page of that sequence.

The values have the following meanings:

auto

Force the last page in this page-sequence to be an odd-page if the initial-page-number of the next page-sequence is even. Force it to be an even-page if the initial-page-number of the next page-sequence is odd. If there is no next page-sequence or if the value of its initial-page-number is "auto" do not force any page.

even

Force an even number of pages in this page-sequence.

odd

Force an odd number of pages in this page-sequence.

end-on-even

Force the last page in this page-sequence to be an even-page.

end-on-odd

Force the last page in this page-sequence to be an odd-page.

no-force

Do not force either an even or an odd number of pages in this page-sequence

NOTE: 

Whether a page is an odd-page or even-page is determined from the page-number trait.

initial-page-number[top]

"initial-page-number"

XSL Definition:

0prop-summary lefttoplefttoplefttoplefttoplefttoplefttop
11lefttopValue: 11lefttopauto | auto-odd | auto-even | <number> | inherit
11lefttopInitial: 11lefttopauto
11lefttopApplies to: 11lefttopfo:page-sequence
11lefttopInherited: 11lefttopno
11lefttopPercentages: 11lefttopN/A
11lefttopMedia: 11lefttopvisual

Values have the following meanings:

auto

The initial number shall be set to 1 if no previous fo:page-sequence exists in the document.

If a preceding page-sequence exists, the initial number will be one greater than the last number for that sequence.

auto-odd

A value is determined in the same manner as for "auto". If that value is an even number 1 is added.

auto-even

A value is determined in the same manner as for "auto". If that value is an odd number 1 is added.

<integer>

A positive integer. If a negative or non-integer value is provided, the value will be rounded to the nearest integer value greater than or equal to 1.

Sets the initial-page-number to be used on this page-sequence.

master-name[top]

"master-name"

XSL Definition:

0prop-summary lefttoplefttoplefttoplefttoplefttoplefttop
11lefttopValue: 11lefttop<name>
11lefttopInitial: 11lefttopan empty name
11lefttopApplies to: 11lefttopfo:simple-page-master, fo:page-sequence-master
11lefttopInherited: 11lefttopno, a value is required
11lefttopPercentages: 11lefttopN/A
11lefttopMedia: 11lefttopvisual

Values have the following meanings:

<name>

Names identify masters, may not be empty and must be unique.

If this property is specified on an fo:simple-page-master, it provides an identifying name of the master. This name is subsequently referenced as the value of properties on the following formatting objects: fo:single-page-master-reference, fo:repeatable-page-master-reference, and fo:conditional-page-master-reference to request the use of this master when creating a page instance. It may also be used on an fo:page-sequence to specify the use of this master when creating page instances.

If this property is specified on an fo:page-sequence-master, it provides an identifying name of the master. This name is subsequently referenced as the value of properties on the fo:page-sequence to request the use of this page-sequence-master when creating page instances.

A master-name must be unique across all page-masters and page-sequence-masters.

If the name is empty or if a name-conflict is encountered, an error shall be reported. A processor may then continue processing.

master-reference[top]

"master-reference"

XSL Definition:

0prop-summary lefttoplefttoplefttoplefttoplefttoplefttop
11lefttopValue: 11lefttop<name>
11lefttopInitial: 11lefttopan empty name
11lefttopApplies to: 11lefttopfo:page-sequence, fo:single-page-master-reference, fo:repeatable-page-master-reference, fo:conditional-page-master-reference
11lefttopInherited: 11lefttopno, a value is required
11lefttopPercentages: 11lefttopN/A
11lefttopMedia: 11lefttopvisual

Values have the following meanings:

<name>

The names need not be unique, but may not be empty and must refer to a master-name that exists within the document.

Selecting a master:

  • If this property is specified on the fo:page-sequence it specifies the name of the page-sequence-master or page-master to be used to create pages in the sequence.

  • If this property is specified on the fo:single-page-master-reference, it specifies the name of the page-master to be used to create a single page instance.

  • If this property is specified on the fo:repeatable-page-master-reference, it specifies the name of the page-master to be used in repetition until the content is exhausted or the maximum-repeats limit is reached, whichever occurs first.

  • If this property is specified on the fo:conditional-page-master-reference, it specifies the name of the page-master to be used whenever this alternative is chosen.

If the name is empty or if a name-conflict is encountered, an error shall be reported. A processor may then continue processing.

maximum-repeats[top]

"maximum-repeats"

XSL Definition:

0prop-summary lefttoplefttoplefttoplefttoplefttoplefttop
11lefttopValue: 11lefttop<number> | no-limit | inherit
11lefttopInitial: 11lefttopno-limit
11lefttopApplies to: 11lefttopfo:repeatable-page-master-reference, fo:repeatable-page-master-alternatives
11lefttopInherited: 11lefttopno
11lefttopPercentages: 11lefttopN/A
11lefttopMedia: 11lefttopvisual

Specifies the constraint on the maximum number of pages in the sub-sequence of pages that may be generated by an fo:page-sequence that uses the fo:repeatable-page-master-reference or fo:repeatable-page-master-alternatives on which this property is specified.

The values have the following meanings:

no-limit

No constraint is specified.

<integer>

The maximum number of pages in the sub-sequence.

The value is an integer greater than or equal to 0.

If a fractional value or a value less than 0 is specified, it will be rounded to the nearest integer greater than or equal to 0.

A value of 0 indicates this master-reference will not be used.

media-usage[top]

"media-usage"

XSL Definition:

0prop-summary lefttoplefttoplefttoplefttoplefttoplefttop
11lefttopValue: 11lefttopauto | paginate | bounded-in-one-dimension | unbounded
11lefttopInitial: 11lefttopauto
11lefttopApplies to: 11lefttopfo:root
11lefttopInherited: 11lefttopno
11lefttopPercentages: 11lefttopNA
11lefttopMedia: 11lefttopvisual

The "media-usage" property is used to control how the selected display medium is used to present the page(s) specified by the stylesheet.

Values for the property have the following meaning:

auto

The User Agent determines which value of "media-usage" (other than the "auto" value) is used. The User Agent may consider the type of media on which the presentation is to be placed in making this determination.

NOTE: 

For example, the User Agent could use the following decision process. If the media is not continuous and is of fixed bounded size, then the "paginate" (described below) is used. Otherwise, the "bounded-in-one-dimension" is used.

paginate

A sequence of pages is generated from the fo:page-sequences that are children of the fo:root as described in [fo_page-sequence] .

bounded-in-one-dimension

Only one page is generated per fo:page-sequence descendant from the fo:root. Exactly one of "page-height" or "page-width" must be specified on the first page master that is used. The size of the page in the other dimension is determined by the content flowed into the page.

It is an error if more or less than one of "page-height" or "page-width" is specified on the first page master that is used. The User Agent may recover as follows: The recovery depends on the "reference-orientation" of the page master and "writing-mode" of the region of that page master to which the fo:flow is assigned. There are four cases: (1) the "reference-orientation" is "0" or "180" and the "writing-mode" is horizontal; (2) the "reference-orientation" is "0" or "180" and the "writing-mode" is vertical; (3) the "reference-orientation" is "90" or "270" and the "writing-mode" is horizontal; (4) the "reference-orientation" is "90" or "270" and the "writing-mode" is vertical. For cases (1) and (4), the "page-width" is bounded and the "page-height" is not bounded. For case (2) and (3), the "page-height" is bounded and the "page-width" is not bounded.

unbounded

Only one page is generated per fo:page-sequence descendant from the fo:root. Neither "page-height" nor "page-width" may be specified on any page master that is used. If a value is specified for either property, it is an error and a User Agent may recover by ignoring the specified value. Each page begins at the before-edge and start-edge of the page and the page extends as far as necessary toward the after-edge and end-edge to contain all the content of the page-sequence which generates the page.

NOTE: 

This implies that no text content is automatically wrapped; that is, each block will have a single line for each text node that does not contain a U+000A character. If more than one line is generated, then the sequence of characters that generated the glyphs in each such line must have been bounded in the original text node, either by the beginning or end of that text node or by an U+000A character within that text node. Control over the treatment of the U+000A character is described in [linefeed-treatment] .

odd-or-even[top]

"odd-or-even"

XSL Definition:

0prop-summary lefttoplefttoplefttoplefttoplefttoplefttop
11lefttopValue: 11lefttopodd | even | any | inherit
11lefttopInitial: 11lefttopany
11lefttopApplies to: 11lefttopfo:conditional-page-master-reference
11lefttopInherited: 11lefttopno
11lefttopPercentages: 11lefttopN/A
11lefttopMedia: 11lefttopvisual

This property forms part of a selection rule to determine if the referenced page-master is eligible for selection at this point in the page-sequence.

The values have the following meanings:

odd

This master is eligible for selection if the page number is odd.

even

This master is eligible for selection if the page number is even.

any

This master is eligible for selection regardless of whether the page number is odd or even.

NOTE: 

"Page number" refers to the page-number trait for the page to be generated.

page-height[top]

"page-height"

XSL Definition:

0prop-summary lefttoplefttoplefttoplefttoplefttoplefttop
11lefttopValue: 11lefttopauto | indefinite | <length> | inherit
11lefttopInitial: 11lefttopauto
11lefttopApplies to: 11lefttopfo:simple-page-master
11lefttopInherited: 11lefttopno
11lefttopPercentages: 11lefttopN/A
11lefttopMedia: 11lefttopvisual

Values have the following meanings:

auto

The "page-height" shall be determined, in the case of continuous media, from the size of the User Agent window, otherwise from the size of the media. If media information is not available this dimension shall be implementation-defined.

NOTE: 

A fallback to 11.0in would fit on both Letter size (8.5in by 11.0in) and A4 size pages.

indefinite

The height of the page is determined from the size of the laid-out content.

"Page-width" and "page-height" may not both be set to "indefinite". Should that occur, the dimension that is parallel to the block-progression-direction, as determined by the "reference-orientation" and "writing-mode" on the fo:simple-page-master, of the page-reference-area will remain "indefinite" and the other will revert to "auto".

<length>

Specifies a fixed height for the page.

Specifies the height of a page.

NOTE: 

The values for the "page-width" and "page-height" properties are intended to permit the size specification to match the handling of a frameset in a browser window when the media is continuous and to match pages when the media is paged.

A User Agent may provide a way to declare the media for which formatting is to be done. This may be different from the media on which the formatted result is viewed. For example, a browser User Agent may be used to preview pages that are formatted for sheet media. In that case, the size calculation is based on the media for which formatting is done rather than the media being currently used.

page-position[top]

"page-position"

XSL Definition:

0prop-summary lefttoplefttoplefttoplefttoplefttoplefttop
11lefttopValue: 11lefttopfirst | last | rest | any | inherit
11lefttopInitial: 11lefttopany
11lefttopApplies to: 11lefttopfo:conditional-page-master-reference
11lefttopInherited: 11lefttopno
11lefttopPercentages: 11lefttopN/A
11lefttopMedia: 11lefttopvisual

This property forms part of a selection rule to determine if the referenced page-master is eligible for selection at this point in the page-sequence.

The values have the following meanings:

first

This master is eligible for selection if this is the first page in the page-sequence.

last

This master is eligible for selection if this is the last page in the page-sequence.

rest

This master is eligible for selection if this is not the first page nor the last page in the page-sequence.

any

This master is eligible for selection regardless of page positioning within the page-sequence.

page-width[top]

"page-width"

XSL Definition:

0prop-summary lefttoplefttoplefttoplefttoplefttoplefttop
11lefttopValue: 11lefttopauto | indefinite | <length> | inherit
11lefttopInitial: 11lefttopauto
11lefttopApplies to: 11lefttopfo:simple-page-master
11lefttopInherited: 11lefttopno
11lefttopPercentages: 11lefttopN/A
11lefttopMedia: 11lefttopvisual

Values have the following meanings:

auto

The "page-width" shall be determined, in the case of continuous media, from the size of the User Agent window, otherwise from the size of the media. If media information is not available this dimension shall be implementation-defined.

NOTE: 

A fallback to 8.26in would fit on both 8+1/2x11 and A4 pages.

indefinite

The width of the page is determined from the size of the laid-out content.

"Page-width" and "page-height" properties may not both be set to "indefinite". Should that occur, the dimension that is parallel to the block-progression-direction, as determined by the "reference-orientation" and "writing-mode" on the fo:simple-page-master, of the page-reference-area will remain "indefinite" and the other will revert to "auto".

<length>

Specifies a fixed width for the page.

Specifies the width of a page.

precedence[top]

"precedence"

XSL Definition:

0prop-summary lefttoplefttoplefttoplefttoplefttoplefttop
11lefttopValue: 11lefttoptrue | false | inherit
11lefttopInitial: 11lefttopfalse
11lefttopApplies to: 11lefttopfo:region-before, fo:region-after
11lefttopInherited: 11lefttopno
11lefttopPercentages: 11lefttopN/A
11lefttopMedia: 11lefttopvisual

Values have the following meanings:

false

A value of false specifies that this region does not extend up to the start-edge and end-edge of the content-rectangle of the page-reference-area, but has its inline-progression-dimension reduced by the incursions of the adjacent regions.

true

A value of true specifies that the inline-progression-dimension of this region extends up to the start-edge and end-edge of the content-rectangle of the page-reference-area.

Specifies which region (i.e., region-before, region-after, region-start, or region-end) takes precedence in terms of which may extend into the corners of the simple-page-master.

region-name[top]

"region-name"

XSL Definition:

0prop-summary lefttoplefttoplefttoplefttoplefttoplefttop
11lefttopValue: 11lefttopxsl-region-body | xsl-region-start | xsl-region-end | xsl-region-before | xsl-region-after | xsl-before-float-separator | xsl-footnote-separator | <name>
11lefttopInitial: 11lefttopsee prose
11lefttopApplies to: 11lefttopfo:region-body, fo:region-start, fo:region-end, fo:region-before, and fo:region-after
11lefttopInherited: 11lefttopno, a value is required
11lefttopPercentages: 11lefttopN/A
11lefttopMedia: 11lefttopvisual

Values have the following meanings:

xsl-region-body

Reserved region-name for use as default name of fo:region-body. This name may not be used on any other class of region.

xsl-region-start

Reserved region-name for use as default name of fo:region-start. This name may not be used on any other class of region.

xsl-region-end

Reserved region-name for use as default name of fo:region-end. This name may not be used on any other class of region.

xsl-region-before

Reserved region-name for use as default name of fo:region-before. This name may not be used on any other class of region.

xsl-region-after

Reserved region-name for use as default name of fo:region-after. This name may not be used on any other class of region.

xsl-before-float-separator

Reserved name for content to be used as a separator at the end-edge of a before-float-reference-area. This name may not be used on any other class of region.

xsl-footnote-separator

Reserved name for content to be used as a separator at the start-edge of a footnote-reference-area. This name may not be used on any other class of region.

<name>

Names used as identifiers must be unique within a page-master.

This property is used to identify a region within a simple-page-master.

The "region-name" may be used to differentiate a region that lies on a page-master for an odd page from a region that lies on a page-master for an even page. In this usage, once a name is used for a specific class of region (start, end, before, after, or body), that name may only be used for regions of the same class in any other page-master. The reserved names may only be used in the manner described above.