W3C

Design Notes for Extensible Stylesheet Language (XSL) 2.0

W3C Working Draft 04 February 2010

This version:
http://www.w3.org/TR/2010/WD-xslfo20-20100204/
Latest version:
http://www.w3.org/TR/xslfo20/
Previous version:
http://www.w3.org/TR/2009/WD-xslfo20-20090929/
Editor:
Liam R E Quin, W3C <liam at w3.org>
Authors:
Jeff Caruso, Pageflex
Fabio Giannetti, HP
Tony Graham, Menteith Consulting
Angelo Di Iorio, University of Bologna
Xin (Edward) Jiang, (Oracle, and then Microsoft)
Liam Quin, W3C

Abstract

The Extensible Stylesheet Language (XSL) has two parts:

  1. a language for transforming XML documents (XSLT), and

  2. an XML vocabulary for specifying formatting semantics (XSL-FO).

This document describes features and changes introduced for version 2.0 of the XSL-FO part of XSL.

Status of this Document

This section describes the status of this document at the time of its publication. Other documents may supersede this document. A list of current W3C publications and the latest revision of this technical report can be found in the W3C technical reports index at http://www.w3.org/TR/.

This document is a Working-Group Draft containing proposals for an eventual XSL-FO 2.0 Recommendation. Public feedback is solicited. The Working Group (actually the Formatting Objects Subgroup) is short of resources, and would be interested in organizations or individuals in a position to help us work on the Specification.

Comments on this document should be made using bugzilla, at bugzilla; comments can also be sent by email to xsl-editors@w3.org (see the public archive), and members of the XSL-FO Task Force will enter them into bugzilla; see www.w3.org/XML/2008/xsl-fo-bugzilla.html for instructions on using bugzilla to report issues.

Publication as a Working Draft does not imply endorsement by the W3C Membership. This is a draft document and may be updated, replaced or obsoleted by other documents at any time. It is inappropriate to cite this document as other than work in progress.

This document has been produced as part of the W3C XML Activity by the XSL Working Group.

General public discussion of XSL takes place on the XSL-List and on the www-xsl-fo@w3.org mailing lists; the www-xsl-fo list is probaby most appropriate for general questions about the 2.0 work.

This document was produced by a group operating under the 5 February 2004 W3C Patent Policy. W3C maintains a public list of any patent disclosures made in connection with the deliverables of the group; that page also includes instructions for disclosing a patent. An individual who has actual knowledge of a patent which the individual believes contains Essential Claim(s) must disclose the information in accordance with section 6 of the W3C Patent Policy.

Table of Contents

1 Introduction and Overview
2 Pagination and Layout
    2.1 Non-rectangular areas
        2.1.1 fo:page-master
        2.1.2 fo:shape
        2.1.3 fo:region
        2.1.4 fo:shape-name-specifier
        2.1.5 fo:shape-path-specifier
        2.1.6 fo:shape-background-specifier
        2.1.7 fo:shape-border-specifier
        2.1.8 Common Wrap Properties
            2.1.8.1 wrap
            2.1.8.2 wrap-path
            2.1.8.3 wrap-side
    2.2 Copyfitting
        2.2.1 Summary
        2.2.2 Copyfit: basic approach and definitions
        2.2.3 Objects and properties for copyfit
            2.2.3.1 copyfit-by-modifying
                2.2.3.1.1 Value list simplification
                2.2.3.1.2 Priority
            2.2.3.2 force-page-count (adding new values)
    2.3 Initial Caps
        2.3.1 Initial Caps
            2.3.1.1 initial-cap-lines
            2.3.1.2 initial-cap-lines-before
            2.3.1.3 initial-cap-kern-lines
            2.3.1.4 initial-cap-indent
    2.4 Marginalia
        2.4.1 Extension Regions
            2.4.1.1 The extension-region-start Region
            2.4.1.2 The extension-region-end Region
            2.4.1.3 distance
        2.4.2 Formatting Objects for Marginalia
            2.4.2.1 fo:marginalia
            2.4.2.2 fo:marginalia-body
            2.4.2.3 marginalia-destination-area
            2.4.2.4 marginalia-relative-align
    2.5 Vertical Positioning
        2.5.1 Feathering
            2.5.1.1 justify-by-modifying
        2.5.2 Correlating vertical position
            2.5.2.1 block-progression-unit
        2.5.3 Vertical alignment within a page or column
        2.5.4 Vertical alignment specific for the last column
            2.5.4.1 display-align-last-column
        2.5.5 Vertical justification across pages and columns
3 Tables and Lists
    3.1 Decimal Alignment
        3.1.1 Considerations
    3.2 Table header/footer on boundaries
        3.2.1 fo:conditional-table-layout-reference
        3.2.2 Split tables
            3.2.2.1 table-overflow
        3.2.3 Repeat contents of split spanned cell
        3.2.4 Cell borders extending beyond the table
            3.2.4.1 3.5.1 Considerations
        3.2.5 Adjacent borders
        3.2.6 Borders on break
        3.2.7 Spanning cell over all row and columns
    3.3 Layout master set
        3.3.1 Interleaving layout-master set
            3.3.1.1 Formatting Objects Summary
            3.3.1.2 "Declarations and Pagination and Layout Formatting Objects" introduction
            3.3.1.3 fo:root
            3.3.1.4 fo:page-sequence
            3.3.1.5 fo:layout-master-set
            3.3.1.6 'master-name'
            3.3.1.7 'master-reference'
            3.3.1.8 'flow-name'
            3.3.1.9 'flow-name-reference'
            3.3.1.10 'region-name'
            3.3.1.11 'region-name-reference'
        3.3.2 Change master every n pages
            3.3.2.1 sequence-repeats
            3.3.2.2 page-position
            3.3.2.3 fo:repeatable-page-master-alternatives
            3.3.2.4 fo:conditional-page-master-reference
    3.4 Spreads
        3.4.1 fo:spread-page-master
            3.4.1.1 Would also affect text in:
    3.5 Bleeds and Trim
        3.5.1 bleed-box, trim-box
4 Composition
    4.1 Improved font support
    4.2 Force line justification
        4.2.1 last-line-minimum-deficit
        4.2.2 hyphenation-permitted-minimum-deficit
    4.3 Alignment around breaks
        4.3.1 text-align-before-break
        4.3.2 text-align-after-break
    4.4 hanging-punctuation
    4.5 Tabs and tab stops
        4.5.1 tab-stops
        4.5.2 tab-alignment-character
    4.6 Word and letter spacing
        4.6.1 word-spacing-critical-length
    4.7 Hyphenation and line breaking
        4.7.1 hyphenation-push-syllable-count
        4.7.2 hyphenation-remain-syllable-count
        4.7.3 syllable-widows
        4.7.4 hyphenation-exceptions
        4.7.5 word-widows
        4.7.6 min-length-of-last-line
5 Further improved non-Western language support
6 Images
    6.1 Images
        6.1.1 Rotate an image by arbitrary amounts
        6.1.2 Callouts
        6.1.3 Multi-page images
7 Color Support
8 Collaboration with SVG
    8.1 Masks
    8.2 Rotation and Transformations

Appendices

A Changes since last publication
B References
    B.1 Normative References
    B.2 Other References
C List of properties (Non-Normative)
D Acknowledgements (Non-Normative)


1 Introduction and Overview

This document describes initial design notes for version 2.0 of the Formatting Object (FO) part of the Extensible Stylesheet Language (XSL). The final document will be a complete specification, but the early Working Drafts, including this one, give only design notes and discussion of new features and changes.

There are a number of open issues in this document; please let us (the XSL-FO subgroup of the XSL Working Group) know if you have comments on them, using bugzilla: see the Status section at the start of this document for instructions.

2 Pagination and Layout

2.1 Non-rectangular areas

Requirement:

See the XSL-FO 2.0 Requirements Document, section 2.1.1

Add support for non-rectangular areas wherever appropriate. This is for areas where the content needs to be flowed inside an non-rectangular shape.

Requirement:

See the XSL-FO 2.0 Requirements Document, section 2.1.2

Run text on a path including flowing from one path to another. This goes further than simply including SVG, as we're also supporting the line breaking rules that XSL-FO provides. Text should be able to flow from one line to the next line of the multiline paths but it needs to be explicitly specified what each line of the path is, as we do not intend to stack paths automatically. The intent is to apply the normal line building properties to text on a path.

(This draft does not yet address this requirement)

Requirement:

See the XSL-FO 2.0 Requirements Document, section 2.1.2

Add support for runarounds or intrusions (text flowing around illustrations, regions and other objects). This is related to effects obtained by overlapping areas of either rectangular or non-rectangular shape in any suitable combination, but it doesn't really require non-rectangular areas.

Allow one object to intrude into another.

Support intrusions into all 4 sides

Support specifying pull-quotes without the need to repeat the content of the pull-quote. This is related to 2.2.9.4 Generalized markers [and will be addressed in that section]

Support cut-outs

The objects (both the intruder as well as the object intruded upon) may be of arbitrary shape

Allow users to specify the relations between the objects that are impacted by the intrusion

For non-rectangular areas, XSL-FO 2.0 uses shapes expressed in SVG [SVG]. Regions and block containers can have associated shapes.

Intrusions and cut-outs are seen as two ways of looking at one shape affecting another, and are both modeled as intrusions.

Relative priority between shapes is handled using the z-index property.

2.1.1 fo:page-master

Common Usage:

The fo:page-master is used in the generation of pages and specifies the geometry of the page. The page may be subdivided into an arbitrary number of regions, each called an fo:region.

Areas:

The fo:page-master formatting object generates no area directly. It is used in the generation of pages by an fo:page-sequence.

When the fo:page-master is used to generate a page, a viewport/reference pair is generated, consisting of a page-viewport-area and a page-reference-area. The page-viewport-area represents the physical bounds of the output medium. The page-reference-area represents the portion of the page on which content is intended to appear; that is, the area inside the page margins.

In addition, when the fo:page-master is used to generate a page, viewport/reference pairs that correspond to the regions that are the children of the fo:page-master are also generated.

A large shape called Region A is filled with text, and has z-index of zero. A smaller shape, called region B, wholly contained within region A, also contains text (coloured red).  Region B has a z-index of 1, so that the text in region A is pushed away from it.  If both regions had the same z-index, the text would ovelap.

Figure 1. The z-index property. A large shape called Region A is filled with text, and has z-index of zero. A smaller shape, called region B, wholly contained within region A, also contains text (coloured red). Region B has a z-index of 1, so that the text in region A is pushed away from it. If both regions had the same z-index, the text would ovelap.

Trait Derivation:

Same as fo:simple-page-master

Constraints:

Same as fo:simple-page-master

Contents:

The following properties apply to this formatting object:

[7.10 Common Margin Properties-Block]

[7.xx.1 "bleed-box"]

[7.25.8 "master-name"]

[7.25.13 "page-height"]

[7.25.15 "page-width"]

[7.20.3 "reference-orientation"]

[7.xx.2 "trim-box"]

[7.27.7 "writing-mode"]

2.1.2 fo:shape

Common Usage:

Used in constructing a shape outline. This object defines a shape using a child from a SVG Documents to describe the region's shape. The permitted structure of this child is that defined for that namespace.

The definition of the shape using the fo:shape permits the shape re-use among different regions similarly to the concept of page-masters.

The fo:shape may define background, border and padding properties. These are applied to the SVG shape's path. In the case the SVG shape already defines a border (using the stroke attribute) and/or a background (using a fill attribute) the fo properties are overimposed to the SVG document.

Contents:

The fo:shape object has a child from an SVG Document to describe a region's shape. The permitted structure of this child is that defined by SVG [SVG].

Example 1: Path based shape

<fo:shape shape-name="trapezoid">
  <svg:svg xmlns:svg="http://www.w3.org/2000/svg">
    <svg:path d="M ... z " />
  </svg:svg>
</fo:shape>

<fo:shape shape-name="free-hand">
  <svg:svg xmlns:svg="http://www.w3.org/2000/svg">
    <svg:path d="M ... z" />
  </svg:svg>
</fo:shape>

Example 2: Showing border, padding and background.

<fo:shape shape-name="circle" 
        border-width="2pt" border-color="black"
        padding-width="10pt"> 
  <svg:svg xmlns:svg="http://www.w3.org/2000/svg">
    <circle cx="250" cy="250" r="200"/>
  </svg:svg>>
</fo:shape>
The bounding box of a shaped region (here specified as a circle) is the smallest rectangle that completely contains the shape, and is here called the region bounding-box.  The border and padding follow the outline of the shape itself.

Figure 2. The bounding box of a shaped region (here specified as a circle) is the smallest rectangle that completely contains the shape, and is here called the region bounding-box. The border and padding follow the outline of the shape itself.

The following properties apply to this formatting object:

[7.10 Common Margin Properties-Block]

[7.xx.1 "bleed-box"]

[7.25.8 "master-name"]

[7.25.13 "page-height"]

[7.25.15 "page-width"]

[7.20.3 "reference-orientation"]

[7.xx.2 "trim-box"]

[7.27.7 "writing-mode"]

2.1.3 fo:region

Common Usage:

Used in constructing a page-master, the behavior of each fo:region is similar to the behavior of fo:region-body of XSL-FO 1.1. A region specifies a viewport/reference pair that is located in an absoulte position within the fo:page-master. The "overflow"trait controls how much of the underlying region-reference-area is visible; that is, whether the region-reference-area is clipped by its parent region-viewport-area.

The fo:region may be also be used to provide multiple columns. When the column-count trait is greater than one, then the region will be subdivided into multiple columns.

Areas:

Same as fo:region-body

Trait Derivation:

Same as fo:region-body

Constraints:

Same as fo:region-body

Contents:

Example

The following properties apply to this formatting object:

[7.5 Common Absolute Position Properties]

[7.7 Common Border, Padding, and Background Properties]

[7.10 Common Margin Properties-Block]

[7.1x Common Wrap Properties]

[7.20.1 "clip"]

[7.25.2 "column-count"]

[7.25.3 "column-gap"]

[7.13.4 "display-align"]

[ 7.15.6 "height"]

[7.20.2 "overflow"]

[7.25.17 "region-name"]

[7.20.3 "reference-orientation"]

[7.15.14 "width"]

[7.27.7 "writing-mode"]

[7.28.9 "z-index"]

The shape assignment model allows a region to point to one or more regions that are used to define:

content path: where the region's content is bound to wrap

wrapping path: where the region's intruded content is bound to wrap around

border: one or more shapes used to define a border that is beyond standard FO border capabilities or it is designed ad-hoc

background: one or more shapes used to define a background effect that is beyond standard FO background capabilities

Shape assignment model illustration

Figure 3. Shape assignment model illustration.

@@accessible description needed here

Example 3. Full Shape and Region use and re-use.

<fo:layout-master-set>
  <fo:shape shape-name="hexagon"> 
    <svg:svg xmlns:svg="http://www.w3.org/2000/svg">
      <svg:path d="M ... z " />
    </svg:svg>
  </fo:shape>

  <fo:shape shape-name="intruder-bag"> 
    <svg:svg xmlns:svg="http://www.w3.org/2000/svg">
      <svg:path d="M ... z " />
    </svg:svg>
  </fo:shape>

  <fo:shape shape-name="border-bag"> 
    <svg:svg xmlns:svg="http://www.w3.org/2000/svg">
      <svg:path d="M ... z " />
    </svg:svg>>
  </fo:shape>

  <fo:shape shape-name="bag"> 
    <svg:svg xmlns:svg="http://www.w3.org/2000/svg">
      <svg:path d="M ... z " />
    </svg:svg>
  </fo:shape>

  <fo:page-master 
    master-name="only"
    page-height="11in" page-width="8.5in"
    margin-top="3pt" margin-bottom="3pt" 
    margin-left="3pt" margin-right="3pt">

    <fo:region 
      absolute-position="absolute" 
      top="0.8636in" left="1.125in"
      width="10in" height="12in"
      region-name="region_A" 
      z-index="0">

      <fo:shape-name-specifier
        shape-name-reference="bag"
        width="100%" height="100%"
        display-align="center" />

      <fo:shape-path-specifier
        shape-name-reference="intruder-bag"
        width="100%" height="100%"
        display-align="center" />

      <fo:shape-border-specifier
        shape-name-reference="border-bag"
        width="100%" height="100%"
        display-align="center" />

      <fo:fo:shape-background-specifier
        shape-name-reference="hexagon"
        width="80%" height="80%"
        relative-position="relative"
        top="6in" left="6in" />

      <fo:fo:shape-background-specifier
        shape-name-reference="hexagon"
        width="60%" height="60%"
        relative-position="relative"
        top="4in" left="4in" />

      <fo:fo:shape-background-specifier
        shape-name-reference="hexagon"
        width="40%" height="40%"
        relative-position="relative"
        top="2in" left="2in" />

      <fo:fo:shape-background-specifier
        shape-name-reference="hexagon"
        width="20%" height="20%"
        relative-position="relative"
        top="1in" left="1in" />

    </fo:region>
  </fo:page-master>

</fo:layout-master-set>

2.1.8 Common Wrap Properties

The common wrap properties are used to express the runaround interaction between regions. Regions interact based on their z-index values. Regions with higher z-index are considered overlapping regions with lower z-index.

2.1.8.3 wrap-side

XSL Definition:

Value:all | start | end | inner | outer | largest | smallest
Initial:shape
Percentages:N/A
Applies to:fo:region @@?
Inherited:no
Media:visual

The "wrap-side" property indicates what strategy should be applied for the runaround.

Values have the following meanings:

all

This is the default behavior. Runaround is performed, if possible, on both sides of the intruding area.

start

The run-around is performed only in the start side of the intruding area.

end

The runaround is performed only in the end side of the intruding area.

inner

The runaround is performed only in the inner side of the intruded area. The inner side is the side nearer to the spread "spine". The spread spine is considered the contact line between the two pages forming the spread. If the region is not part of a spread the inner property is evaluated as start.

outer

The runaround is performed only in the outer side of the intruded area. The outer side is the side farther from the spread "spine". The spread spine is considered the contact line between the two pages forming the spread. If the region is not part of a spread the outer property is evaluated as end.

largest

The runaround is performed only in the largest area available as result of the intrusion.

smallest

The runaround is performed only in the smallest area available as result of the intrusion.

2.2 Copyfitting

Requirement:

See the XSL-FO 2.0 Requirements Document, section 2.1.4

Add support for copyfitting, for example to shrink or grow content (change properties of text, line-spacing, ...) to make it constrain to a certain area. This is going to be managed by a defined set of properties, and in the stylesheet it will be possible to define the preference and priority for which properties should be changed. That list of properties that can be used for copyfitting is going to be defined.

Additionally, multiple instances of alternative content can be provided to determine best fit.

This includes copyfitting across a given number of pages, regions, columns etc, for example to constrain the number of pages to 5 pages.

Add the ability to keep consistency in the document, e.g. when a specific area is copyfitted with 10 pt fonts, all other similar text should be the same.

2.2.2 Copyfit: basic approach and definitions

Many options exist to copyfit content to a certain area. For example, a user could add some space between paragraphs, widen or narrow spaces before and after titles, images and tables, modify the line height of some paragraphs, etc. All these fine tunings, and their multiplicity of combinations, lead to different results, and different users could have different preferences.

In order to give users such control, XSL-FO allows users to express copyfitting strategies through "copyfit properties lists". A copyfit properties list is an ordered sequence of properties names (or group of names) that a formatter is allowed to modify in order to do copyfitting. The order of the names in the list follows the priority rules described below.

Copyfit properties list can be associated to fo:objects by using the property "copyfit-by-modifying"[@@]. The "copyfit-by-modifying" property applies to fo:flow-assignment, fo:region and fo:region-body in this specification. This makes possible to use implicit flow maps and to copyfit a single flow to a single region, multiple flows to a single region or even multiple flows to multiple regions.

If that property is defined on both a fo:flow-assignment and a fo:region-* involved by that assignment, the value is taken from the fo:flow-assignment definition.

Future versions of this specification may add copyfit capabilities to other fo:objects.

It is important to note that “copyfit-by-modifying” only states the copyfitting strategy, and does not define the actual property ranges the application is allowed to modify. These are instead expressed (as in an XSL-FO 1.1 document) throughout the flow and its descendant formatting objects: this provides a great expressing power in a simple way, as, for example, it allows for different fo:block to have different adjusting properties.

For example: fill-by-modifying=”space-before word-spacing” means that the application is allowed to modify the actual value of the space-before and word-spacing properties. Although the “copyfit-by-modifying” property is defined in the fo:flow-assignment object, the variations are defined in the “space-before” and “word-spacing” properties of the blocks within the actual flow. In most cases values of these properties are actually inherithed. The application should try to copyfit text by choosing appropriate values for the space-before traits (using a value either greater or smaller that the .optimum one but still between the relevant .minimum and .maximum) of each block.

In fact, many FO properties (dating back to the initial XSL-FO specification) can be given a length range value, expressed using a .minimum, .optimum and .maximum components; others (allowed-height-scale, allowed-width-scale) can be given a list of numeric values; font-family can be given a list of values.

A property having a range value can create some elasticity: the dimensions of the areas generated by the affected formatting objects can stretch or shrink from an optimal value. An FO subtree is said to have inline elasticity if there are properties involved in the line building process that have some degree of elasticity; similarly, an FO subtree is said to have block elasticity if there are properties involved in the block stacking process that have some degree of elasticity. It should be noted that a length range in an inline-related property can involve both inline and block elasticity (as, for example, a variation in word-spacing may result in the creation of fewer or more lines), while a range in a block-related property only creates block elasticity.

The presence of some elasticity is the first condition to allow copyfitting. Properties with range or list values, in fact, can be adjusted in order to achieve the expected result.

On the other hand, elasticity does not automatically imply that content will be copyfitted. It may happen that properties listed in “copyfit properties list” do not have elasticity while other do. In that case the formatter cannot copyfit text and should warn the user.

If properties listed in the “copyfit properties list” do have elasiticy but the formatter is not able to copyfit text – because of syntax errors, limitated support of required copyfit strategies, etc. – the formatter should warn the user too.

An example of copyfit declaration and application is shown below:

<fo:flow flow-name="A">
  <fo:block word-spacing.minimum=”1pt” word-spacing.maximum=”4pt” 
            line-height.minimum=”8pt” line-height.maximum=”14pt”> In the second century of the 
  Christian Era . . . were guarded by ancient renown and disciplined valor. </fo:block>
  <fo:block word-spacing.minimum=”1pt” word-spacing.maximum=”4pt” 
            line-height.minimum=”8pt” line-height.maximum=”14pt”>The gentle but powerful. . . .  
  and devolved on the emperors all   the executive powers of government. </fo:block>
  <fo:block word-spacing.minimum=”1pt” word-spacing.maximum=”4pt” 
  line-height.minimum=”8pt” line-height.maximum=”14pt”>During a happy period of more than fourscore years . . . 
  to describe the prosperous condition of their empire; </fo:block>
</fo:flow>
 
<fo:flow flow-name="B">
  <fo:block word-spacing.minimum=”1pt” word-spacing.maximum=”4pt” 
            line-height.minimum=”8pt” line-height.maximum=”14pt”>Quo usque tandem abutere, . . .
   nihil hic munitissimus habendi senatus locus, nihil horum ora voltusque moverunt? </fo:block> 
 <fo:block word-spacing.minimum=”1pt” word-spacing.maximum=”4pt” 
            line-height.minimum=”8pt” line-height.maximum=”14pt”>Patere tua consilia non sentis. . . 
   Senatus haec intellegit. consul videt; hic tamen vivit. . . nostrum. </fo:block>
 <fo:block word-spacing.minimum=”1pt” word-spacing.maximum=”4pt” 
            line-height.minimum=”8pt” line-height.maximum=”14pt”>Nos autem fortes viri . . . 
   in nos [omnes iam diu] machinaris. </fo:block>
</fo:flow>
 
<fo:flow-map flow-map-name="E1">
  <fo:flow-assignment copyfit-by-modifying=”word-spacing”>
    <fo:flow-source-list>
      <fo:flow-name-specifier flow-name-reference="A"/>
</fo:flow-source-list>
    <fo:flow-target-list>
      <fo:region-name-specifier region-name-reference="R"/>
    </fo:flow-target-list>
  </fo:flow-assignment>
  <fo:flow-assignment copyfit-by-modifying=”line-height”>
    <fo:flow-source-list>
      <fo:flow-name-specifier flow-name-reference="B"/>
    </fo:flow-source-list>
    <fo:flow-target-list>
      <fo:region-name-specifier region-name-reference="S"/>
    </fo:flow-target-list>
</fo:flow-assignment>
</fo:flow-map>

The two fo:flow-assignment use different strategies to copyfit. Flow A is copyfitted by only adjusting the word-space of each block (that will be a value between 1pt and 4pt), while flow B is copyfitted by adjusting line-height of each block (that will be a value between 8pt and 14pt).

2.2.3 Objects and properties for copyfit

2.2.3.1 copyfit-by-modifying

XSL Definition:

Value:<property-name-list>
Initial:everything
Applies to:fo:flow-assigment, fo:region, fo:region-body
Inherited:no
Percentages:N/A
Fallback:everything

This property is used to copyfit text into a region and to define strategies for copyfitting.

Copyfitting is defined as follows: for each reference area generated by that region, the before-edge of the its content-rectangle is placed coincident with the before-edge of the allocation-rectangle of the first child area, and the after-edge of the its content-rectangle should be placed coincident with the after-edge of the allocation-rectangle of the last child area. If the application is not able to achieve copyfitting and the accumulated block-progression-dimension of areas is less the the block-progression-dimension of the reference area (which could happen either for lack of elasticity in the content or for partial support by the formatter), the areas are placed into the reference area according to the value of display-align.

The value is a whitespace separated list of names (property names and / or shorthand names), possibly grouped in subsets by a single level of parenthesis; formally, it can be defined by these rules:

where

2.2.3.1.2 Priority

Items in the simplified value list are given a decresing priority: the first item's priority is greater than that of the second one, and so on; values between parenthesis have the same priority. The application has to respect this priority assignment while performing copyfitting:

  1. we define "active properties set" as the set of properties whose value the application is allowed to choose at a certain time during the copyfitting; initially, the active properties set contains the values of the first priority group;

  2. The application has to check whether it is possible to copyfit the content using the current active properties set (choosing an appropriate value between their .minimum and .maximum, or among the available ones)

  3. if there is a way to copyfit the content, the output should reflect that particular choice of values, without touching the other properties (i.e. using their .optimum values); otherwise, the next priority group should be added to the active properties set.

Points to note:

2.3 Initial Caps

2.3.1 Initial Caps

Requirement:

See the XSL-FO 2.0 Requirements Document, section 2.1.7

Add support for raised initial capitals and n-line dropped capitals. This includes support for the first n characters.

Large initial capital letters are often used for the first paragraph of a new section or chapter. Many scripts have precise alignment conventions for how the initial letter should be positioned relative to the text in the paragraph.

There are three main types of initial letter.

The first of these is called a [raised initial]; it is set in a larger size then the main text, and space must be left for it in the block progression direction. No special support is needed for raised initials, as an fo:inline can be used with an increased font-size.

The second sort is a margin initial; it protrudes into the margin in the inline progression direction, and is often larger than the paragraph text. This is treated as a special case of the third sort of initial capital, because of its vertical alignment requirements.

The third sort of initial letter is often called a drop capital (often abbreviated to "drop cap"). The initial letter is large enough that it extends in the block-progression direction to the Nth following baseline; the drop capital in Figure 14 is sized such that its baseline aligns with the baseline of the fourth line of text in the paragraph, and the top aligns with the cap-height on the first line; this is called a 4-line drop cap.

A paragraph of text starting with the word Decorative, in which the D is large, and extends down so that its baseline is the same as that of the fourth line of text in the paragraph, and the top of the D is aligned with the tops of the capital letters in the first line of text.

Figure 14. Sample Paragraph Starting With Four-Line Drop Capital.

Several properties are used on an "fo:inline" element as follows:

2.3.1.1 initial-cap-lines

XSL Definition:

Value:<number> | <distance>
Initial:0
Applies to:fo:inline
Inherited:yes
Percentages:refer to inherited font size
Media:visual

This property specifies the number of lines spanned by the initial letter.

A value of 1.0 would indicate a regular-sized letter, and a value of 4 would indicate that the first character (or glyph) contained in the "fo:inline" bearing this property must be sized such that its baseline is aligned with the baseline of the 4th line of the containing block, and the cap-height aligned with the cap-height of the first line.

For a vertical script, the corresponding leading and trailing alignments points must be used.

If a distance is given instead of a unitless number, it is to be used instead of computing the distance in terms of line heights; in this case the formatter is not expected to guarantee alignment of the baseline of the initial with that of the nearest text baseline.

Open issue: 7562

An alternative design for initial caps and the initial-cap-lines property would be to say that the value of "auto" for font-size would mean that the font-size was computed from the number of lines.

If the "fo:inline" should happen to format to more than one glyph, the second and subsequent glyphs should be drawn at the same size as the first, even if after line-breaking this results in the first character no longer aligning with the fourth baseline.

If the value is negative, an implementation MAY interpret it as as "dropping" backwards (e.g. upwards for horizontal top-to-bottom scripts).

A non-integral value represents a proportion, so that a value of 3.5 would indicate that the initial should be half-way between the baselines of the third and fourth lines of text.

A value of zero MUST taken to be the same as the default value of 1.0, and is in effect ignored.

If the containing block does not have enough content to span the given number of lines, the initial SHOULD be formatted as if there was enough content, and the size of the initial cap MUST then be included in the block-progression-direction dimension of the block.

If there is not enough room left in the column, page or region, the initial must be taken onto the next page along with the text.

When the "initial-cap-lines" property is set on a formatting object that is not at the start of the block, any preceding text should be pushed out into the margin; this is often used for quote marks.

2.3.1.2 initial-cap-lines-before

XSL Definition:

Value:<number> | <distance>
Initial:0pt
Applies to:fo:inline
Inherited:yes
Percentages:Not applicable.
Media:visual

Sometimes an initial capital extends before the start of the text as well as perhaps continuing for several lines.

The "initial-cap-lines-before" property indicates that the initial is to be formatted at a size such that it protrudes in the block-progression-direction to the given distance or number of lines.

Figure 15 shows a Greek initial capital that protrudes above the first line (as measured from the cap height of the first line of text) as well as extending below it.

A value of zero indicates that the leading edge of the initial is to align exactly with that of capital letters in the regular text size.

If the value is negative, an implementation MAY interpret it as as "dropping" forwards.

Open issue: 7563

Need a clear description of margins, spacing, and initial caps

2.4 Marginalia

Requirement:

See the XSL-FO 2.0 Requirements Document, section 2.2.3

Add support for marginalia.

Note:

Note: this section needs to be revised in the light of the new general fo:region

2.4.1 Extension Regions

The region-body has two extension-regions, called extension-region-start and extension-region-end, which implicitly specify corresponding reference-areas called "start-marginalia-reference-area" and "end-marginalia-reference-area".

The extent in the inline-progression-direction of each extension-region is indicated in the "extent" attribute of the "fo:extension-region-*" declaration, while the block-progression-dimension of the area is the same of the region-body.

Figure 16 shows the current XSL-FO 1.1 page model extended to also include these regions.

marginalia diagram

Figure 16. Extending the page XSL-FO 1.1 model to include extensions regions

An example declaration of these regions is shown below:

The element "fo:extension-region-*" also defines other properties of the region such as border, padding, background, etc.

It is an error if a marginalia is contained in a page whose "fo:simple-page-master" does not contain any "fo:extension-region" declaration.

Open issue: 7564

Should users be able to direct marginalia to another region, or only to a predefined marginalia area?

Open issue: 7565

Extension regions may be confusing on a single page master. So far everything is computed relative to the beginning of the page. What about using multiple region bodies of XSL-FO 1.1? That solution would give users more freedom but would require them to impose alignment constraint among regions.

Open issue: 7566

The spec needs to clarify the relation between marginalia and footnotes. In particular, we need to decide whether the marginalia areas can collapse if there's no marginalia. Do we want such a dynamic behavior? There is a note in the requirement document about marginalia and footnotes but it seems to be mainly related to numbering issues.

2.4.2 Formatting Objects for Marginalia

2.4.2.1 fo:marginalia

Common Usage:

The fo:marginalia formatting obiect is intended to be used to produce marginalia, positioned in a separate area external to the start-edge or end-edge of the region-body.

Areas:

The fo:marginalia formatting object does not generate any areas. The fo:marginalia formatting object returns the areas generated and returned by its child fo:inline formatting object. The fo:inline element is optional.

If the fo:inline is empty, the fo:marginalia object does not generate any area.

Additionally the fo:marginalia formatting object returns the block-areas with area class "xsl-marginalia" generated by its fo:marginalia-body child. The areas with area-class "xsl-marginalia" are placed as children of the marginalia-reference-area in the corresponding extension region.

Constraints:

An fo:marginalia is not permitted to have an fo:marginalia, fo:float, fo:footnote, or fo:marker as a descendant. Additionally, an fo:marginalia is not permitted to have as a descendant an fo:block-container that generates an absolutely positioned area.

The term "marginalia-body-area" is defined to mean the first area generated and returned by the fo:marginalia-body, child of the fo:marginalia.

The term "anchor-area" is defined to mean the line area parent of the area generated by the fo:inline child of the fo:marginalia. If the fo:marginalia does not generate any area, the anchor-area is the previous line area in the pre-order visit of the area tree.

These terms are used to specify how to align a marginalia with the text it refers to, setting the "marginalia-relative-align" property. See details below.

Contents:

The following properties apply to this formatting object:

2.4.2.2 fo:marginalia-body

Common Usage:

The fo:marginalia-body is used to generate the marginalia content.

Areas:

The fo:marginalia-body generates and returns one or more block-level areas with area-class "xsl-marginalia". The areas with area-class "xsl-marginalia" are placed as children of the marginalia-reference-area in the corresponding extension region.

Constraints:

The fo:marginalia-body is only permitted as a child of an fo:marginalia.

The position of a marginalia in the page (i.e., the corresponding marginalia-reference-area) is indicated in the "marginalia-destination-area" attribute of the "fo:marginalia formatting object."

Areas with area-class equal to "xsl-marginalia "are defined to be "stackable", indicating that they are supposed to be stacked, in the block-progression-direction within their marginalia-reference-area. In addition a "special stacking rule" has to be applied for placing marginalia in the marginalia-reference-area.

The term "marginalia-body-area" is defined to mean the first area generated and returned by the fo:marginalia-body. The term "anchor-area" is defined to mean the line area parent of the area generated by the fo:inline child of the fo:marginalia. If the fo:marginalia does not generate any area, the anchor-area is the previous line area in the pre-order visit of the area tree.

The offset of the before-edge of the marginalia-body-area from the before-edge of the marginalia-reference-area cannot be smaller than the offset of the before-edge of the anchor-area from the before-edge of the region-reference-area. This constraint makes marginalia anchored to the text they refer to.

The "marginalia-relative-align"property of the fo:marginalia formatting object allows users to further specify the alignment of a marginalia with the text it refers to.

The following properties apply to this formatting object:

Common accessibility properties; id; index-class; index-key.

2.5 Vertical Positioning

A general comment: vertical positioning (and justification) is connected to regions and columns, and that work is not yet complete. In addition, the term Vertical in this section should be taken to mean block-progression-direction.

2.5.1 Feathering

Requirement:

See the XSL-FO 2.0 Requirements Document, section 2.2.4.1

Add support for feathering, to vertically adjust lines. Feathering is vertical justification with very small amounts.

Feathering is the process of filling a block of text to available space, such as the height of the page, for example by adding a small (and ideally imperceptible) amount of space between each line of text. The formatter adjusts the space-before and space-after traits of the stacked block-areas and line-areas in order to fill the reference area.

The before-edge of the allocation-rectangle of the first child area is placed coincident with the before-edge of the content-rectangle of the reference-area. The after-edge of the allocation-rectangle of the last child area is placed coincident with the after-edge of the content-rectangle of the reference-area. The difference between the sum of allocation rectangles and the block progression dimension of the reference area is distributed between each pair of adjacent areas.

One proposal is to add a new value for the property "justify-by-modifying" (itself new for XSL-FO 2.0) indicating that vertical justification is done by adjusting space-before and space-end properties. Space-specifiers (minimum, optimum and maximum) are used to specify constraints on the amount of space to be added.

A alternative approach (somewhat simpler, but not included in this document) might be to add a new value, "feathering", for the property "display-align". In that case, we assume that spaces are equally distributed between each pair of adjacent areas filling the reference area.

2.5.2 Correlating vertical position

Requirement:

See the XSL-FO 2.0 Requirements Document, section 2.2.4.2

Add support for correlating vertical position so that lines of text on two adjacent pages, columns or regions are visually next to each other. Also support alignment of the two sides of the same sheet, so that the lines of text on the back side and front side of the sheet are aligned. Note that this requirement is different from optical alignment. The problem arises if pages/columns contain objects whose height is different than the normal line-height. Some space must be added before/after those objects in order to adjust the layout.

To address this we introduce a new property that specifies a "normalized line height" that must be used as an atomic unit of height. That property specifies a length that the block progression-dimension of each generated area must be a multiple of. Spaces are added before/after each generated area in order to adjust the block progression-dimension. In a multi-column region, the same value is used for all columns.

A provisional name is "block-progression-unit", whose value is a length.

2.5.2.1 block-progression-unit

XSL Definition:

Value:<length>
Initial:0pt
Applies to:fo:region-body, fo:region-before, fo:region-after, fo:region-start, fo:region-end, fo:block-container
Inherited:yes
Percentages:Not applicable.
Media:visual

When this property is set and non-zero, the block progression dimension of each generated area must be rounded up to the nearest multiple of the property value.

A value of zero means that there is no such constraint on the area block progression dimension.

The block progression dimension of each generated area should be rounded up to the nearest greater value that is an integer multiple of the specified length. The difference between the original block progression dimension and the rounded one MUST be transformed into a space-before and / or a space-after (according to the area position and the space conditionality).

For example, suppose that a region has block-progression-unit="12pt". Each block <fo:block line-height="10pt" line-stacking-strategy="font-height" >Text ......</fo:block> will have a block progression dimension equal to N * 12pt (the block progression dimension of each line area is not changed). So, if the block creates eight line areas, the first two placed at the bottom of a page and the other six at the beginning of the next page, the first block area will be given a block progression dimension equal to 24pt (with a 4pt space-before) and the second block will have a 60pt block progression dimension with no extra space.

The property applies to fo:region-* and fo:block-container, and defines how to adjust the block progression dimension of the first-level block formatting objects (the direct children of either fo:flow or fo:static-content).

The intended consequence is that lines of text on facing pages will line up, and also that show-through of lines printed on the other side of a page will be reduced, because the lines of text are printed in corresponding places on each side of the paper.

2.5.3 Vertical alignment within a page or column

Requirement:

See the XSL-FO 2.0 Requirements Document, section 2.2.4.3

Add support for vertical alignment, such as centering the content of the columns or aligning to the bottom within pages, regions or columns.

Note:

This section does not yet take new work on columns into account.

For this, we use the existing "display-align" property:

In a multi-column region the same value is used for all columns, apart from the last one (specified with the property "display-align-last-column").

Applies to: fo:region-body, fo:region-before, fo:region-after, fo:region-start, fo:region-end and fo:block-container.

Note:

Property "display-align" also applies to: fo:external-graphic, fo:instream-foreign-object, fo:inline-container, and fo:table-cell. A similar issue exists for vertical justification.

2.5.4 Vertical alignment specific for the last column

Requirement:

See the XSL-FO 2.0 Requirements Document, section 2.2.4.4

Allow users to do alignment specific to the last column.

2.5.4.1 display-align-last-column

XSL Definition:

Value:<auto | before | center | after | inherit
Initial:auto
Applies to:fo:region-body
Inherited:no
Percentages:Not applicable.
Media:visual

Specifies how to align the last column of a multi-column region. This property specifies the alignment, in the block-progression-direction, of the areas that are the children of a reference-area.

Values for the property have the following meaning:

auto

If the "relative-align" property applies to this formatting object the "relative-align" property is used. If not, this value is treated as if "before" had been specified.

before

The before-edge of the allocation-rectangle of the first child area is placed coincident with the before-edge of the content-rectangle of the reference-area;

center

The child areas are placed such that the distance between the before-edge of the allocation-rectangle of the first child area and the before-edge of the content-rectangle of the reference-area is the same as the distance between the after-edge of the allocation-rectangle of the last child area and the after-edge of the content-rectangle of the reference-area;

after

The after-edge of the allocation-rectangle of the last child area is placed coincident with the after-edge of the content-rectangle of the reference-area.

2.5.5 Vertical justification across pages and columns

Requirement:

See the XSL-FO 2.0 Requirements Document, section 2.2.4.5

Add support for adjusting properties to do vertical justification within a page, a region or a column, as well as across regions.

We extend the display-align property with a new value "justify". It is also important to allow users to specify which properties should be modified in order to do vertical justification. Feathering is one of the possibilities. Other solutions might be: widening or narrowing spaces before and after images and tables, stretching or compressing text, changing word-spacing, adjusting the character-spacing, etc. Thus, we introduce a property indicating a list of properties that the formatter is allowed to change, called "justify-by-modifying", as described under feathering.

Note:

The display-align property also applies to: fo:external-graphic, fo:instream-foreign-object, fo:inline-container, and fo:table-cell.

Open issue: 7567

should vertical justification also apply to fo:table-cell, for instance? What other areas?

Open issue: 7568

Should there be a new specific property for vertical justification, instead of a special value for "display-align"?

3 Tables and Lists

3.1 Decimal Alignment

Requirement:

See the XSL-FO 2.0 Requirements Document, section 2.2.5.1

To improve decimal alignment, extend the character alignment in table cells to permit a specification of the horizontal position of the alignment point within the column.

Text alignment is ordinarily the same for all cells in a column, so the natural choice is to specify the "text-align" property on the fo:table-column and specify 'text-align="from-table-column()"' on all the fo:table-cell objects in that column. To specify a value other than the default for a specific fo:table-cell in the table-column, use that value in the "text-align" property.

The only accepted value for fo:table-column would be "left", "right", and "decimal" (newly added). When the value is "decimal", each cell's text is aligned on the decimal separator as determined by the locale setting, e.g. "." or ",".

3.1.1 Considerations

In Microsoft Excel or spreadsheet, the alignment of text in a cell is usually done based on the data's type, e.g. alphabetic text is usually aligned to the left, numbers are usually aligned to the right, and Boolean values are usually aligned to the center. Do we also need to extend the "text-align" property to allow automatic alignment? Should decimal alignment could be a special case for number alignment?

Text in the cells with a single table may be numbers and strings with mixed fonts and properties. Do we also need to provide a guide of the fallback mechanism if the alignment point cannot be determined?

Consider a long table that has tens of thousands of rows. Aligning a column with decimal alignment will have huge impact on the performance on the rendering of the table, since the formatter must know the position of the decimal point in the cell in every row of the column before it can start to calculate the appropriate alignment for all the cells.

Also, inspired by the OASIS table model, should we add a new property only available for either table-cell or table-column called "text-align-charoff". This property would be used if and only if "text-align" is given a single-character string as its value. The value for the "text-align-charoff" property would be the same as the OASIS table model, i.e. specifying a percentage of current column width between the start-edge (as determined based on the "writing-mode") and the point at where the character is aligned. For example, the default value "50" would specify that the character is aligned at the center of the column.

3.2 Table header/footer on boundaries

Requirement:

See the XSL-FO 2.0 Requirements Document, section 2.2.5.2

Be able to specify different instances of what the table header or footer should be depending on the different boundaries (page, column and region). This also would allow specifying that certain headers must be omitted at certain boundaries.

Similar to fo:page-sequence-master-alternatives and selecting page masters, provide new formatting objects for selecting alternative headers and footers for tables: fo:table-header-alternatives, fo:table-footer-alternatives, fo:conditional-table-header-reference, and fo:conditional-table-footer-reference.

fo:table-header-alternatives is a child object of fo:table-header. It doesn't have any properties.

fo:table-footer-alternatives is a child object of fo:table-footer. It does not have any properties.

fo:conditional-table-header-reference is a child of fo:table-header-alternatives. It has a header-position property.

fo:conditional-table-footer-reference is a child of fo:table-footer-alternatives. It has a footer-position property.

The valid values for both "header-position" and "footer-position" are "page", "column" and "region". If a fo:conditional-table-header or fo:conditional-footer-reference doesn't have "header/footer-position" property, it's the default reference for the table.

Sample XSL FO snippet:

<fo:table>
  <fo:table-header>
    <fo:table-header-alternatives>
      <fo:conditional-table-header-reference> 
        ...
      </fo:conditional-table-header-reference>
      <fo:conditional-table-header-reference header-position="page">
        ...
      </fo:conditional-table-header-reference>
        <fo:conditional-table-header-reference header-position="column">
          ...
      </fo:conditional-table-header-reference>
      ...
    </fo:table-header-alternatives>
  </fo:table-header>
  <fo:table-footer>
    <fo:table-footer-alternatives>
    </fo:table-footer-alternatives>
  </fo:table-footer>
  <fo:table-body>
    ...
  </fo:table-body>
</fo:table>
	

3.2.2 Split tables

Requirement:

See the XSL-FO 2.0 Requirements Document, section 2.2.5.3

Allow users to specify that tables can be split horizontally. It should be possible to have a column repeated when the table is split horizontally, by specifying a row header. There should be a way to keep the split parts visually next to each other depending on binding edge.

In case a table is split over multiple pages and both the rows and columns don’t fit a page, allow users to specify which table part comes out in which order (rows first or columns first).

When printing from spreadsheet applications, printing a table that overflows a single page as series of pages, usually with repeated header rows and columns, is common. Within XSL FO, overflow behavior is specified with the "overflow" property, but the XSL 1.1 "overflow" property has similar semantics to CSS and does not sufficiently handle overflow on tables.

3.2.2.1 table-overflow

XSL Definition:

Value:paginate-column-first | paginate-row-first | auto
Initial:auto
Applies to:fo:table
Inherited:no
Percentages:Not applicable.
Media:paged

Values have the following meanings:

paginate-column-first

Paginate columns before rows

paginate-row-first

Paginate rows before columns.

auto

This is the default behavior. The User Agent determines the pagination method.

The "table-overflow" property specifies the method for paginating a large table into multiple pages.

Open issue: 8860

Should other values of "overflow" property be allowed for the "table-overflow" property, e.g. "visible", "hidden", "scroll", and "error-if-overflow"?

Note:

Normally, we would expect the row header and the column header to be repeated during the pagination, but do we need to add another property to allow the user to override the default behavior or to suppress the behavior? Maybe table-omit-header-at-break and table-omit-footer-at-break apply to the alternatives and/or conditional references.

3.2.3 Repeat contents of split spanned cell

Requirement:

See the XSL-FO 2.0 Requirements Document, section 2.2.5.4

Allow users to specify that when a spanned cell in a table is split, the entire cell contents should be repeated on each table instance. This applies to splitting as well as spanning in the block-progression-direction as well as the inline-progression-direction.

In paged media, a table cell may be split, either vertically or horizontally or both, because another table cell in the same row or column overflows its available area. Additionally, a table cell that spans multiple rows or columns may be split because the rows or columns that it spans are paginated on separate pages.

Allow the "overflow" property to be applied to fo:table-cell and add the "repeat" value that applies only to fo:table-cell.

When the value is "repeat", the content of the fo:table-cell will be repeated on the next page.

3.2.4 Cell borders extending beyond the table

Requirement:

See the XSL-FO 2.0 Requirements Document, section 2.2.5.5

Allow the column lines to extend down or right the table to visually indicate that the table continues. When this happens, any vertical border should be extended beyond the bottom border for the last row or right column [on the page].

This applies to pagination of tables split vertically, horizontally or both vertically and horizontally.

XSL 2.0 defines the following properties: "border-break", "border-before-break", "border-after-break", "border-start-break" and "border-end-break". Their allowed values are: "auto", "hidden" and "extend".

When the value is "extend", the respective border is extended till the end of the area.

3.2.5 Adjacent borders

Requirement:

See the XSL-FO 2.0 Requirements Document, section 2.2.5.6

When one formatting object is immediately preceding another in block-progression-dimension, be able to specify what to do with their adjacent borders.

Allow the "border-collapse" property on other formatting objects in addition to fo:table-cell, e.g. fo:block and fo:inline.

3.2.6 Borders on break

Requirement:

See the XSL-FO 2.0 Requirements Document, section 2.2.5.7

Allow having different borders when a break occurs so that a formatting object is split, e.g. a cell that splits, have a thinner border for the split.

Define properties "border-break-style", "border-start-break-style", "border-end-break-style", "border-before-break-style", and "border-after-break-style". The properties' values are the same as for the "border-style" property, and the same border conflict resolution rules CSS border conflict resolution rules apply.

3.2.7 Spanning cell over all row and columns

Requirement:

See the XSL-FO 2.0 Requirements Document, section 2.2.5.8

The current specification of XSL says that number-rows-spanned and number-columns-spanned should be a positive integer. Other specifications, such as HTML 4.01, allow 0 as a value, which means that all rows or columns of the current table section are spanned over. This behavior may be added to XSL 2.0, either by allowing 0 as a value, or some other solution.

Allow "0" as a value for the "number-rows-spanned" and "number-columns-spanned" properties, with the same semantics as for HTML 4.01 as described at http://www.w3.org/TR/html4/struct/tables.html#adef-colspan

Open issue: 8862

It would be better to use "all" as a value, but that is not compatible with HTML. Should we allow either?

3.3 Layout master set

3.3.1 Interleaving layout-master set

Requirement:

See the XSL-FO 2.0 Requirements Document, section 2.2.12.1

Be able to define layout-master-sets not only at the top of the FO tree, but also interleaving page-sequences, to allow users to define and change masters, such as simple-page-master and page-sequence master, on the fly instead of having to specify all the masters in the beginning of the FO tree. When traversing the FO tree in pre-order traversal, the master must be defined before it may be referenced by a master-reference property.

Note:

This section is currently worded as a set of changes to XSL-FO 1.1

There are two parts to fulfilling this requirement: modifying allowed contents to allow extra "fo:layout-master-set" elements to appear, and adjusting the wording of the spec to say what happens when it occurs.

Allowed contents

For fo:page-sequence-wrapper, allow fo:layout-master-set where you can now have fo:page-sequence or fo:page-sequence-master:

Change the content model from:

(page-sequence|page-sequence-wrapper)*

to:

(layout-master-set,declarations?,bookmark-tree?,
	    (layout-master-set|page-sequence|page-sequence-wrapper)+)

Changes

The following changes to XSL 1.1 are proposed to satisfy this requirement:

3.3.2 Change master every n pages

Requirement:

See the XSL-FO 2.0 Requirements Document, section 2.2.12.2

Have sets of pages repeatable within the same page-sequence.

Requirement:

See the XSL-FO 2.0 Requirements Document, section 2.2.12.3

Allow specifying that every n-th page, a different master should be used. This is a specific case of 2.2.12.2 Repeatable sub-sequence-specifier. For example, use master A for page 1, 2, 3, 4, then master B for page 5, then master A again for 6, 7, 8, 9 then master B for page 10, etc...

To address this requirement, three changes to XSL 1.1 are proposed:

Add 'sequence-repeats' to 'fo:repeatable-page-master-alternatives'

Allow numbers in 'page-position'

Adjust 'fo:repeatable-page-master-alternatives' and 'fo:conditional-page-master-reference' definitions accordingly

3.3.2.2 page-position

XSL Definition:

Value:<number> | only | first | last | rest | any | inherit
Initial:any
Inherited:no
Percentages:Not applicable.
Media:all

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 or, when the "sequence-repeats" property value is not "no-limit", at this point in the sub-sequence cycle.

The values have the following meanings:

<number>

This master is eligible for selection if the value is equal to the current page number or, when the "sequence-repeats" property value is not "no-limit", at this point in the sub-sequence cycle.

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 zero.

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

A value greater than the "sequence-repeats" value, when "sequence-repeats" is not 'no-limit', is false.

only

This master is eligible for selection if this is the only page (i.e. the page is both first and last) page in the page-sequence.

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.

3.3.2.3 fo:repeatable-page-master-alternatives

Common Usage:

The fo:repeatable-page-master-alternatives formatting object is the most complex sub-sequence-specifier. It specifies a sub-sequence consisting of repeated instances of a set of alternative page-masters. The number of repetitions may be bounded or potentially unbounded. The repetitions may also be cyclic. Which of the alternative page-masters is used at any point in the sequence depends on the evaluation of a condition on the use of the alternative.

Typical conditions include testing whether the page which is generated using the alternative is:

  1. The first or last page in a page-sequence;

  2. Blank;

  3. The nth page in a page-sequence or a page cycle

The full set of conditions allows different page-masters to be used for the first page, for odd and even pages, for blank pages, etc.

Areas:

The fo:repeatable-page-master-alternatives formatting object generates no area directly. This formatting object is used by the fo:page-sequence formatting object to generate pages.

Constraints:

The children of the fo:repeatable-page-master-alternatives are fo:conditional-page-master-references. These children are called alternatives.

The sub-sequence of pages mapped to this sub-sequence-specifier satisfies the constraints of this sub-sequence-specifier if (a) the sub-sequence of pages consists of zero or more pages, (b) each page is generated using the fo:simple-page-master referenced by the one of the alternatives that are the children of the fo:repeatable-page-master-alternatives, (c) the conditions on that alternative are true, (d) that alternative is the first alternative in the sequence of children for which all the conditions are true, and (e) the length of the sub-sequence is less than or equal to the value of maximum-repeats.

Contents:

(conditional-page-master-reference+)

The following properties apply to this formatting object:

maximum-repeats; sequence-repeats

3.3.2.4 fo:conditional-page-master-reference

Common Usage:

The fo:conditional-page-master-reference is used to identify a page-master that is to be used when the conditions on its use are satisfied. This allows different page-masters to be used, for example, for even and odd pages, for the first page in a page-sequence, for the third page in a page-sequence cycle, or for blank pages. This usage is typical in chapters of a book or report where the first page has a different layout than the rest of the chapter and the headings and footings on even and odd pages may be different as well. Selecting page-masters based on position within a cycle is typical of bulk-mailed correspondence that is to be folded into envelopes by a folding machine.

Areas:

The fo:conditional-page-master-reference formatting object generates no area directly. It is used by the fo:page-sequence formatting object to generate pages.

Constraints:

The fo:conditional-page-master-reference has a reference to the fo:simple-page-master which has the same master-name as the master-reference trait on the fo:conditional-page-master-reference.

There are three traits, page-position, odd-or-even, and blank-or-not-blank that specify the sub-conditions on the use of the referenced page-master. All three sub-conditions must be true for the condition on the fo:conditional-page-master-reference to be true.

The sub-condition corresponding to the page-position trait is true if the page generated using the fo:conditional-page-master-reference has the specified position in the sequence of pages generated by the referencing page-sequence; namely, "first", "last", "only" (both first and last), "rest" (not first nor last) or "any" (all of the previous) or a number equal to the page number (or the number within the page cycle). The referencing page-sequence is the fo:page-sequence that referenced the fo:page-sequence-master from which this fo:conditional-page-master-reference is a descendant.

The sub-condition corresponding to the odd-or-even trait is true if the value of the odd-or-even trait is "any" or if the value matches the parity of the page number of the page generated using the fo:conditional-page-master-reference.

The sub-condition corresponding to the blank-or-not-blank trait is true, if (1) the value of the trait is "not-blank" and the page generated using the fo:conditional-page-master-reference has areas generated by descendants of the fo:flow formatting objects; if (2) the value of the trait is "blank" and the page generated using the fo:conditional-page-master-reference is such that there are no areas from any fo:flow to be put on that page (e.g., (a) to maintain proper page parity due to (i) a break-after or break-before value of "even-page" or "odd-page" or (ii) at the start or end of the page-sequence or (b) because the constraints on the areas generated by descendants of the fo:flow formatting objects would not be satisfied if they were descendant from this page); or if (3) the value of the trait is "any".

Contents:

EMPTY

The following properties apply to this formatting object:

master-reference; page-position; odd-or-even; blank-or-not-blank

3.4 Spreads

Requirement:

See the XSL-FO 2.0 Requirements Document, section 2.2.17

Be able to treat two facing pages (a two page spread) as a single unit. For example to allow images to cross the page boundaries.

3.4.1 fo:spread-page-master

Common Usage:

Used to define a two-page spread consisting of an even and odd page facing each other. The fo:spread-page-master refers to fo:simple-page-masters for the geometries of the pages and the definition of the pages' regions. The fo:spread-page-master may define additional regions that may be generated on one of the pages or may span both pages in the spread.

Picture of a viewport that spans two pages

Figure 18. Example of spread-viewport-area.

Diagram of a viewport that spans two pages

Figure 19. Example of spread-viewport-area, exploded for clarity.

Areas:

The fo:spread-page-master formatting object generates no area directly. It is used in the generation of pages by an fo:page-sequence.

When the fo:spread-page-master is used to generate pages, three viewport/reference pairs are generated, consisting of a spread-viewport-area and a spread-reference-area for the spread plus a page-viewport-area and a page-reference-area for each of the two pages. The page-viewport-areas represents the physical bounds of the output medium. The page-reference-areas represents the portion of the pages on which content is intended to appear; that is, the area inside the page margins.

When the "binding-edge" trait is "top", the two pages are generated such that the after-edge of the even page is adjacent to the before-edge of the odd page.

In addition, when the fo:spread-page-master is used to generate pages, viewport/reference pairs that correspond to the regions that are the children of the fo:spread-page-master are also generated. These regions are placed relative to the page-height and the page-width of the spread-viewport-area.

When a regions that is a child of the fo:spread-page-master has the same "region-name" as a region that is a child of the fo:simple-page-master for the even- or odd-page, only the child of the fo:spread-page-master generates areas.

Regions that are children of the fo:spread-page-master may span the two pages.

Constraints:

When a fo:spread-page-master is used in the generation of a spread, the block-progression-dimension and inline-progression-dimension of the content-rectangle of the spread-viewport-area are determined using the computed values of the "page-height" and "page-width" properties of the page-masters for the two pages and the "binding-edge" property of the fo:root.

If the value of the media-usage trait is bounded-in-one-dimension or unbounded, only the even-page single-page-master-reference is used.

Contents:

The following properties apply to this formatting object:

master-name; writing-mode

3.4.1.1 Would also affect text in:

Pagination FOs introduction, Currently http://www.w3.org/TR/xsl11/#pag-intro.

*-master-reference FOs

Depends on:

binding edge.

Note:

"page-viewport-areas" no longer represent the physical bounds of the output medium.

Open issue: 7569

What should retrieve-index-mark do for index hits on a double-page spread?

3.5 Bleeds and Trim

Requirement:

See the XSL-FO 2.0 Requirements Document, section 2.2.18

Add support for bleeds. For example, bleeds allow an image to go beyond the page boundaries so that when you print, bind and cut the paper you don’t have any white space showing.

The bleed is expressed at the page level and identifies the amount of content printed outside the page. The design is responsible for creating and placing content that goes into the bleed, for instance a larger background image or an absolutely positioned image. The trim indicates the correct page size after the trimming (cutting) has been applied. It could be the same as the page size but can also be slightly bigger for binding purposes.

Two properties on the fo:simple-page-master control bleed and trim

3.5.1 bleed-box, trim-box

XSL Definition:

Value:x1 y2 x2 y2
Initial:0 0 0 0
Applies to:page reference area
Inherited:no
Percentages:Not applicable.
Media:paged

The bleed-box property defines the size and position of a notional rectangle around the page in which ink might appear: an implementation should not normally render any content outside the bleed box, although it is not an error conition if content is placed there. The primary purpose of the bleed box is so that when a trimming machine cuts the printed page to size, graphics or other content can go all the way to the edge of the page, by virtue of being printed slightly beyond the place where the blade cuts. Hence, the trim box, whose size and position is specified by the trim-box property, is usually inside the bleed-box.

The values are as follows:

x1, y1

A relative offset from the page reference area origin, used to position the origin of the bleed and trim boxes, respectively. The coordinate system is the same as for the page reference area. The numbers are disances, may be negative.

x2, y2

Relative offsets from the corner of the page reference area that is diagonally opposite to its origin; if x1, y1, x2 and y2 are all zero (the default values) the rectangle will thus be the same size as, and in the same position as, the page reference area. The numbers are disances, may be negative.

Open issue

We also need to add these to "fo:page-master" when that is defined. [no bugzilla entry for this item]

The diagram shows four nested rectangles, and marks them.  First (outermost) is the paper edge, so that the diagram is showing a sheet of paper with three rectangles in it.  The next rectangle is the bleeds box, and the printing reaches the edge of this box, but does not cover the gaps an all four sides between the bleeds box and the paper edge.  The third rectangle in the diagram is the page reference area; the page reference area is inside the bleeds box.  The final (innermost) rectangle is the trim box; everything outside the trim rectangle will be cut away (usually with a stamp or guillotine for book produuction, partly after binding).  The trim rectangle is shown as innermost here, bit it could be the same as the page reference area or even outside it.  The various rectangles are positioned by x1, y1, x2, y2 offsets from the top let and bottom right corners of the page reference area in the diagram.

Figure 20. Showing possible placement of bleeds and trim rectangles relative to the page reference area and the physical medium (paper).

4 Composition

4.1 Improved font support

Requirement:

See the XSL-FO 2.0 Requirements Document, section 5.1.1

This may include SVG font capabilities, such as referring to an external font pointed to with a URI, or being able to define fonts like SVG fonts.

In preparation. The XSL-FO Subgroup wants to align with CSS, SVG and with the emerging consensus on Web fonts for downloadable font support, and to see what font properties will be available. A future draft of this document is likely to contain a more detailed section here.

4.2 Force line justification

Requirement:

See the XSL-FO 2.0 Requirements Document, section 5.2

Allow users to force line justification when the line length is within a certain range. For example, normally the last line of a paragraph would not be justified, but if the last line is longer than a certain threshold, justify it anyway.

4.3 Alignment around breaks

Requirement:

See the XSL-FO 2.0 Requirements Document, section 5.3

Add properties to specify what the alignment should be for the 'last line before a break' and the 'first line after a break'.

4.3.1 text-align-before-break

XSL Definition:

Value:relative | start | center | end | justify | inside | outside | left | right | inherit
Initial:relative
Applies to:all elements
Inherited:yes
Percentages:N/A
Media:visual

This property describes how inline content of the last line before a break is aligned.

Values have the same meanings as in the definition of "text-align-last".

4.3.2 text-align-after-break

XSL Definition:

Value:relative | start | center | end | justify | inside | outside | left | right | inherit
Initial:relative
Applies to:all elements
Inherited:yes
Percentages:N/A
Media:visual

This property describes how inline content of the first line after a break is aligned. Values have the same meanings as in the definition of "text-align-last".

4.4 hanging-punctuation

Requirement:

See the XSL-FO 2.0 Requirements Document, section 5.4

Add support for hanging punctuation, both for western [and] non-western languages.

XSL Definition:

Value:none | <list of characters>
Initial:none
Applies to:all elements
Inherited:yes
Percentages:N/A
Media:visual

This property describes which characters are allowed to hang outside the margins.

Note:

This should refer to a "list of characters" datatype, which we have not yet defined.

4.5 Tabs and tab stops

Requirement:

See the XSL-FO 2.0 Requirements Document, section 5.4

Add support for tabs and tab stops that people are used to from word processors. The main requirement for this seems to be compatibility with other formats, mainly word processor formats.

4.5.2 tab-alignment-character

XSL Definition:

Value:<character>
Initial:. (period character)
Applies to:all elements
Inherited:yes
Percentages:N/A
Media:visual

This property specifies the character used for alignment for a decimal tab.

4.6 Word and letter spacing

4.6.1 word-spacing-critical-length

Requirement:

See the XSL-FO 2.0 Requirements Document, section 5.6.3

Allow users to specify the priority between word and letter spacing.

XSL Definition:

Value:<length>
Initial:0pt
Applies to:all elements
Inherited:yes
Percentages:N/A
Media:visual

This property specifies a length (x) for the word spacing to allow before invoking letterspacing. More precisely, it specifies a limitation on the effect of a "letterspacing" value; letterspacing may be used in the line-breaking algorithm within a given line-area when otherwise the word-spacing value would be greater than x.

Values have the following meanings:

<length>

The permitted minimum deficit is a fixed length.

The value must not be negative.

4.7 Hyphenation and line breaking

4.7.1 hyphenation-push-syllable-count

Requirement:

See the XSL-FO 2.0 Requirements Document, section 5.7.1

Allow specifying the number of syllables in addition to the number of characters to control hyphenation.

XSL Definition:

Value:<number>
Initial:1
Applies to:all elements
Inherited:yes
Percentages:N/A
Media:visual

The "hyphenation-push-syllable-count" property specifies the minimum number of syllables permitted in a hyphenated word after the hyphenation character. Formatters must not insert hyphens during line breaking in places that would result in word fragments violating this proerty.

Values have the following meanings:

<number>

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

4.7.3 syllable-widows

Requirement:

See the XSL-FO 2.0 Requirements Document, section 5.7.2

Add syllable level widow and orphan controls

XSL Definition:

Value:<number>
Initial:1
Applies to:all elements
Inherited:yes
Percentages:N/A
Media:visual

The "syllable-widows" property specifies the minimum number of syllables in the last line-area of a block-area.

Values have the following meanings:

<number>

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

The syllable-widows specifies the minimum number of syllables in the last line-area of the block-area for which it is in effect.

4.7.4 hyphenation-exceptions

Requirement:

See the XSL-FO 2.0 Requirements Document, section 5.7.3

Allow users to specify language-specific hyphenation exceptions.

XSL Definition:

Value:<uri-specification> | none | inherit
Initial:none
Applies to:all elements
Inherited:no
Percentages:N/A
Media:visual

This property specifies a set of hyphenation-exception words to be used by the hyphenation algorithm.

Values for this property are as follows:

none

No exceptions are used.

<uri-specification>

A URI specification giving a reference to the resource containing the exception words.

Note:

We have not defined a format for this resource.

4.7.5 word-widows

Requirement:

See the XSL-FO 2.0 Requirements Document, section 5.7.5

Add word level widow and orphan control.

XSL Definition:

Value:<number>
Initial:0
Applies to:all elements
Inherited:yes
Percentages:N/A
Media:visual

The "word-widows" property specifies the minimum number of words or partial words in the last line-area of a block-area.

When a word is hyphenated, the remaining portion, a partial word, brought down onto the next line, is to be considered to be a whole word for the purpose of counting words.

Values have the following meanings:

<number>

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

<percentage>

The permitted minimum deficit is a percentage of the containing block width.

The "word-widows" property specifies the minimum number of words in the last line-area of the block-area for which it is in effect.

4.7.6 min-length-of-last-line

Requirement:

See the XSL-FO 2.0 Requirements Document, section 5.7.6

Be able to specify the minimum length of the last line.

XSL Definition:

Value:<length>
Initial:1
Applies to:all elements
Inherited:yes
Percentages:refer to width of containing block
Media:visual

The min-length-of-last-line property specifies the minimum inline-progression-dimension of the the last line-area in a block-area.

Values have the following meanings:

<length>

Specifies a fixed minimum line length.

<percentage>

The minimum line length is a percentage of the containing block width.

The value must not be negative

5 Further improved non-Western language support

Requirement:

See the XSL-FO 2.0 Requirements Document, section 6

Improve support for non-Western languages, such as Mongolian, Indic languages, Thai, Japanese, Chinese, etc. The working group invites language experts to identify language specific features that are currently not yet supported by XSL.

Specifically, the Japanese Layout Taskforce has published a document about requirements for general Japanese layout realized with This draft, then, technologies like CSS, SVG and XSL-FO [Requirements for Japanese Text Layout]. This document is being used as an input to the XSL Working Group as a source of requirements, and is currently being discussed within the Group.

The XSL-FO task force is monitoring the Japanese Layout Task Force work closely, and has participated in meetings.

6 Images

Open issue: 7570

Should there be a list of image formats that MUST be supported, e.g. PNG?

6.1 Images

Requirement:

See the XSL-FO 2.0 Requirements Document, section 7.3

Allow rotating images over arbitrary angles.

6.1.2 Callouts

Requirement:

See the XSL-FO 2.0 Requirements Document, section 7.4

Add support for callouts. Callouts are labels in a picture, overlaying text on top of a graphic (which typically needs to be translatable). Allow users to make live links from the image or map to the text and vice versa.

For callouts, e.g. adding captions to an image, with arrows pointing to the text, one approach that makes sense here is to use SVG, remembering that allowing fo:blocks inside the SVG may fall out of the work with SVG.

6.1.3 Multi-page images

Requirement:

See the XSL-FO 2.0 Requirements Document, section 7.5

Add support for access to individual images in multi-page image formats such as TIFF, PDF or SVG 1.2.

This may be a case of wanting a URI fragment identifier for a specific page of a PDF, or layer of TIFF; for SVG this is a liaison item. If a media type doesn't define a fragment type, we could add an extra property.

Open issue: 7571

What if you don't know in advance how many layers there are in advance in, say, a TIFF image, and want to print them all as pages?

7 Color Support

Requirement:

See the XSL-FO 2.0 Requirements Document, section 9.6

Improved color support including things that SVG Print does. For example add device-specific CMYK color. Add support for the color names that are supported in SVG. Fills/Shading/Vignettes.

A function is added to support calibrated CMYK colors:

color cmyk-ICC-color(r, g, b, NCName, cyan, magenta, yellow, black)

Two functions are added to support the direct specification of the cartesian and polar forms of the CIE L*ab color space:

color cie-lab-color(r, g, b, Lightness, a-value, b-value)
	  color cie-lchab-color(r, g, b, Lightness, chroma, hue)

A function is introduced to support named-icc-colors (e.g. Pantone™).

color rgb-named-color(r, g, b, NCName, namedColor)

Four new functions are added to support device-dependent (uncalibrated) color (e.g. calibration swatches, registration marks).

color gray-device-color (r,g,b, devGray)
	  color rgb-device-color (r,g,b, devR, devG, devB)
	  color cmyk-device-color (r,g,b, devC, devM, devY, devK)

A conformance class is introduced for implementations which correctly process color managed colors (i.e. do not rely on the fallback colors).

A conformance class is introduced for implementations which correctly process color managed images (i.e. apply, or pass through to a formatter, any embedded ICC profile).

8 Collaboration with SVG

Requirement:

See the XSL-FO 2.0 Requirements Document, section 10

For XSL-FO 2.0 we want to have a close collaboration between the XSL and SVG working groups. Wherever possible we will try to use SVG functionality rather than reinventing our own.

8.1 Masks

Requirement:

See the XSL-FO 2.0 Requirements Document, section 10.1

Add support for applying a mask (or clip shape) to an object.

Masks in SVG are only applied to viewports. It would be a good practice to do the same and apply it only to block-containers or regions. Masks are declared in the defs space in SVG and then referenced. This enables re-use and complex effects (e.g. Mask with Gradient and so on...)

The approach is to introduce an fo:mask object inside the fo:declarations that contains a valid SVG document providing the mask definition. An XSL-FO renderer can then use an SVG agent to compute the mask and then apply it to the FO rendering result.

<fo:root
	    xmlns:svg="http://www.w3.org/2000/svg"
	    xmlns:xlink="http://www.w3.org/1999/xlink">
	    <fo:declarations>
	    <fo:mask mask-name="myFOMask" content-type="image/svg"
	    content-reference-id="svg:mask[@id='svgMask']">
	    <svg:svg width="8cm" height="3cm" viewBox="0 0 800 300" version="1.1">
	    <svg:desc>Example mask01 - content masked with gradient against red background</svg:desc>
	    <svg:defs>
	    <svg:linearGradient id="Gradient" gradientUnits="userSpaceOnUse"
	    x1="0" y1="0" x2="800" y2="0">
	    <svg:stop offset="0" stop-color="white" stop-opacity="0" />
	    <svg:stop offset="1" stop-color="white" stop-opacity="1" />
	    </svg:linearGradient>
	    <svg:mask id="svgMask" maskUnits="userSpaceOnUse"
	    x="0" y="0" width="800" height="300">
	    <svg:rect x="0" y="0" width="800" height="300" fill="url(#Gradient)"  />
	    </svg:mask>
	    </svg:defs>
	    ...
	    </svg:svg>
	    </fo:mask>
	    </fo:declarations>
	    ...
	    <fo:block-container mask-reference-name="myFOMask">
	    ...
	    </fo:block-container>
	    ...
	    </fo:root>

8.2 Rotation and Transformations

Requirement:

See the XSL-FO 2.0 Requirements Document, section 10.2

Support rotations on any type of object (not just images) over arbitrary angles.

Requirement:

See the XSL-FO 2.0 Requirements Document, section 10.3

Allow applying SVG type transformations to XSL areas.

An SVG-like transform function is introduced for all sort of operations emulating what SVG and PPML do ([SVG], [PPML]) as a property, on "fo:block-container", with the following functions as values:

matrix(a,b,c,d,e)

standard CTM matrix;

translate(cx,cy)

move the origin;

scale(sx [, sy])

resize;

rotate(angle[ , cx, cy])

rotate about the origin;

skewX(angle)

shear by distorting horizontally;

skewY(angle)

shear by distorting vertically.

The behaviour can be completely inherited from SVG [SVG].

Open issue: 7572

Some Web browsers support transform and translate functions in CSS, but do not account for the resulting shape in page layout! We need to see what the correct CSS behaviour should be, and/or align with one or other spec; [it is most useful for the resulting shape to be able to create intrusions, especially if we use layers and z-axis to manage conflicts, so you can choose whether or not to have an intrusion].

A Changes since last publication

Since 2009-09-29:

Added 2.2.12.2, change master every n pages

Added non-rectangular shapes

Added copyfitting

Added list of properties

Clarified word-widow definition

Several new issues linked to bugzilla, and others made into notes.

Various editorial changes

B References

C List of properties (Non-Normative)

The following properties are defined in this document, or were defined in XSL-FO 1.1 and are modified here.

bleed-box

The bleed-box property defines the size and position of a notional rectangle around the page in which ink might appear: an implementation should not normally render any content outside the bleed box, although it is not an error conition if content is placed there. The primary purpose of the bleed box is so that when a trimming machine cuts the printed page to size, graphics or other content can go all the way to the edge of the page, by virtue of being printed slightly beyond the place where the blade cuts. Hence, the trim box, whose size and position is specified by the trim-box property, is usually inside the bleed-box.

block-progression-unit

When this property is set and non-zero, the block progression dimension of each generated area must be rounded up to the nearest multiple of the property value.

copyfit-by-modifying

This property is used to copyfit text into a region and to define strategies for copyfitting.

display-align-last-column

Specifies how to align the last column of a multi-column region. This property specifies the alignment, in the block-progression-direction, of the areas that are the children of a reference-area.

distance

Specifies the distance between the edge of the region-body and the edge of the extension region to which it applies.

force-page-count

"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.

hanging-punctuation

This property describes which characters are allowed to hang outside the margins.

hyphenation-exceptions

This property specifies a set of hyphenation-exception words to be used by the hyphenation algorithm.

hyphenation-permitted-minimum-deficit

This property specifies a length (x) for the hyphenation margin for a block. More precisely, it specifies a limitation on the effect of a "hyphenate" value of "true"; hyphenation may be used in the line-breaking algorithm within a given line-area when otherwise the inline-progression-dimension of the line area would be less than the available width in the inline-progression-dimension by an amount greater than x.

hyphenation-push-syllable-count

The "hyphenation-push-syllable-count" property specifies the minimum number of syllables permitted in a hyphenated word after the hyphenation character. Formatters must not insert hyphens during line breaking in places that would result in word fragments violating this proerty.

hyphenation-remain-syllable-count

The hyphenation-remain-syllable-count specifies the minimum number of syllables in a hyphenated word before the hyphenation character. This is the minimum number of syllables in the word left on the line ending with the hyphenation character.

initial-cap-indent

The initial-cap-indent property distance (either as an absolute value or as a percentage of the actual formatted initial cap width) by which the initial is indented in the inline progression direction.

initial-cap-kern-lines

The "initial-cap-kern-lines" property indicates the number of lines of text that should be abutted to the large intial.

initial-cap-lines

This property specifies the number of lines spanned by the initial letter.

initial-cap-lines-before

The "initial-cap-lines-before" property indicates that the initial is to be formatted at a size such that it protrudes in the block-progression-direction to the given distance or number of lines.

justify-by-modifying

Specifies a list of properties whose values can be adjusted in order to do vertical justification.

last-line-minimum-deficit

The last-line-minimum-deficit property specifies a length (x) for the minimum line length deficit for the last line-area of a block-area. More precisely, it specifies a constraint on the last line-area child of the last block-area L generated and returned by the formatting object, such that the inline-progression L is either equal to the available width (w) in the inline-progression-dimension (as the term is used in the "justify" value of "text-align"), or is less than or equal to w minus x.

marginalia-destination-area

Specifies the marginalia-reference-area in which to place the block-areas generated by the child fo:marginalia-body to which it applies.

marginalia-relative-align

Specifies the alignment of the marginalia with respect to the text to which it refers. This property specifies the alignment, in the block-progression-direction, between two areas.

min-length-of-last-line

The min-length-of-last-line property specifies the minimum inline-progression-dimension of the the last line-area in a block-area.

page-position

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 or, when the "sequence-repeats" property value is not "no-limit", at this point in the sub-sequence cycle.

sequence-repeats

Specifies the number of pages in a cyclic sub-sequence of pages that may be generated before the cycle repeats.

syllable-widows

The "syllable-widows" property specifies the minimum number of syllables in the last line-area of a block-area.

tab-alignment-character

This property specifies the character used for alignment for a decimal tab.

tab-stops

This property specifies a sequence of tab stop locations relative to the content-rectangle of the closest ancestor reference-area.

text-align-after-break

This property describes how inline content of the first line after a break is aligned. Values have the same meanings as in the definition of "text-align-last".

text-align-before-break

This property describes how inline content of the last line before a break is aligned.

trim-box

The bleed-box property defines the size and position of a notional rectangle around the page in which ink might appear: an implementation should not normally render any content outside the bleed box, although it is not an error conition if content is placed there. The primary purpose of the bleed box is so that when a trimming machine cuts the printed page to size, graphics or other content can go all the way to the edge of the page, by virtue of being printed slightly beyond the place where the blade cuts. Hence, the trim box, whose size and position is specified by the trim-box property, is usually inside the bleed-box.

word-spacing-critical-length

This property specifies a length (x) for the word spacing to allow before invoking letterspacing. More precisely, it specifies a limitation on the effect of a "letterspacing" value; letterspacing may be used in the line-breaking algorithm within a given line-area when otherwise the word-spacing value would be greater than x.

word-widows

The "word-widows" property specifies the minimum number of words or partial words in the last line-area of a block-area.

wrap

Use the "wrap" property to specify flow run-around.

wrap-path

When two or more shaped areas interact, the "wrap-path" property determines how text and other inline objects in one area flow around the shape of the other area.

wrap-side

The "wrap-side" property indicates what strategy should be applied for the runaround.

D Acknowledgements (Non-Normative)

This specification was developed and approved for publication by the W3C XSL Working Group (WG). WG approval of this specification does not necessarily imply that all WG members voted for its approval.

During the development of XSL 2.0 the members of the XSL FO Subgroup were:

Sharon Adler, IBM; Klaas Bals, Inventive Designers; Anders Berglund, IBM; Jeff Caruso, Pageflex; Fabio Giannetti, HP; Tony Graham, Menteith Consulting; Paul Grosso, PTC-Arbortext; Angelo Di Iorio, University of Bologna; Xin (Edward) Jiang, (Oracle, and then Microsoft); Liam Quin, W3C; Zarella Rendon, PTC-Arbortext.

In addition, many members of the public, including users and implementors, have given useful feedback in he form of comments.