Elements and Attributes
This chapter describes each major formatting object and its usage.
Declarations and pagination and layout formatting objects
The objects described in this section are used to define the geometry of the page and to control which content appears where on the page.
fo:root
This is the top level element in the FO and contains the fo:layout-master-set, an optional fo:declarations and one or more fo:page-sequence elements. These child elements must be in the order listed.
Child Elements
fo:bookmark-tree (zero or one)
fo:declarations (zero or one)
fo:layout-master-set (exactly one)
fo:page-sequence (zero or more)
fo:page-sequence-wrapper (zero or more)
Parent Elements
Attributes
Attribute |
---|
media-usage |
id |
index-key |
index-class |
For an example showing the use of the element see Figure 23-1.
<fo:?xml version='1.0' encoding='UTF-8'?>
<fo:root xmlns="http://www.w3.org/1999/XSL/Format">
<fo:layout-master-set>
<fo:simple-page-master master-name="simple">
<fo:region-body margin="2.5cm" region-name="body" background-color='#eeeeee'/>
</fo:simple-page-master>
</fo:layout-master-set>
<fo:page-sequence master-reference="simple">
<fo:flow flow-name="body">
<fo:block>Hello World</fo:block>
</fo:flow>
</fo:page-sequence>
</fo:root>
fo:declarations
The declarations formatting object is used to group global declarations for a stylesheet. In Ibex it acts as a container for the fo:color-profile element which is used in PDF/X files. See pdf-x for more information.
Child Elements
Parent Elements
fo:color-profile
This element is used to specify an external color profile file used in the creation of PDF/X files. See pdf-x for more information.
Parent Elements
Attributes
Attribute |
---|
src |
color-profile-name |
rendering-intent |
fo:page-sequence
This element contains content for one or more pages. The content is contained in fo:static-content elements which hold content for the page header, footer and other regions, and a one or more fo:flow elements which contain content to be placed in the body regions of the page. The page-sequence has a master-reference attribute which should correspond to the master-name of an element contained within the documents fo:layout-master-set, such as a fo:single-page-master. The page number for the first page created by this page sequence can be set using the initial-page-number attribute. The format of the page number is controlled using the format attribute.
Child Elements
fo:flow (one or more)
fo:folio-prefix (zero or more)
fo:folio-suffix (zero or more)
fo:static-content (zero or more)
fo:title (zero or more)
Parent Elements
Attributes
For an example showing the use of the element see Figure 23-1.
fo:page-sequence-wrapper
This element is used to specify attributes which can be inherited by a group of page-sequence elements which are contained in the page-sequence-wrapper.
Child Elements
fo:page-sequence (zero or more)
fo:page-sequence-wrapper (zero or more)
Parent Elements
Attributes
Attribute |
---|
id |
index-class |
index-key |
For an example showing the use of the element see Figure 23-2.
<fo:?xml version='1.0' encoding='UTF-8'?>
<fo:root xmlns="http://www.w3.org/1999/XSL/Format">
<fo:layout-master-set>
<fo:simple-page-master master-name="simple">
<fo:region-body margin="2.5cm" region-name="body" background-color='#eeeeee'/>
</fo:simple-page-master>
</fo:layout-master-set>
<fo:page-sequence-wrapper index-key="main">
<fo:page-sequence master-reference="simple">
<fo:flow flow-name="body">
<fo:block>Hello World</fo:block>
</fo:flow>
</fo:page-sequence>
</fo:page-sequence-wrapper>
</fo:root>
fo:layout-master-set
This element contains all the page master elements (fo:simple-page-master, fo:page-sequence-master) used to create individual pages or sequence of pages. At least one child element must exist or the document will contain no pages.
Child Elements
fo:flow-map (zero or more)
fo:page-sequence-master (zero or more)
fo:simple-page-master (zero or more)
Parent Elements
For an example showing the use of the element see Figure 23-1.
fo:page-sequence-master
This element is used to define the sequence in which one or more page master elements (fo:simple-page-master, fo:repeatable-page-master) are used to create pages. The element describes a sequence of page layouts and has a master-name which uniquely identifies it. This master-name is used as the master-reference on a fo:page-sequence element in order to create pages using the sequence described by this page-sequence-master. Each child of this element specifies a sequence of one or more pages: A fo:single-page-master-reference element is used define the layout for one page. A fo:repeatable-page-master-reference element is used define multiple pages which have the same layout because they use the same page master. A fo:repeatable-page-master-alternatives element is used define multiple pages which can have different layouts created using different page master elements.
Child Elements
fo:repeatable-page-master-alternatives (zero or more)
fo:repeatable-page-master-reference (zero or more)
fo:single-page-master-reference (zero or more)
Parent Elements
Attributes
Attribute |
---|
master-name |
For an example showing the use of the element see Figure 23-3.
<fo:?xml version='1.0' encoding='UTF-8'?>
<fo:root xmlns="http://www.w3.org/1999/XSL/Format">
<fo:layout-master-set>
<fo:simple-page-master master-name="simple">
<fo:region-body margin="2.5cm" region-name="body" background-color='#eeeeee'/>
</fo:simple-page-master>
<fo:page-sequence-master master-name='repeated'>
<fo:repeatable-page-master-reference master-reference='simple'/>
</fo:page-sequence-master>
</fo:layout-master-set>
<fo:page-sequence master-reference="repeated">
<fo:flow flow-name="body">
<fo:block>Hello World</fo:block>
</fo:flow>
</fo:page-sequence>
</fo:root>
fo:single-page-master-reference
This element specifies that the fo:simple-page-master which has a master-name corresponding to the master-reference of this element should be used to define the layout for a single page.
Child Elements
This element must be empty.
Parent Elements
Attributes
Attribute |
---|
master-reference |
For an example showing the use of the element see Figure 23-1.
fo:repeatable-page-master-reference
This element specifies that the fo:simple-page-master which has a master-name corresponding to the master-reference of this element should be used to define the layout of one or more pages. The difference between this and a fo:single-page-master-reference is that the single-page-master-reference produces one page whereas this element can produce multiple pages. The maximum number of pages created by this element is controlled by the maximum-repeats attribute which by default is unlimited.
Child Elements
This element must be empty.
Parent Elements
Attributes
Attribute |
---|
master-reference |
maximum-repeats |
For an example showing the use of the element see Figure 23-3.
fo:repeatable-page-master-alternatives
This element contains a set of fo:conditional-page-master-reference elements, each of which specifies a page master and some conditional information. When the rendering of content from a fo:flow element triggers the creation of a new page each fo:conditional-page-master-reference contained in this element is evaluated to see if it should be used. Typically the fo:conditional-page-master-reference elements are used to specify different page layouts for the first page of a sequence or for odd and even pages. The Ibex manual uses this approach, so that the first page of each chapter has no header.
Child Elements
fo:conditional-page-master-reference (one or more)
Parent Elements
Attributes
Attribute |
---|
maximum-repeats |
For an example showing the use of the element see Figure 23-4.
<fo:page-sequence-master master-name='chapter'>
<fo:repeatable-page-master-alternatives>
<fo:conditional-page-master-reference page-position="first" master-reference='chapter-odd-no-header'/>
<fo:conditional-page-master-reference odd-or-even='odd' master-reference='chapter-odd'/>
<fo:conditional-page-master-reference odd-or-even='even' master-reference='chapter-even'/>
</fo:repeatable-page-master-alternatives>
</fo:page-sequence-master>
fo:conditional-page-master-reference
This element associates a page master and a condition such that the page master will be used when the condition is true. The conditions which are associated with this element are page-position, odd-or-even, and blank-or-not-blank. Each condition on each fo:conditional-page-master-reference in a fo:repeatable-page-master-alternatives element is evaluated in turn until one is found which is true, and that conditional-page-master-reference is used.
Child Elements
This element must be empty.
Parent Elements
fo:repeatable-page-master-alternatives
Attributes
Attribute |
---|
master-reference |
page-position |
odd-or-even |
blank-or-not-blank |
For an example showing the use of the element see Figure 23-4.
fo:simple-page-master
This element defines the layout of a single page. It is uniquely identified by its master-name which is used on fo:page-sequence and other elements to create pages which use this layout. The content of the page goes into the named regions which are specified by the child elements of this element. The size of the page is defined using the page-height and page-width attributes. The default page size is A4.
Child Elements
fo:region-after (zero or one)
fo:region-before (zero or one)
fo:region-body (one or more)
fo:region-end (zero or one)
fo:region-start (zero or one)
Parent Elements
Attributes
Attribute |
---|
margin |
margin-bottom |
margin-left |
margin-right |
margin-top |
space-before |
space-after |
start-indent |
end-indent |
master-name |
page-height |
page-width |
reference-orientation |
writing-mode |
For an example showing the use of the element see Figure 23-1.
fo:region-body
This element defines the shape of the main area on the page into which content from fo:flow elements will be placed. The region has a default name of "xsl-region-body" which is usually changed to something simpler using the region-name attribute. A page can be defined which has multiple columns by using the column-count and column-gap attributes on this region. Within the region all of the content can be aligned to the top, bottom or middle of the region using the display-align attribute. Ibex supports multiple body regions. There can be any number of body regions, provided each has a unique region-name. Content from different flows is mapped to different regions using the fo:flow-map element. The content of the region can be rotated using the reference-orientation attribute.
Child Elements
This element must be empty.
Parent Elements
Attributes
For an example showing the use of the element see Figure 23-5.
<fo:simple-page-master master-name="front-page" margin='1.5cm' page-height="297mm" page-width="210mm">
<fo:region-body region-name="body" margin='0.75cm 0.5cm 0.75cm 3cm'/>
<fo:region-before region-name="header" extent="2.5cm"/>
<fo:region-after region-name="footer" extent="1cm"/>
<fo:region-start extent='1cm' background-color='#eeeeee'/>
<fo:region-end extent='1cm' background-color='#eeeeee'/>
</fo:simple-page-master>
fo:region-before
This element defines the shape of a region which is at the top of a non-rotated page. Content from fo:static-content elements whose flow-name matches the region-name will be placed in this region. The region has a default name of "xsl-region-before" which is usually changed to something simpler such as "header" using the region-name attribute. Within the region all of the content can be aligned to the top, bottom or middle of the region using the display-align attribute. The content of the region can be rotated using the reference-orientation attribute. Unlike the fo:region-body element the region-before does not have margin properties. The size of the region is defined using the extent attribute. By default the before region is reduced in width by the presence of the fo:region-start and fo:region-end elements. This can be changed by setting the precedence attribute to "true".
Child Elements
This element must be empty.
Parent Elements
Attributes
For an example showing the use of the element see Figure 23-5.
fo:region-after
This element defines the shape of a region which is at the bottom of a non-rotated page. Content from fo:static-content elements whose flow-name matches the region-name will be placed in this region. The region has a default name of "xsl-region-after" which is usually changed to something simpler such as "footer" using the region-name attribute. Within the region all of the content can be aligned to the top, bottom or middle of the region using the display-align attribute. The content of the region can be rotated using the reference-orientation attribute. Unlike the fo:region-body element the region-after does not have margin properties. The size of the region is defined using the extent attribute. By default the before region is reduced in width by the presence of the fo:region-start and fo:region-end elements. This can be changed by setting the precedence attribute to "true".
Child Elements
This element must be empty.
Parent Elements
Attributes
For an example showing the use of the element see Figure 23-5.
fo:region-start
This element defines the shape of a region which is at the left of a non-rotated page. Content from fo:static-content elements whose flow-name matches the region-name will be placed in this region. The region has a default name of "xsl-region-start" which is usually changed to something simpler such as "left" using the region-name attribute. Within the region all of the content can be aligned to the top, bottom or middle of the region using the display-align attribute. The content of the region can be rotated using the reference-orientation attribute. Unlike the fo:region-body element the region-start does not have margin properties. The size of the region is defined using the extent attribute.
Child Elements
This element must be empty.
Parent Elements
Attributes
For an example showing the use of the element see Figure 23-5.
fo:region-end
This element defines the shape of a region which is at the right of a non-rotated page. Content from fo:static-content elements whose flow-name matches the region-name will be placed in this region. The region has a default name of "xsl-region-start" which is usually changed to something simpler such as "right" using the region-name attribute. Within the region all of the content can be aligned to the top, bottom or middle of the region using the display-align attribute. The content of the region can be rotated using the reference-orientation attribute. Unlike the fo:region-body element the region-end does not have margin properties. The size of the region is defined using the extent attribute.
Child Elements
This element must be empty.
Parent Elements
Attributes
For an example showing the use of the element see Figure 23-5.
fo:flow
This element contains block-level objects which create content which will appear in the body region of the page. The flow-name attribute must correspond to a region-name used on the body region of the current page master for the content to be output. Which page master this is, is determined by the master-reference attribute of the containing fo:page-sequence. If the flow-name does not match the region-name the content will not appear.
Child Elements
fo:block (one or more)
Parent Elements
Attributes
Attribute |
---|
id |
index-class |
index-key |
flow-name |
fo:static-content
This element is used to create content in a region other then the body region. The term "static" refers to the fact that the content will go only on the current page, unlike the content of a fo:flow element that may extend to many pages. Static content is commonly used for page headers and footers. The content is usually different on each page as the page number changes. The flow-name attribute may correspond to a region-name used on a non-body region of the current page master. Which page master this corresponds to is determined by the master-reference attribute of the containing fo:page-sequence. If the flow-name does not match a region-name the content will not appear. This makes it possible to have a fo:page-sequence which contains many static content elements each matching a different page layout. Only the static content which matches a region which is on the current page layout will be displayed.
Child Elements
fo:block (zero or more)
fo:block-container (zero or more)
fo:float (one or more, cannot be used inside an out-of-line element)
fo:index-range-begin (one or more, subject to constraints specified for this element)
fo:index-range-end (one or more, subject to constraints specified for this element)
fo:list-block (zero or more)
fo:retrieve-marker (one or more, subject to constraints specified for this element)
fo:table (zero or more)
fo:table-and-caption (zero or more)
fo:wrapper (one or more, subject to constraints specified for this element)
Parent Elements
Attributes
Attribute |
---|
id |
index-class |
index-key |
flow-name |
For an example showing the use of the element see Figure 23-6 .
fo:title
The title element associates a string title with a page sequence. This has no function when generating PDF so is discarded by Ibex.
Child Elements
text
fo:basic-link (zero or more)
fo:bidi-override (zero or more)
fo:character (zero or more)
fo:external-graphic (zero or more)
fo:float (one or more, cannot be used inside an out-of-line element)
fo:footnote (one or more, cannot be used inside an out-of-line element)
fo:index-page-citation-list (zero or more)
fo:index-range-begin (one or more, subject to constraints specified for this element)
fo:index-range-end (one or more, subject to constraints specified for this element)
fo:inline (zero or more)
fo:inline-container (zero or more)
fo:instream-foreign-object (zero or more)
fo:leader (zero or more)
fo:page-number (zero or more)
fo:page-number-citation (zero or more)
fo:page-number-citation-last (zero or more)
fo:retrieve-marker (one or more, subject to constraints specified for this element)
fo:scaling-value-citation (zero or more)
fo:wrapper (one or more, subject to constraints specified for this element)
Parent Elements
fo:flow-map
The flow-map is used to specify the assignment of flows to regions. Using the fo:flow-map the content from one or more fo:flow elements can be assigned to appear in one or more regions. So content from one fo:flow can be rendered across multiple regions on the same page, filling one region then another.
fo:flow-map elements must have a unique flow-map-name value. This is referenced by the flow-map-reference attribute of an fo:page-sequence to assign the content of that fo:page-sequence using the named flow-map. flow-maps were added to XSL-FO in version 1.1.
Child Elements
fo:flow-assignment (zero or more)
Parent Elements
Attributes
Attribute |
---|
flow-map-name |
For an example showing the use of the element see Figure 23-7.
fo:flow-assignment
The fo:flow-assignment is used to assign a list of fo:flows to a list of regions.
Child Elements
fo:flow-source-list (exactly one)
fo:flow-target-list (exactly one)
Parent Elements
For an example showing the use of the element see Figure 23-7.
fo:flow-source-list
The fo:flow-source-list contains a list of fo:flow-name-specifier elements which specify the names of flows which will be assigned by the containing flow-map.
Child Elements
fo:flow-name-specifier (one or more)
Parent Elements
For an example showing the use of the element see Figure 23-7.
fo:flow-name-specifier
The fo:flow-name-specifier has one attribute which specifies the name of a fo:flow. This is used in the fo:flow-map element to add the named fo:flow to a list of flows mapped to regions.
Child Elements
This element must be empty.
Parent Elements
Attributes
Attribute |
---|
flow-map-reference |
For an example showing the use of the element see Figure 23-7.
fo:flow-target-list
The fo:flow-target-list contains a list of fo:region-name-specifier elements which specify the names of regions which will be assigned by the containing fo:flow-map.
Child Elements
fo:region-name-specifier (one or more)
Parent Elements
For an example showing the use of the element see Figure 23-7.
fo:region-name-specifier
The fo:region-name-specifier has one attribute which specifies the name of a region. This is used in the fo:flow-map element to add the named region to a list of regions mapped to fo:flows.
Child Elements
This element must be empty.
Parent Elements
Attributes
Attribute |
---|
region-name-reference |
For an example showing the use of the element see Figure 23-7.
Block level formatting objects
The objects described in this section are used to contain text and other block-level and inline-level elements.
fo:block
This element is the main container for text content. The simplest block element looks like this:
<fo:block>this is text</fo:block>
The block is a block-level element. The other block-level elements are fo:table , fo:table-and-caption, fo:list-block, and fo:block-container. A block element can contain other block-level elements as well as text. A typical usage would be to insert an empty block into a paragraph of text to cause a line break, like this:
<fo:block>this will be line 1</fo:block>
<fo:block/>
<fo:block>this will be line 2</fo:block>
Another use of nested blocks is to keep two other block-level objects together by using the keep-together attribute on the previous block, like this:
<fo:block keep-together="always">
<fo:block>this will be line 1</fo:block>
<fo:block>this will be line 2</fo:block>
</fo:block>
To keep a block together and prevent it being split by a page break use the keep-together attribute. To keep a block with the block following it use the keep-with-next attribute. To keep a block with the block before it use the keep-with-previous attribute. To format a block of text retaining line-feeds which were in the XML, use the linefeed-treatment attribute. To change the color of text use the color attribute. To align a paragraph to the left, right or both margins use the text-align and text-align-last attributes. A block may contain a fo:retrieve-marker only if the block is inside a fo:static-content element.
Child Elements
fo:basic-link (zero or more)
fo:bidi-override (zero or more)
fo:block (zero or more)
fo:block-container (zero or more)
fo:character (zero or more)
fo:external-graphic (zero or more)
fo:float (one or more, cannot be used inside an out-of-line element)
fo:footnote (one or more, cannot be used inside an out-of-line element)
fo:index-page-citation-list (zero or more)
fo:index-range-begin (one or more, subject to constraints specified for this element)
fo:index-range-end (one or more, subject to constraints specified for this element)
fo:inline (zero or more)
fo:inline-container (zero or more)
fo:instream-foreign-object (zero or more)
fo:leader (zero or more)
fo:list-block (zero or more)
fo:page-number (zero or more)
fo:page-number-citation (zero or more)
fo:page-number-citation-last (zero or more)
fo:retrieve-marker (one or more, subject to constraints specified for this element)
fo:scaling-value-citation (zero or more)
fo:table (zero or more)
fo:table-and-caption (zero or more)
fo:wrapper (one or more, subject to constraints specified for this element)
Parent Elements
Attributes
For an example showing the use of the element see Figure 23-1.
fo:block-container
This element is used to create an area (a "reference area" in the specifications terms) that has a different writing direction or rotation. If you want to achieve other ends such as keeping two blocks together use a fo:block as the container. If you do use reference-orientation to rotate the content to be vertical on the page then you need to specify inline-progression-dimension to limit the vertical height of the content. The block-container element can be used to position content in a location relative to the page or to another block-container by setting the absolute-position attribute. See absolute-positioning for more information.
Child Elements
fo:block (zero or more)
fo:block-container (zero or more)
fo:float (one or more, cannot be used inside an out-of-line element)
fo:index-range-begin (one or more, subject to constraints specified for this element)
fo:index-range-end (one or more, subject to constraints specified for this element)
fo:list-block (zero or more)
fo:retrieve-marker (one or more, subject to constraints specified for this element)
fo:table (zero or more)
fo:table-and-caption (zero or more)
fo:wrapper (one or more, subject to constraints specified for this element)
Parent Elements
Attributes
For an example showing the use of the element see Figure 23-8 .
Inline level formatting objects
The objects described in this section are used directly contain and format text and other inline elements which are usually formatted across the page.
fo:bidi-override
This element is used when the Unicode BIDI algorithm fails to force some text to be written in a specific writing direction.
Child Elements
text
fo:basic-link (zero or more)
fo:bidi-override (zero or more)
fo:block (zero or more)
fo:block-container (zero or more)
fo:character (zero or more)
fo:external-graphic (zero or more)
fo:float (one or more, cannot be used inside an out-of-line element)
fo:footnote (one or more, cannot be used inside an out-of-line element)
fo:index-page-citation-list (zero or more)
fo:index-range-begin (one or more, subject to constraints specified for this element)
fo:index-range-end (one or more, subject to constraints specified for this element)
fo:inline (zero or more)
fo:inline-container (zero or more)
fo:instream-foreign-object (zero or more)
fo:leader (zero or more)
fo:list-block (zero or more)
fo:page-number (zero or more)
fo:page-number-citation (zero or more)
fo:page-number-citation-last (zero or more)
fo:retrieve-marker (one or more, subject to constraints specified for this element)
fo:scaling-value-citation (zero or more)
fo:table (zero or more)
fo:table-and-caption (zero or more)
fo:wrapper (one or more, subject to constraints specified for this element)
Parent Elements
fo:index-page-citation-range-separator
fo:index-page-citation-list-separator
Attributes
fo:character
This element is used to insert a single character into the content. Given that modern XML editors can insert all Unicode characters there is little requirement to use this element.
Child Elements
This element must be empty.
Parent Elements
fo:index-page-citation-range-separator
fo:index-page-citation-list-separator
Attributes
fo:initial-property-set
This element is used to format the first line of a block. It does not create any areas but its attributes are applied to the first line in the block which contains the initial-property-set.
Ibex does not currently implement this functionality
Child Elements
This element must be empty.
Parent Elements
Attributes
For an example showing the use of the element see Figure 23-9 .
fo:external-graphic
This element is used to include an image into the document. This is an inline element so it must be contained in a fo:block element. The image source is defined by the src attribute. The src attribute is called a uri-specification and must follow the following rules: A sequence of characters that is "url(", followed by optional white space, followed by an optional single quote (") or double quote (") character, followed by a URI reference as defined in [RFC2396], followed by an optional single quote (") or double quote (") character, followed by optional white space, followed by ")". The two quote characters must be the same and must both be present or both be absent. If the URI reference contains a single quote, the two quote characters must be present and be double quotes.
This means the following are all valid values for the src attribute: uri(ibex.jpg)
uri("ibex.jpg")
uri("ibex.jpg")
url(http://www.xmlpdf.com/images/download2.gif)
To set the size of the image use the content-height and content-width attributes.
Child Elements
This element must be empty.
Parent Elements
fo:index-page-citation-range-separator
fo:index-page-citation-list-separator
Attributes
For an example showing the use of the element see Figure 23-10.
fo:instream-foreign-object
This element is used to place an object which is contained in the XML into the PDF document. The only supported object type is an SVG image. An example of include an inline SVG image is:
<fo:instream-foreign-object width="20%" height="1cm">
<fo:svg xmlns:fo="http://www.w3.org/TR/xsl/Format" xmlns="http://www.w3.org/2000/svg">
<fo:path style="stroke-width:1;fill:rgb(246,127,0);" d="M204.33 139.83 C196.33 133.33 z"/>
</fo:svg>
</fo:instream-foreign-object>
Child Elements
This element must be empty.
Parent Elements
fo:index-page-citation-range-separator
fo:index-page-citation-list-separator
Attributes
fo:inline
This element is used to format some text in a way which is different to the containing fo:block such as giving it a different font.
Child Elements
text
fo:basic-link (zero or more)
fo:bidi-override (zero or more)
fo:block (zero or more)
fo:block-container (zero or more)
fo:character (zero or more)
fo:external-graphic (zero or more)
fo:float (one or more, cannot be used inside an out-of-line element)
fo:footnote (one or more, cannot be used inside an out-of-line element)
fo:index-page-citation-list (zero or more)
fo:index-range-begin (one or more, subject to constraints specified for this element)
fo:index-range-end (one or more, subject to constraints specified for this element)
fo:inline (zero or more)
fo:inline-container (zero or more)
fo:instream-foreign-object (zero or more)
fo:leader (zero or more)
fo:list-block (zero or more)
fo:page-number (zero or more)
fo:page-number-citation (zero or more)
fo:page-number-citation-last (zero or more)
fo:retrieve-marker (one or more, subject to constraints specified for this element)
fo:scaling-value-citation (zero or more)
fo:table (zero or more)
fo:table-and-caption (zero or more)
fo:wrapper (one or more, subject to constraints specified for this element)
Parent Elements
fo:index-page-citation-range-separator
fo:index-page-citation-list-separator
Attributes
For an example showing the use of the element see Figure 23-9 .
fo:inline-container
This element is used create an inline reference area. Because it can contain block-level elements it can be used to place a block-level element such as a table into a line of text. This can be used to horizontally center the block-level element by centering the inline-container, which being an inline element can be centered using normal text alignment attributes.
Child Elements
fo:block (zero or more)
fo:block-container (zero or more)
fo:float (one or more, cannot be used inside an out-of-line element)
fo:index-range-begin (one or more, subject to constraints specified for this element)
fo:index-range-end (one or more, subject to constraints specified for this element)
fo:list-block (zero or more)
fo:retrieve-marker (one or more, subject to constraints specified for this element)
fo:table (zero or more)
fo:table-and-caption (zero or more)
fo:wrapper (one or more, subject to constraints specified for this element)
Parent Elements
fo:index-page-citation-range-separator
fo:index-page-citation-list-separator
Attributes
fo:leader
This element is used to draw a horizontal line across the page. A simple line is drawn like this:
<fo:block>
<fo:leader leader-pattern="rule" rule-thickness="0.2pt"/>
</fo:block>
The leader can also be drawn between other pieces of text on the same line and can be set to expand to fill available space like this:
<fo:block text-align="justify" text-align-last="justify">
This is before the leader
<fo:leader leader-pattern="rule" rule-thickness="0.2pt"/>
this is after the leader
</fo:block>
producing the effect below. Note the use of text-align-last which is required to justify the single line paragraph. Setting the leader-pattern attribute to "dots" changes the line into dots like this: Setting the leader-pattern attribute to "space" changes the line into spaces like this: The use of leader-pattern = "use-content" is not supported.
Parent Elements
fo:index-page-citation-range-separator
fo:index-page-citation-list-separator
Child Elements
fo:footnote inline
#PCDATA *
fo:float inline
fo:wrapper additional
fo:index-range-begin additional
fo:index-range-end additional
fo:retrieve-marker additional
fo:footnote inline
fo:float inline
fo:wrapper additional
fo:index-range-begin additional
fo:index-range-end additional
fo:retrieve-marker additional
fo:page-number-citation-last *
Attributes
fo:page-number
This element is used to insert the current page number into the document. The page-number string is formatted using the string conversion properties of the containing fo:page-sequence, namely format, grouping-separator, grouping-size, letter-value, country and language.
Child Elements
This element must be empty.
Parent Elements
fo:index-page-citation-range-separator
fo:index-page-citation-list-separator
Attributes
For an example showing the use of the element see Figure 23-11 .
fo:page-number-citation
This element is used to insert the first page number on which the content created by some other element occurs. The page-number string is formatted using the string conversion properties of the containing fo:page-sequence, namely format, grouping-separator, grouping-size, letter-value, country and language. The page-number-citation has a ref-id attribute which should match the id attribute of the element whose page number we want to appear.
Child Elements
This element must be empty.
Parent Elements
fo:index-page-citation-range-separator
fo:index-page-citation-list-separator
Attributes
For an example showing the use of the element see Figure 23-12.
<fo:?xml version='1.0' encoding='UTF-8'?>
<fo:root xmlns="http://www.w3.org/1999/XSL/Format">
<fo:layout-master-set>
<fo:simple-page-master master-name="simple">
<fo:region-body margin="2.5cm" region-name="body"/>
</fo:simple-page-master>
</fo:layout-master-set>
<fo:page-sequence master-reference="simple">
<fo:flow flow-name="body">
<fo:block id='22'>
Hello
</fo:block>
</fo:flow>
</fo:page-sequence>
<fo:page-sequence master-reference="simple">
<fo:flow flow-name="body">
<fo:block>
The block with id='22' starts on page
<fo:page-number-citation ref-id='22'/>
and ends on page
<fo:page-number-citation-last ref-id='22'/>
</fo:block>
</fo:flow>
</fo:page-sequence>
</fo:root>
fo:page-number-citation-last
This element is used to insert the last page number on which the content created by some other element occurs. The page-number string is formatted using the string conversion properties of the containing fo:page-sequence, namely format, grouping-separator, grouping-size, letter-value, country and language. The page-number-citation-last has a ref-id attribute which should match the id attribute of the element whose page number we want to appear.
Parent Elements
fo:index-page-citation-range-separator
fo:index-page-citation-list-separator
Attributes
For an example showing the use of the element see Figure 23-12.
fo:folio-prefix
This element is used create a prefix which appears before the page number (inserted by page-number, page-number-citation and page-number-citation-last).
Child Elements
text
fo:basic-link (zero or more)
fo:bidi-override (zero or more)
fo:character (zero or more)
fo:external-graphic (zero or more)
fo:float (one or more, cannot be used inside an out-of-line element)
fo:footnote (one or more, cannot be used inside an out-of-line element)
fo:index-page-citation-list (zero or more)
fo:index-range-begin (one or more, subject to constraints specified for this element)
fo:index-range-end (one or more, subject to constraints specified for this element)
fo:inline (zero or more)
fo:inline-container (zero or more)
fo:instream-foreign-object (zero or more)
fo:leader (zero or more)
fo:page-number (zero or more)
fo:page-number-citation (zero or more)
fo:page-number-citation-last (zero or more)
fo:retrieve-marker (one or more, subject to constraints specified for this element)
fo:scaling-value-citation (zero or more)
fo:wrapper (one or more, subject to constraints specified for this element)
Parent Elements
fo:folio-suffix
This element is used create a suffix which appears after the page number (inserted by page-number, page-number-citation and page-number-citation-last).
Child Elements
text
fo:basic-link (zero or more)
fo:bidi-override (zero or more)
fo:character (zero or more)
fo:external-graphic (zero or more)
fo:float (one or more, cannot be used inside an out-of-line element)
fo:footnote (one or more, cannot be used inside an out-of-line element)
fo:index-page-citation-list (zero or more)
fo:index-range-begin (one or more, subject to constraints specified for this element)
fo:index-range-end (one or more, subject to constraints specified for this element)
fo:inline (zero or more)
fo:inline-container (zero or more)
fo:instream-foreign-object (zero or more)
fo:leader (zero or more)
fo:page-number (zero or more)
fo:page-number-citation (zero or more)
fo:page-number-citation-last (zero or more)
fo:retrieve-marker (one or more, subject to constraints specified for this element)
fo:scaling-value-citation (zero or more)
fo:wrapper (one or more, subject to constraints specified for this element)
Parent Elements
fo:scaling-value-citation
The image should be identified with an id attribute which has the same value as the ref-id attribute on this element. This element is used to retrieve the amount by which an image was scaled when it was inserted into the PDF file.
Child Elements
This element must be empty.
Parent Elements
fo:index-page-citation-range-separator
fo:index-page-citation-list-separator
Attributes
Formatting objects for tables
The objects described in this section are used to create tables.
fo:table-and-caption
This element is used to create a table which has a caption above or below it, and to keep the table and caption together. By default the caption appears above the table. Set caption-side="bottom" to make the caption appear below the table.
Child Elements
fo:table (zero or more)
fo:table-caption (zero or one)
Parent Elements
Attributes
fo:table
This element creates a table. Tables have rows and columns and possibly also headers and footers. The size of table columns can either be calculated from the content of cells, or specified using fo:table-column elements. Using table-column elements results in consistent output regardless of cell contents. The width and other characteristics of columns are defined using fo:table-column elements. An optional table header, which by default is repeated after each page break, is specified using the fo:table-header element. An optional table footer, which by default is repeated before each page break, is specified using the fo:table-footer element. Table rows are contained in one or more fo:table-body elements. Table borders are controlled using the border-collapse attribute. If this has a value of "collapse" then table and cell borders are collapsed into a single border. If the value is "separate" then table, row and cell borders are all drawn separately, one inside the other. The default value for border-collapse is "collapse". To create the kind of borders used in CSS where the cell borders appears inside the row and table borders set border-collapse to "separate".
Child Elements
fo:table-body (one or more)
fo:table-column (zero or more)
fo:table-footer (zero or one)
fo:table-header (zero or one)
Parent Elements
Attributes
fo:table-column
This element is used to specify characteristics for columns in a table such as the background color and the width. A table would typically have multiple table-column elements looking something like this:
<fo:table>
<fo:table-column column-width="20%"/>
<fo:table-column column-width="30%"/>
<fo:table-column column-width="50%"/>
<fo:table-body>
<fo:table-row>
<fo:table-cell>col 1</fo:table-cell>
<fo:table-cell>col 2</fo:table-cell>
<fo:table-cell>col 3</fo:table-cell>
</fo:table-row>
</fo:table-body>
</fo:table>
This defines a table with three columns. Implicitly the three table-column elements specify the width of columns one, two and three in that order. This can be made explicit using the column-number attribute like this:
<fo:table>
<fo:table-column column-number="1" column-width="20%"/>
<fo:table-column column-number="2" column-width="30%"/>
<fo:table-column column-number="3" column-width="50%"/>
<fo:table-body>
<fo:table-row>
<fo:table-cell>col 1</fo:table-cell>
<fo:table-cell>col 2</fo:table-cell>
<fo:table-cell>col 3</fo:table-cell>
</fo:table-row>
</fo:table-body>
</fo:table>
A single table-column can be used to set the width and other characteristics of multiple columns by using the columns-spanned attribute. In the example below the first table-column sets the width of the first two columns to 20% and the third column to 50%:
<fo:table>
<fo:table-column columns-spanned="2" column-width="20%"/>
<fo:table-column column-width="50%"/>
<fo:table-body>
<fo:table-row>
<fo:table-cell>col 1</fo:table-cell>
<fo:table-cell>col 2</fo:table-cell>
<fo:table-cell>col 3</fo:table-cell>
</fo:table-row>
</fo:table-body>
</fo:table>
Percentage values used in the column-width attribute refer to the width of the table. If table-column elements are not used all columns will be of equal width.
Child Elements
This element must be empty.
Parent Elements
Attributes
fo:table-caption
This element is used to contain block-level formatting objects containing the caption for the table.
It is used as part of a table-and-caption element.
Child Elements
fo:block (zero or more)
fo:block-container (zero or more)
fo:float (one or more, cannot be used inside an out-of-line element)
fo:index-range-begin (one or more, subject to constraints specified for this element)
fo:index-range-end (one or more, subject to constraints specified for this element)
fo:list-block (zero or more)
fo:retrieve-marker (one or more, subject to constraints specified for this element)
fo:table (zero or more)
fo:table-and-caption (zero or more)
fo:wrapper (one or more, subject to constraints specified for this element)
Parent Elements
Attributes
fo:table-header
This element creates a header which appears once at the top of the table and is then repeated after each page break. To prevent this repetition set table-omit-header-at-break to "true" on the containing table. A table-header is itself a table and contains rows and cells in the same manner as fo:table element.
Child Elements
fo:table-cell (zero or more)
fo:table-row (zero or more)
Parent Elements
Attributes
Notes on attributes
As described in section 6.7.6 of the XSL-FO specification, only the background properties from this set apply. If the value of border-collapse on the table is "collapse" or "collapse-with-precedence" the border properties also apply.
fo:table-footer
This element creates a footer which appears once at the bottom of the table and also before each page break. To prevent this repetition set table-omit-footer-at-break to "true" on the containing table. A table-footer is itself a table and contains rows and cells in the same manner as fo:table element.
Child Elements
fo:table-cell (zero or more)
fo:table-row (zero or more)
Parent Elements
Attributes
Notes on attributes
As described in section 6.7.7 of the XSL-FO specification, only the background properties from this set apply. If the value of border-collapse on the table is "collapse" or "collapse-with-precedence" the border properties also apply.
fo:table-body
This element is a container for fo:table-row and fo:table-cell elements. A single fo:table element can contain multiple table-body elements which are output in the order in which they appear in the XML.
Child Elements
fo:table-cell (zero or more)
fo:table-row (zero or more)
Parent Elements
Attributes
Notes on attributes
As described in section 6.7.8 of the XSL-FO specification, only the background properties from this set apply. If the value of border-collapse on the table is "collapse" or "collapse-with-precedence" the border properties also apply.
fo:table-row
This element acts as a container for fo:table-cell elements. Table row elements are not required. A table-body element can contain table-cell elements directly using the starts-row and ends-row attributes on the cells to determine where rows start and end. The height of a row is by default the height of the tallest cell in the row. This can be overridden using the height or block-progression-dimension attributes. Use block-progression-dimension.minimum to set a minimum height, block-progression-dimension.maximum to set a maximum height. Rows cannot have padding. This is stated in section 6.7.9 of the XSL-FO specification.
Child Elements
fo:table-cell (one or more)
Parent Elements
Attributes
fo:table-cell
This element is a container for content in a cell within a table. Cell content is contained in block-level elements within the cell. A common error is to place text directly within the table-cell element, which results in the text being discarded. A table-cell element can contain any number of block level elements. Contents of a cell are aligned vertically using the display-align attribute. To have a cell span mutiple columns use the number-columns-spanned attribute. To span multiple rows use the number-rows-spanned attribute.
Child Elements
fo:block (zero or more)
fo:block-container (zero or more)
fo:float (one or more, cannot be used inside an out-of-line element)
fo:index-range-begin (one or more, subject to constraints specified for this element)
fo:index-range-end (one or more, subject to constraints specified for this element)
fo:list-block (zero or more)
fo:retrieve-marker (one or more, subject to constraints specified for this element)
fo:table (zero or more)
fo:table-and-caption (zero or more)
fo:wrapper (one or more, subject to constraints specified for this element)
Parent Elements
Attributes
Formatting objects for lists
The objects described in this section are used to create lists.
fo:list-block
This element is used to create a list, which is similar to a two column table. A simple list looks like this:
<fo:list-block provisional-distance-between-starts=".5cm" provisional-label-separation="0.1cm">
<fo:list-item>
<fo:list-item-label end-indent="label-end()">
<fo:block font="8pt arial">●</fo:block>
</fo:list-item-label>
<fo:list-item-body start-indent="body-start()">
<fo:block>
item one
</fo:block>
</fo:list-item-body>
</fo:list-item>
<fo:list-item>
<fo:list-item-label end-indent="label-end()">
<fo:block font="8pt arial">●</fo:block>
</fo:list-item-label>
<fo:list-item-body start-indent="body-start()">
<fo:block>
item two
</fo:block>
</fo:list-item-body>
</fo:list-item>
</fo:list-block>
producing the following content: The list is rendered as two columns. The first column is called the label, the second is called the body. The distance from the start of the label column to the start of the body column is set by the provisional-distance-between-starts attribute. The gap between the columns is set by the provisional-label-separation attribute. The width of the label column is therefore:
provisional-distance-between-starts
- provisional-label-separation
Each item in the list is contained in a fo:list-item element. The list-item contains exactly one fo:list-item-label and fo:list-item-body element, with the fo:list-item-label coming first. The fo:list-item-label should always have its end-indent attribute set to "label-end()" which is a function returning a value calculated from the provisional-distance-between-starts and provisional-label-separation attributes. If the end-indent is not so specified the label column will overlap the body column. The fo:list-item-body should always have its start-indent attribute set to "body-start()" which is a function returning a value calculated from the provisional-distance-between-starts and provisional-label-separation attributes. If the start-indent is not so specified the label column will overlap the body column.
Child Elements
Parent Elements
Attributes
fo:list-item
This element contains the label and body of an entry in a list. The height of the list-item will be the taller of the label and body items it contains.
Child Elements
fo:list-item-body (exactly one)
fo:list-item-label (exactly one)
Parent Elements
Attributes
For an example showing the use of the element see Figure 23-13.
fo:list-item-body
This element contains the body part of a list item. The list-item-body contains block-level elements, it does not itself contain text.
Child Elements
fo:block (zero or more)
fo:block-container (zero or more)
fo:float (one or more, cannot be used inside an out-of-line element)
fo:index-range-begin (one or more, subject to constraints specified for this element)
fo:index-range-end (one or more, subject to constraints specified for this element)
fo:list-block (zero or more)
fo:retrieve-marker (one or more, subject to constraints specified for this element)
fo:table (zero or more)
fo:table-and-caption (zero or more)
fo:wrapper (one or more, subject to constraints specified for this element)
Parent Elements
Attributes
Attribute |
---|
id |
index-class |
index-key |
keep-together |
For an example showing the use of the element see Figure 23-13.
fo:list-item-label
This element contains the label part of a list item. The list-item-label contains block-level elements, it does not itself contain text. The fo:list-item-label should always have its end-indent attribute set to "label-end()" which is a function returning a value calculated from the provisional-distance-between-starts and provisional-label-separation attributes. If the end-indent is not so specified the label column will overlap the body column. The fo:list-item-body should always have its start-indent attribute set to "body-start()" which is a function returning a value calculated from the provisional-distance-between-starts and provisional-label-separation attributes. If the start-indent is not so specified the label column will overlap the body column.
Child Elements
fo:block (zero or more)
fo:block-container (zero or more)
fo:float (one or more, cannot be used inside an out-of-line element)
fo:index-range-begin (one or more, subject to constraints specified for this element)
fo:index-range-end (one or more, subject to constraints specified for this element)
fo:list-block (zero or more)
fo:retrieve-marker (one or more, subject to constraints specified for this element)
fo:table (zero or more)
fo:table-and-caption (zero or more)
fo:wrapper (one or more, subject to constraints specified for this element)
Parent Elements
Attributes
Attribute |
---|
id |
index-class |
index-key |
keep-together |
For an example showing the use of the element see Figure 23-13.
Dynamic effects: link and multi formatting objects
The objects described in this section are used to create links and dynamic content. As most of the elements in this section relate to dynamic content, which is not applicable to PDF, only basic-link is implemented.
fo:basic-link
This element is used to create a link in the PDF document, either to an external URL or to another location in the document.
Child Elements
text
fo:basic-link (zero or more)
fo:bidi-override (zero or more)
fo:block (zero or more)
fo:block-container (zero or more)
fo:character (zero or more)
fo:external-graphic (zero or more)
fo:float (one or more, cannot be used inside an out-of-line element)
fo:footnote (one or more, cannot be used inside an out-of-line element)
fo:index-page-citation-list (zero or more)
fo:index-range-begin (one or more, subject to constraints specified for this element)
fo:index-range-end (one or more, subject to constraints specified for this element)
fo:inline (zero or more)
fo:inline-container (zero or more)
fo:instream-foreign-object (zero or more)
fo:leader (zero or more)
fo:list-block (zero or more)
fo:page-number (zero or more)
fo:page-number-citation (zero or more)
fo:page-number-citation-last (zero or more)
fo:retrieve-marker (one or more, subject to constraints specified for this element)
fo:scaling-value-citation (zero or more)
fo:table (zero or more)
fo:table-and-caption (zero or more)
fo:wrapper (one or more, subject to constraints specified for this element)
Parent Elements
fo:index-page-citation-range-separator
fo:index-page-citation-list-separator
Attributes
Formatting objects for bookmarks
The objects described in this section are used to create bookmarks which link to parts of the document and appear in a tree structure.
fo:bookmark-tree
This is the top level element in a tree of bookmarks, used to create the bookmark entries displayed on the right side in a PDF viewer.
Child Elements
fo:bookmark (zero or more)
Parent Elements
Attributes
Attribute |
---|
starting-state |
For an example showing the use of the element see Figure 23-14.
<fo:bookmark-tree>
<fo:bookmark internal-destination="section-1">
<fo:bookmark-title>Chapter 1</fo:bookmark-title>
<fo:bookmark internal-destination="section-1-1">
<fo:bookmark-title>Section 1</fo:bookmark-title>
</fo:bookmark>
<fo:bookmark internal-destination="section-1-2">
<fo:bookmark-title>Section 2</fo:bookmark-title>
</fo:bookmark>
</fo:bookmark>
<fo:bookmark internal-destination="section-2">
<fo:bookmark-title>Chapter 2</fo:bookmark-title>
<fo:bookmark internal-destination="section-2-1">
<fo:bookmark-title>Section 1</fo:bookmark-title>
</fo:bookmark>
</fo:bookmark>
</fo:bookmark-tree>
fo:bookmark
This creates a single bookmark which links to a place in the PDF file. The destination in the PDF file is created by giving some formatting object an id attribute, then setting the internal-destination attribute on the bookmark to the value specified in the destination id.
Child Elements
fo:bookmark (zero or more)
fo:bookmark-title (exactly one)
Parent Elements
Attributes
Attribute |
---|
internal-destination |
starting-state |
For an example showing the use of the element see Figure 23-14.
fo:bookmark-title
This element holds the text for a fo:bookmark entry.
Parent Elements
For an example showing the use of the element see Figure 23-14.
Out-of-line formatting objects
The objects described in this section are used to create floats and footnotes.
fo:float
This element is used to position content either (a) at the top of a page or (b) to the side of a page so that text flows around it.
Child Elements
fo:block (zero or more)
fo:block-container (zero or more)
fo:float (one or more, cannot be used inside an out-of-line element)
fo:index-range-begin (one or more, subject to constraints specified for this element)
fo:index-range-end (one or more, subject to constraints specified for this element)
fo:list-block (zero or more)
fo:retrieve-marker (one or more, subject to constraints specified for this element)
fo:table (zero or more)
fo:table-and-caption (zero or more)
fo:wrapper (one or more, subject to constraints specified for this element)
Parent Elements
fo:index-page-citation-range-separator
fo:index-page-citation-list-separator
Attributes
Attribute |
---|
float |
clear |
id |
index-class |
index-key |
For an example showing the use of the element see Figure 23-15.
<fo:block>
<fo:float float="start">
<fo:block-container inline-progression-dimension="3cm" padding="5mm">
<fo:block padding="2mm" space-before.conditionality="retain" border="1pt solid
white" width="2cm">
<fo:block padding-left="2mm">
<fo:external-graphic src="url(ibexorange.jpg)" content-width='50%'/>
</fo:block>
</fo:block>
</fo:block-container>
</fo:float>
<fo:block padding-top="2mm" padding-bottom='2mm' space-before="9pt" font="10pt
'minion regular'">
This text should appear to the right of the image until we pass the bottom of the
image
and then appear below the image as well.
</fo:block>
<fo:block font="10pt 'minion regular'">
We have lots of text here just to show that it will be formatted in the correct way
and eventually
there will be enough text to go past the image and appear below it on the page. Then
we will have some
XML which shows how to acheive this effect.
We have lots of text here just to show that it will be formatted in the correct way
and eventually
there will be enough text to go past the image and appear below it on the page. Then
we will have some
XML which shows how to acheive this effect.
We have lots of text here just to show that it will be formatted in the correct way
and eventually
there will be enough text to go past the image and appear below it on the page. Then
we will have some
XML which shows how to acheive this effect.
</fo:block>
</fo:block>
fo:footnote
This element is used to insert a footnote which will appear at the bottom of the region. The footnote contains an inline which is the anchor and is position in the containing block at the point the footnote occurs. The contents of the fo:footnote-body are move out of line to the end of the region.
Child Elements
fo:footnote-body (exactly one)
fo:inline (exactly one)
Parent Elements
fo:index-page-citation-range-separator
fo:index-page-citation-list-separator
Attributes
Attribute |
---|
id |
index-class |
index-key |
fo:footnote-body
This element is used to insert a the content of a footnote which will appear at the bottom of the region.
Child Elements
fo:block (zero or more)
fo:block-container (zero or more)
fo:float (one or more, cannot be used inside an out-of-line element)
fo:index-range-begin (one or more, subject to constraints specified for this element)
fo:index-range-end (one or more, subject to constraints specified for this element)
fo:list-block (zero or more)
fo:retrieve-marker (one or more, subject to constraints specified for this element)
fo:table (zero or more)
fo:table-and-caption (zero or more)
fo:wrapper (one or more, subject to constraints specified for this element)
Parent Elements
Attributes
Attribute |
---|
id |
index-class |
index-key |
Formatting objects for indexing
These objects are used in creating an index at the end of a document.
fo:index-page-number-prefix
This element is used to specify a prefix for page numbers created using an fo:index-key-reference element.
Child Elements
text
fo:basic-link (zero or more)
fo:bidi-override (zero or more)
fo:character (zero or more)
fo:external-graphic (zero or more)
fo:float (one or more, cannot be used inside an out-of-line element)
fo:footnote (one or more, cannot be used inside an out-of-line element)
fo:index-page-citation-list (zero or more)
fo:index-range-begin (one or more, subject to constraints specified for this element)
fo:index-range-end (one or more, subject to constraints specified for this element)
fo:inline (zero or more)
fo:inline-container (zero or more)
fo:instream-foreign-object (zero or more)
fo:leader (zero or more)
fo:page-number (zero or more)
fo:page-number-citation (zero or more)
fo:page-number-citation-last (zero or more)
fo:retrieve-marker (one or more, subject to constraints specified for this element)
fo:scaling-value-citation (zero or more)
fo:wrapper (one or more, subject to constraints specified for this element)
Parent Elements
fo:index-page-number-suffix
This element is used to specify a suffix for page numbers created using an fo:index-key-reference element.
Child Elements
text
fo:basic-link (zero or more)
fo:bidi-override (zero or more)
fo:character (zero or more)
fo:external-graphic (zero or more)
fo:float (one or more, cannot be used inside an out-of-line element)
fo:footnote (one or more, cannot be used inside an out-of-line element)
fo:index-page-citation-list (zero or more)
fo:index-range-begin (one or more, subject to constraints specified for this element)
fo:index-range-end (one or more, subject to constraints specified for this element)
fo:inline (zero or more)
fo:inline-container (zero or more)
fo:instream-foreign-object (zero or more)
fo:leader (zero or more)
fo:page-number (zero or more)
fo:page-number-citation (zero or more)
fo:page-number-citation-last (zero or more)
fo:retrieve-marker (one or more, subject to constraints specified for this element)
fo:scaling-value-citation (zero or more)
fo:wrapper (one or more, subject to constraints specified for this element)
Parent Elements
fo:index-range-begin
This element is used to indicate the start of a range of content which has an associated index key. The index will typically contain the range of page numbers between an fo:index-range-begin and an fo:index-range-end. An fo:index-range-begin/fo:index-range-end pair match if the ref-id property of the fo:index-range-end has the same value as the id property on the fo:index-range-begin.
Child Elements
This element must be empty.
Parent Elements
fo:index-page-citation-range-separator
fo:index-page-citation-list-separator
Attributes
Attribute |
---|
id |
index-class |
index-key |
fo:index-range-end
This element is used to indicate the end of a range of content which has an associated index key. The index will typically contain the range of page numbers between an fo:index-range-begin and an fo:index-range-end. An fo:index-range-begin/fo:index-range-end pair match if the ref-id property of the fo:index-range-end has the same value as the id property on the fo:index-range-begin.
Child Elements
This element must be empty.
Parent Elements
fo:index-page-citation-range-separator
fo:index-page-citation-list-separator
Attributes
Attribute |
---|
ref-id |
fo:index-key-reference
This element is used in the index creation process to insert a set of page numbers for all occurrences of the specified index-key.
The child fo:index-page-number-prefix and fo:index-page-number-suffix elements specify content which will appear before and after the page numbers. This is how you would create page numbers like [20].
Child Elements
fo:index-page-number-prefix (zero or one)
fo:index-page-number-suffix (zero or one)
Parent Elements
Attributes
Attribute |
---|
page-number-treatment |
ref-index-key |
fo:index-page-citation-list
This element is used in the index creation process to group set of page numbers in the index.
Child Elements
fo:index-key-reference (one or more)
fo:index-page-citation-list-separator (zero or one)
fo:index-page-citation-range-separator (zero or one)
Parent Elements
Attributes
Attribute |
---|
merge-sequential-page-numbers |
merge-ranges-across-index-key-references |
merge-pages-across-index-key-references |
Other formatting objects
fo:change-bar-begin
This element marks the start of a change region, and causes a change bar to be drawn on the side of the containing region from the point this element occurs to the location of the matching fo:change-bar-end element.
Child Elements
This element must be empty.
Parent Elements
Attributes
Attribute |
---|
change-bar-class |
change-bar-color |
change-bar-offset |
change-bar-placement |
change-bar-style |
z-index |
fo:change-bar-end
This element marks the end of a change region, and causes a change bar to be drawn on the side of the containing region from the location of the matching fo:change-bar-begin this element of this element.
Child Elements
This element must be empty.
Parent Elements
Attributes
Attribute |
---|
change-bar-class |
change-bar-color |
change-bar-offset |
change-bar-placement |
change-bar-style |
z-index |
fo:wrapper
This element is used to specify inherited attributes for the elements it contains.
Child Elements
text
fo:basic-link (zero or more)
fo:bidi-override (zero or more)
fo:block (zero or more)
fo:block-container (zero or more)
fo:character (zero or more)
fo:external-graphic (zero or more)
fo:float (one or more, cannot be used inside an out-of-line element)
fo:footnote (one or more, cannot be used inside an out-of-line element)
fo:index-page-citation-list (zero or more)
fo:index-range-begin (one or more, subject to constraints specified for this element)
fo:index-range-end (one or more, subject to constraints specified for this element)
fo:inline (zero or more)
fo:inline-container (zero or more)
fo:instream-foreign-object (zero or more)
fo:leader (zero or more)
fo:list-block (zero or more)
fo:page-number (zero or more)
fo:page-number-citation (zero or more)
fo:page-number-citation-last (zero or more)
fo:retrieve-marker (one or more, subject to constraints specified for this element)
fo:scaling-value-citation (zero or more)
fo:table (zero or more)
fo:table-and-caption (zero or more)
fo:wrapper (one or more, subject to constraints specified for this element)
Parent Elements
fo:index-page-citation-range-separator
fo:index-page-citation-list-separator
Attributes
Attribute |
---|
id |
index-class |
index-key |
fo:marker
This element contains some content which will be retrieved elsewhere in the document using a fo:retrieve-marker element. Typically marker is used to set some piece of text such as the current chapter title which is then retrieved within a fo:static-content element for placing in the page header. The Ibex manual uses this technique to place the current chapter name in the top right corner of most pages. An marker cannot be used in fo:static-content elements, and a fo:retrieve-marker can be used only in fo:static-content elements. An marker uses the marker-class-name attribute to group markers which have a common purpose. The fo:retrieve-marker element has some attributes to specify which marker should be retrieved, such as the first or last one in the document or the first or last one on that page.
Child Elements
text
fo:basic-link (zero or more)
fo:bidi-override (zero or more)
fo:block (zero or more)
fo:block-container (zero or more)
fo:character (zero or more)
fo:external-graphic (zero or more)
fo:float (one or more, cannot be used inside an out-of-line element)
fo:footnote (one or more, cannot be used inside an out-of-line element)
fo:index-page-citation-list (zero or more)
fo:index-range-begin (one or more, subject to constraints specified for this element)
fo:index-range-end (one or more, subject to constraints specified for this element)
fo:inline (zero or more)
fo:inline-container (zero or more)
fo:instream-foreign-object (zero or more)
fo:leader (zero or more)
fo:list-block (zero or more)
fo:page-number (zero or more)
fo:page-number-citation (zero or more)
fo:page-number-citation-last (zero or more)
fo:retrieve-marker (one or more, subject to constraints specified for this element)
fo:scaling-value-citation (zero or more)
fo:table (zero or more)
fo:table-and-caption (zero or more)
fo:wrapper (one or more, subject to constraints specified for this element)
Parent Elements
Attributes
Attribute |
---|
marker-class-name |
For an example showing the use of the element see Figure 23-16.
fo:retrieve-marker
The fo:marker element contains some content which will be retrieved elsewhere in the document using a retrieve-marker element. Typically marker is used to set some piece of text such as the current chapter title which is then retrieved within a fo:static-content element for placing in the page header. The Ibex manual uses this technique to place the current chapter subject in the footer. The fo:marker element cannot be used in fo:static-content elements and the retrieve-marker element can be used only in fo:static-content elements. An fo:marker uses the marker-class-name attribute to group markers which have a common purpose. The retrieve-marker element has some attributes to specify which marker should be retrieved, such as the first or last one in the document or the first or last one on that page. For the retrieve-marker element to work its retrieve-class-name attribute must have the same value as the maker-class-name attribute used on some fo:marker element.
Child Elements
This element must be empty.
Parent Elements
fo:index-page-citation-range-separator
fo:index-page-citation-list-separator
Attributes
Attribute |
---|
retrieve-class-name |
retrieve-position |
retrieve-boundary |
For an example showing the use of the element see Figure 23-16.
fo:retrieve-table-marker
The fo:marker element contains some content which will be retrieved elsewhere in the document using a retrieve-table-marker or retrieve-marker element. The retrieve-table-marker element is used inside a table-header or table-footer to specify a marker whose content will be retrieved. This is described in detail on page continuation-markers For the retrieve-marker element to work its retrieve-class-name attribute must have the same value as the maker-class-name attribute used on some fo:marker element.
Child Elements
This element must be empty.
Parent Elements
Attributes
Attribute |
---|
retrieve-class-name |
retrieve-position-within-table |
retrieve-boundary-within-table |
For an example showing the use of the element see Figure 23-16.
Attributes
absolute-position
Default value: "auto"
Value | Notes |
---|---|
auto | |
absolute | |
fixed | |
inherit |
alignment-adjust
This is used on a formatting objects to help explicitly determine the baseline for objects such as images which do not have a baseline.
Default value: "auto"
alignment-baseline
This is used to specify which baseline an object should be aligned on. See page baseline for a discussion of baselines. Default value: "auto"
Value | Notes |
---|---|
inherit | |
auto | |
baseline | |
before-edge | |
text-before-edge | |
central | |
middle | |
after-edge | |
text-after-edge | |
ideographic | |
alphabetic | |
hanging | |
mathematical |
allowed-height-scale
Sets possible scaling values for images. Not used in PDF creation.
Default value: "any"
allowed-width-scale
Sets possible scaling values for images. Not used in PDF creation.
Default value: "any"
background-attachment
Specifies whether background images scroll nor not. Not used in PDF creation.
Default value: "any"
background-color
Sets the background color for the element. Default value: "transparent"
Value | Notes |
---|---|
<color> | A color such as 'red', 'blue' etc. or an RGB color such as '#445566' or a CMYK color defined using the rgb-icc color. |
transparent | |
inherit |
background-image
Specifies a URL for an image to be displayed in the background of an element. See page Images for an example. Default value: "none"
background-position-horizontal
Specifies the initial horizontal position of a background image. See page Images for an example. Default value: "0%"
background-position-vertical
Specifies the initial vertical position of a background image. See page Images for an example. Default value: "0%"
background-repeat
Specifies if a background image should be repeated when it is smaller than the containing area. See page Images for an example. Default value: "repeat"
Value | Notes |
---|---|
repeat | The image is repeated horizontally and vertically |
repeat-x | The image is repeated horizontally only |
repeat-y | The image is repeated vertically only |
no-repeat | The image is not repeated |
baseline-shift
Specifies the amount by which text in an inline should be shifted from the baseline. This is used to create subscript and superscript text. See page subscript for an example. Default value: "baseline"
Value | Notes |
---|---|
baseline | Text is not shifted |
sub | Text is lowered by an amount read from the font file |
super | Text is raised by an amount read from the font file |
percentage | Text is raised or lowered by a percentage of the current font size |
length | Text is raised or lowered by the specified amount |
blank-or-not-blank
This is used on a repeatable-page-master-alternative to specify whether the page master should be selected when the current page is blank. The current page will be blank if an extra page is being generated in a page sequence because it must have an odd or even number of pages, or because the following page sequence must start on an odd or even page.
Default value: "any"
Value | Notes |
---|---|
any | |
blank | |
not-blank | Text is raised by an amount read from the font file |
block-progression-dimension
Sets the dimension of content in the block progression direction, which for a non-rotated page is down the page. The content of an element excludes padding and borders. This means an element with block-progression-dimension="3cm" and border=".25cm" will have a height including borders and padding of 3.5cm. Can be set as a single value such as:
block-progression-dimension="20cm"
or you can specify minimum and maximum values like this:
block-progression-dimension.minimum="5cm"
block-progression-dimension.maximum="25cm"
Default value: "auto"
Value | Notes |
---|---|
auto | |
<length> | A length such as '10cm'. Valid units are pt (points) cm (centimetres) in (inches) mm (millimetres) em (current font size in points). |
<percentage> | A percentage such as "10%". The value is calculated as a percentage of the parent elements height |
<length-range> | The value has three sub-components, namely minimim, optimum and maximum. Each of these can be set to a |
inherit |
border
Sets the border for all four sides of an element to the same value. Any of the values listed can be combined, for example you can have:
border="12pt solid red"
Default value: Shorthand properties do not have default values. See individual properties for their default values.
Value | Notes |
---|---|
<color> | A color such as 'red', 'blue' etc. or an RGB color such as '#445566' or a CMYK color defined using the rgb-icc color. |
<border-width> | thin|medium|thick|<length> |
<border-style> | none|solid|double|dashed|dotted|inset|outset|ridge |
inherit |
border-after-color
Sets the "after" border color, which for a non-rotated object is the bottom one. For example:
border-after-color="red"
Default value: "the value of the color property"
Value | Notes |
---|---|
<color> | A color such as 'red', 'blue' etc. or an RGB color such as '#445566' or a CMYK color defined using the rgb-icc color. |
inherit |
border-after-style
Sets the "after" border style, which for a non-rotated object is the bottom one. For example:
border-after-style="solid"
Default value: "none"
Value | Notes |
---|---|
<border-style> | none|solid|double|dashed|dotted|inset|outset|ridge |
inherit |
border-after-width
Sets the "after" border width, which for a non-rotated object is the bottom one. For example:
border-after-width="1pt"
Default value: "medium"
Value | Notes |
---|---|
<border-width> | thin|medium|thick|<length> |
<length-conditional> | .retain |
inherit |
border-before-color
Sets the "before" border color, which for a non-rotated object is the top one. For example:
border-before-color="red"
Default value: "the value of the color property"
Value | Notes |
---|---|
<color> | A color such as 'red', 'blue' etc. or an RGB color such as '#445566' or a CMYK color defined using the rgb-icc color. |
inherit |
border-before-style
Sets the "before" border style, which for a non-rotated object is the top one. For example:
border-before-style="solid"
Default value: "none"
Value | Notes |
---|---|
<border-style> | none|solid|double|dashed|dotted|inset|outset|ridge |
inherit |
border-before-width
Sets the "before" border width, which for a non-rotated object is the top one. For example:
border-before-width="1pt"
Default value: "medium"
Value | Notes |
---|---|
<border-width> | thin|medium|thick|<length> |
<length-conditional> | .retain |
inherit |
border-bottom
Sets the color, width and style of the bottom border of an element. A shorthand way of setting border-bottom-color, border-bottom-width and border-bottom-style. Any of the values listed can be combined, for example you can have:
border-bottom="12pt solid red"
Default value: Shorthand properties do not have default values. See individual properties for their default values.
Value | Notes |
---|---|
<color> | A color such as 'red', 'blue' etc. or an RGB color such as '#445566' or a CMYK color defined using the rgb-icc color. |
<border-width> | thin|medium|thick|<length> |
<border-style> | none|solid|double|dashed|dotted|inset|outset|ridge |
inherit |
border-bottom-color
Sets the bottom border color. For example:
border-bottom-color="red"
Default value: "the value of the color property"
Value | Notes |
---|---|
<color> | A color such as 'red', 'blue' etc. or an RGB color such as '#445566' or a CMYK color defined using the rgb-icc color. |
inherit |
border-bottom-style
Sets the bottom border style. For example:
border-bottom-style="solid"
Default value: "none"
Value | Notes |
---|---|
<border-style> | none|solid|double|dashed|dotted|inset|outset|ridge |
inherit |
border-bottom-width
Sets the bottom border width. For example:
border-bottom-width="1pt"
Default value: "medium"
Value | Notes |
---|---|
<border-width> | thin|medium|thick|<length> |
<length-conditional> | .retain |
inherit |
border-collapse
Controls whether borders on adjacent rows, cells and table elements are collapsed into a single border or remain separate. Default value: "collapse"
Value | Notes |
---|---|
collapse | borders are collapsed. Precedence rules are evaluated to see which borders take precedence. |
collapse-with-precedence | borders are collapsed. Precedence rules are evaluated to see which borders take precedence. In addition the border-precedence attribute can be used to change the precedence rules. |
separate | borders are not collapsed. Only cell and table borders are considered, borders on all other elements are ignored. |
inherit |
border-color
Sets the border color for all four sides of an element to the same color or to a number of different colors. To set all borders to the same color use a single value like this:
border-color="red"
If there are two values the top and bottom borders are set to the first value and the side borders are set to the second, like this:
border-color="red blue"
If there are three values the top border is set to the first value, the side borders are set to the second, and the bottom is set to the third like this:
border-color="red blue green"
If there are four values the top border is set to the first value, the right border is set to the second, the bottom is set to the third and the left is set to the forth (so clockwise from the top) like this:
border-color="red blue green black"
Default value: Shorthand properties do not have default values. See individual properties for their default values.
Value | Notes |
---|---|
<color> | A color such as 'red', 'blue' etc. or an RGB color such as '#445566' or a CMYK color defined using the rgb-icc color. |
transparent | |
inherit |
border-end-color
Sets the end border color (the right side of a non-rotated page). For example:
border-end-color="red"
Default value: "the value of the color property"
Value | Notes |
---|---|
<color> | A color such as 'red', 'blue' etc. or an RGB color such as '#445566' or a CMYK color defined using the rgb-icc color. |
inherit |
border-end-style
Sets the end border style (the right side of a non-rotated page). For example:
border-end-style="solid"
Default value: "none"
Value | Notes |
---|---|
<border-style> | none|solid|double|dashed|dotted|inset|outset|ridge |
inherit |
border-end-width
Sets the end border width (the right side of a non-rotated page). For example:
border-end-width="1pt"
Default value: "medium"
Value | Notes |
---|---|
<border-width> | thin|medium|thick|<length> |
<length-conditional> | .retain |
inherit |
border-left
Sets the color, width and style of the left border of an element. A shorthand way of setting border-left-color, border-left-width and border-left-style. Any of the values listed can be combined, for example you can have:
border-left="12pt solid red"
Default value: Shorthand properties do not have default values. See individual properties for their default values.
Value | Notes |
---|---|
<color> | A color such as 'red', 'blue' etc. or an RGB color such as '#445566' or a CMYK color defined using the rgb-icc color. |
<border-width> | thin|medium|thick|<length> |
<border-style> | none|solid|double|dashed|dotted|inset|outset|ridge |
inherit |
border-left-color
Sets the left border color. For example:
border-left-color="red"
Default value: "the value of the color property"
Value | Notes |
---|---|
<color> | A color such as 'red', 'blue' etc. or an RGB color such as '#445566' or a CMYK color defined using the rgb-icc color. |
inherit |
border-left-style
Sets the left border style. For example:
border-left-style="solid"
Default value: "none"
Value | Notes |
---|---|
<border-style> | none|solid|double|dashed|dotted|inset|outset|ridge |
inherit |
border-left-width
Sets the left border width. For example:
border-left-width="1pt"
Default value: "medium"
Value | Notes |
---|---|
<border-width> | thin|medium|thick|<length> |
<length-conditional> | .retain |
inherit |
border-right
Sets the color, width and style of the right border of an element. A shorthand way of setting border-right-color, border-right-width and border-right-style. Any of the values listed can be combined, for example you can have:
border-right="12pt solid red"
Default value: Shorthand properties do not have default values. See individual properties for their default values.
Value | Notes |
---|---|
<color> | A color such as 'red', 'blue' etc. or an RGB color such as '#445566' or a CMYK color defined using the rgb-icc color. |
<border-width> | thin|medium|thick|<length> |
<border-style> | none|solid|double|dashed|dotted|inset|outset|ridge |
inherit |
border-right-color
Sets the right border color. For example:
border-right-color="red"
Default value: "the value of the color property"
Value | Notes |
---|---|
<color> | A color such as 'red', 'blue' etc. or an RGB color such as '#445566' or a CMYK color defined using the rgb-icc color. |
inherit |
border-right-style
Sets the right border style. For example:
border-right-style="solid"
Default value: "none"
Value | Notes |
---|---|
<border-style> | none|solid|double|dashed|dotted|inset|outset|ridge |
inherit |
border-right-width
Sets the right border width. For example:
border-right-width="1pt"
Default value: "medium"
Value | Notes |
---|---|
<border-width> | thin|medium|thick|<length> |
<length-conditional> | .retain |
inherit |
border-separation
Sets the separation between cell borders in a table with border-collapse="separate". To set both horizontal and vertical separation the same use:
border-separation="3pt"
To set horizontal and vertical separation to different values use the inline-progression-dimension and block-progression-dimension components like this:
border-separation.inline-progression-dimension="3pt"
border-separation.block-progression-dimension="10pt"
For a non-rotated page block-progression-dimension is down the page and inline-progression-dimension is across. Default value: "0pt"
Value | Notes |
---|---|
<length> | A length such as '10cm'. Valid units are pt (points) cm (centimetres) in (inches) mm (millimetres) em (current font size in points). |
inherit |
border-spacing
This is a shorthand method of setting the border-separation attribute. To set both horizontal and vertical separation the same use:
border-spacing="3pt"
To set horizontal and vertical separation to different values use two values separated by a space like this:
border-spacing="3mm 13mm"
The first value sets the horizontal spacing, the second sets the vertical spacing.
Default value: "0pt"
Value | Notes |
---|---|
<length> | A length such as '10cm'. Valid units are pt (points) cm (centimetres) in (inches) mm (millimetres) em (current font size in points). |
inherit |
border-start-color
Sets the start border color (the left side of a non-rotated page). For example:
border-start-color="red"
Default value: "the value of the color property"
Value | Notes |
---|---|
<color> | A color such as 'red', 'blue' etc. or an RGB color such as '#445566' or a CMYK color defined using the rgb-icc color. |
inherit |
border-start-style
Sets the start border style (the left side of a non-rotated page). For example:
border-start-style="solid"
Default value: "none"
Value | Notes |
---|---|
<border-style> | none|solid|double|dashed|dotted|inset|outset|ridge |
inherit |
border-start-width
Sets the start border width (the left side of a non-rotated page). For example:
border-start-width="1pt"
Default value: "medium"
Value | Notes |
---|---|
<border-width> | thin|medium|thick|<length> |
<length-conditional> | .retain |
inherit |
border-style
Sets the border style for all four sides of an element to the same style or to a number of different styles. To set all borders to the same style use a single value like this:
border-style="solid"
If there are two values the top and bottom borders are set to the first value and the side borders are set to the second, like this:
border-style="solid none"
If there are three values the top border is set to the first value, the side borders are set to the second, and the bottom is set to the third like this:
border-style="solid none double"
If there are four values the top border is set to the first value, the right border is set to the second, the bottom is set to the third and the left is set to the forth (so clockwise from the top) like this:
border-style="solid none double dotted"
Default value: Shorthand properties do not have default values. See individual properties for their default values.
Value | Notes |
---|---|
<border-style> | none|solid|double|dashed|dotted|inset|outset|ridge |
transparent | |
inherit |
border-top
Sets the color, width and style of the top border of an element. A shorthand way of setting border-top-color, border-top-width and border-top-style. Any of the values listed can be combined, for example you can have:
border-top="12pt solid red"
Default value: Shorthand properties do not have default values. See individual properties for their default values.
Value | Notes |
---|---|
<color> | A color such as 'red', 'blue' etc. or an RGB color such as '#445566' or a CMYK color defined using the rgb-icc color. |
<border-width> | thin|medium|thick|<length> |
<border-style> | none|solid|double|dashed|dotted|inset|outset|ridge |
inherit |
border-top-color
Sets the top border color. For example:
border-top-color="red"
Default value: "the value of the color property"
Value | Notes |
---|---|
<color> | A color such as 'red', 'blue' etc. or an RGB color such as '#445566' or a CMYK color defined using the rgb-icc color. |
inherit |
border-top-style
Sets the top border style. For example:
border-top-style="solid"
Default value: "none"
Value | Notes |
---|---|
<border-style> | none|solid|double|dashed|dotted|inset|outset|ridge |
inherit |
border-top-width
Sets the top border width. For example:
border-top-width="1pt"
Default value: "medium"
Value | Notes |
---|---|
<border-width> | thin|medium|thick|<length> |
<length-conditional> | .retain |
inherit |
border-width
Sets the border width for all four sides of an element to the same width or to a number of different widths. To set all borders to the same width use a single value like this:
border-width="1pt"
If there are two values the top and bottom borders are set to the first value and the side borders are set to the second, like this:
border-width="1pt 3pt"
If there are three values the top border is set to the first value, the side borders are set to the second, and the bottom is set to the third like this:
border-width="1pt 2pt 3pt"
If there are four values the top border is set to the first value, the right border is set to the second, the bottom is set to the third and the left is set to the forth (so clockwise from the top) like this:
border-width="1pt 2pt 3pt 4pt"
Default value: Shorthand properties do not have default values. See individual properties for their default values.
Value | Notes |
---|---|
<border-width> | thin|medium|thick|<length> |
transparent | |
inherit |
bottom
This is used for absolutely and relatively positioned elements only. It sets the distance from the bottom edge of the containing element to the bottom edge of this element. Default value: "auto"
break-after
Use this element to insert a page break after this element. Default value: "auto"
Value | Notes |
---|---|
auto | |
column | |
page | A page break will occur after this element. |
inherit |
break-before
Use this element to insert a page break before this element. Default value: "auto"
Value | Notes |
---|---|
auto | |
column | |
page | A page break will occur before this element. |
inherit |
caption-side
This is used on a table-and-caption to specify on which side of the table the caption appears.
Default value: "before"
Value | Notes |
---|---|
before | |
after | |
start | |
end | |
top | |
bottom | |
left | |
right | |
inherit |
character
This attribute sets the character to be inserted by a fo:character element. For instance to insert the character "A" into the content you would use an fo:character element like this:
<fo:character character="A"/>
Default value: This attribute has no default value, you must provide a value.
clear
This is used on an element to specify that it may not be placed next to a float element on one or both sides.
Default value: "none"
Value | Notes |
---|---|
left | |
right | |
both | |
none | |
inherit |
clip
Not used in PDF creation.
Default value: "auto"
color
This sets the foreground color of text. Default value: "inherited from parent"
Value | Notes |
---|---|
<color> | A color such as 'red', 'blue' etc. or an RGB color such as '#445566' or a CMYK color defined using the rgb-icc color. |
color-profile-name
This is used in specifying color profiles for PDF/X documents. The value must be set to "cmyk". See page pdf-x for more information. Default value: "auto"
column-count
Sets the number of columns in a body region. Only the body region can have more than one column. For example to create a body region with three columns set column-count to 3 like this:
<fo:?xml version="1.0" encoding="UTF-8"?>
<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
<fo:layout-master-set>
<fo:simple-page-master master-name="simple">
<fo:region-body margin="2.5cm" region-name="body"
background-color="#eeeeee" column-count="3"/>
</fo:simple-page-master>
</fo:layout-master-set>
<fo:page-sequence master-reference="simple">
<fo:flow flow-name="body">
<fo:block>Hello World</fo:block>
</fo:flow>
</fo:page-sequence>
</fo:root>
Default value: "1"
Value | Notes |
---|---|
<fo:integer> | A non-negative integer. Sets the number of columns to this value. |
column-gap
Sets the gap between columns in a body region with column-count > 1. Only the body region can have more than one column. For example to create a body region with two columns separated by a 4cm gap set column-count to 2 and column-gap to "4cm" like this:
<fo:?xml version="1.0" encoding="UTF-8"?>
<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
<fo:layout-master-set>
<fo:simple-page-master master-name="simple">
<fo:region-body margin="2.5cm" region-name="body" column-count="2" column-gap="4cm"/>
</fo:simple-page-master>
</fo:layout-master-set>
<fo:page-sequence master-reference="simple">
<fo:flow flow-name="body">
<fo:block>Hello World</fo:block>
</fo:flow>
</fo:page-sequence>
</fo:root>
Default value: "12.0pt"
Value | Notes |
---|---|
<length> | A length such as '10cm'. Valid units are pt (points) cm (centimetres) in (inches) mm (millimetres) em (current font size in points). |
column-number
This is used on a fo:table-column element to specify which column the fo:table-column element refers to. This attribute is optional as the column number can be determined from the position of the fo:table-column element in the list of such elements.
<fo:table>
<fo:table-column column-number="1" column-width="20%"/>
<fo:table-column column-number="2" column-width="30%"/>
<fo:table-column column-number="3" column-width="50%"/>
<fo:table-body>
<fo:table-row>
<fo:table-cell>col 1</fo:table-cell>
<fo:table-cell>col 2</fo:table-cell>
<fo:table-cell>col 3</fo:table-cell>
</fo:table-row>
</fo:table-body>
</fo:table>
Default value: "current column number"
column-width
This is used on a fo:table-column element to specify the width of the column the fo:table-column element refers to. For example to set the widths of three columns to 20%, 30% and 50% you would do this:
<fo:table>
<fo:table-column column-number="1" column-width="20%"/>
<fo:table-column column-number="2" column-width="30%"/>
<fo:table-column column-number="3" column-width="50%"/>
<fo:table-body>
<fo:table-row>
<fo:table-cell>col 1</fo:table-cell>
<fo:table-cell>col 2</fo:table-cell>
<fo:table-cell>col 3</fo:table-cell>
</fo:table-row>
</fo:table-body>
</fo:table>
Default value: This attribute has no default value, you must provide a value.
Value | Notes |
---|---|
<percentage> | |
<length> | A length such as '10cm'. Valid units are pt (points) cm (centimetres) in (inches) mm (millimetres) em (current font size in points). |
content-height
This is used on a graphic element such as a fo:external-graphic to set the height of the image. The size of an image and the size of the area containing it are two seperate things. The height and width attributes set the size of the area containing the image, the content-height and content-width attributes set the size of the image itself. Percentage values refer to percentages of the actual size of the image as determined from the image file. Default value: "auto"
Value | Notes |
---|---|
<length> | A length such as '10cm'. Valid units are pt (points) cm (centimetres) in (inches) mm (millimetres) em (current font size in points). |
<percentage> | |
inherit | |
scale-to-fit |
content-width
This is used on a graphic element such as a fo:external-graphic to set the width of the image. The size of an image and the size of the area containing it are two seperate things. The height and width attributes set the size of the area containing the image, the content-height and content-width attributes set the size of the image itself. Percentage values refer to percentages of the actual size of the image as determined from the image file. Default value: "auto"
Value | Notes |
---|---|
<length> | A length such as '10cm'. Valid units are pt (points) cm (centimetres) in (inches) mm (millimetres) em (current font size in points). |
<percentage> | |
inherit | |
scale-to-fit |
display-align
This attribute sets the vertical alignment of content contained within the element with this attribute. Default value: "inherited from parent"
Value | Notes |
---|---|
auto | |
before | Align to before edge which for non-rotated content is the top. |
center | Align to center |
after | Align to after edge which for non-rotated content is the bottom. |
end-indent
This attribute sets indentation of content from the end edge of the containing area. For non-rotated content the end edge is the right edge.
This attribute sets the indentation of the content contained in the element. The content will be positioned the required distance from the right edge of the containing area, and any padding and border will then be placed outside the content. For CSS style alignment of nested elements use the margin-left and margin-right attributes instead of start-indent and end-indent. Default value: "0pt"
Value | Notes |
---|---|
auto | |
<length> | A length such as '10cm'. Valid units are pt (points) cm (centimetres) in (inches) mm (millimetres) em (current font size in points). |
<percentage> | |
inherit |
ends-row
Within a fo:table-body (or fo:table-header and fo:table-footer) element a table has fo:table-cell elements. Normally cells are placed inside a fo:table-row element, but it is possible to place the cells directly below the fo:table-body element and not have any fo:table-row elements. In this case the formatter determines formation of rows by looking for ends-row and starts-row attributes on each fo:table-cell. If a fo:table-cell ends the row then the ends-row attribute should be set to "true", otherwise it should be set to "false" or not used at all. A table which has two rows of three cells each and is created without row elements looks like this:
<fo:table>
<fo:table-body>
<fo:table-cell starts-row="true">col 1</fo:table-cell>
<fo:table-cell>col 2</fo:table-cell>
<fo:table-cell ends-row="true">col 3</fo:table-cell>
<fo:table-cell starts-row="true">col 1</fo:table-cell>
<fo:table-cell>col 2</fo:table-cell>
<fo:table-cell ends-row="true">col 3</fo:table-cell>
</fo:table-body>
</fo:table>
Default value: "false"
Value | Notes |
---|---|
false | This cell does not end the row |
true | This cell ends the row |
extent
The extent attribute determines how large a region is. It is used on region elements other then the fo:region-body element. The extent is the size of the region. The outer edge of the region is calculated from the edge of the page plus any margin on the fo:simple-page-master element. The inner edge of the region is the outer edge plus the value of the extent attribute. Percentage values refer to the size of the page. Default value: "0pt"
Value | Notes |
---|---|
<length> | A length such as '10cm'. Valid units are pt (points) cm (centimetres) in (inches) mm (millimetres) em (current font size in points). |
<percentage> |
external-destination
This attribute destination of a fo:basic-link element used to create a hyperlink in the document. The format of the external-destination attribute must be a URI specification (RFC2396) as described below. To link local file the format should be:
external-destination="url(external.pdf)"
or to link to a website use a format like this:
external-destination
="url(http://www.xmlpdf.com/builds/ibex.pdf)"
Default value: ""
Value | Notes |
---|---|
<uri-specification> | A sequence of characters that is "url(", followed by optional white space, followed by an optional single quote (') or double quote (") character, followed by a URI reference as defined in [RFC2396], followed by an optional single quote (') or double quote (") character, followed by optional white space, followed by ")". The two quote characters must be the same and must both be present or absent. If the URI reference contains a single quote, the two quote characters must be present and be double quotes. |
float
Specifies how the block which is floated should be positioned. Specify float="start" or float="before" to move the block to the start of the page. Specify float="left" to position content to the left side of the page and have other content flow around the right side of the positioned content. Default value: "none"
Value | Notes |
---|---|
inherit | |
before | |
start | |
end | |
left | |
right |
flow-map-name
Specifies a unique name for a flow-map. page-sequence elements which will be laid out with that flow-map will have the same value for their flow-map-reference attribute.
Default value: "none, a value is required"
flow-map-reference
This is used on a fo:page-sequence to specify the name of a flow-map which will control the layout of content (in flows) to regions. It is also used on a fo:flow-name-specifier to specify the name of a flow which will be mapped using the containing flow-map. Default value: "none, a value is required"
flow-name
This attribute is used on fo:flow and fo:static-content elements to define which region the content from the fo:flow and fo:static-content is placed. For content to be placed on the page the flow-name attribute must correspond to the region-name attribute of a region of the current page layout. If the flow-name is not the same as one of the region names the content contained in the fo:flow and fo:static-content is discarded. Default value: This attribute has no default value, you must provide a value.
Value | Notes |
---|---|
<fo:name> | use a value which matches a region-name used on one of the regions on the current simple-page-master. |
font
This attribute is shorthand for the font-style, font-variant , font-weight, font-size, font-family , line-height attributes. Typically the font attribute will be set to a value which defines the font name and size plus possibly bold or italic. Some example of this are:
font="12pt arial"
font="bold 12pt arial"
font="bold 12pt "minion regular""
The elements of the font attribute must be specified in this order: style (normal, italic) variant (normal, smallcaps) weight (bold, bolder, lighter etc.) size (1em, 12pt) line height (12pt/14pt) font-family (helvetica) If the font name contains spaces it should be placed in quotes. If the attribute value is in single quotes, place the font name in double quotes like this:
font="12pt "minion regular" "
If the attribute value is in double quotes, place the font name in single quotes like this:
font="12pt "minion regular" "
Default value: Shorthand properties do not have default values. See individual properties for their default values.
font-family
This sets the font family for the element. This attribute can be set to a single font name like this:
font-family="arial"
or a list of fonts separated by commas, like this:
font-family="arial, "minion regular""
If the font name contains spaces it should be placed in quotes. If the attribute value is in single quotes, place the font name in double quotes like this:
font="12pt "minion regular" "
If the attribute value is in double quotes, place the font name in single quotes like this:
font="12pt "minion regular" "
In addition to actual font names the following values can be used: "serif", "sans-serif", "cursive", "fantasy", "monospace"
These names are mapped to actual font names by the Settings.
Default value: "The value of Settings.DefaultFontFamily or inherited from parent"
font-size
This sets the font size of this element and the elements it contains. Typical values are show here:
font-size="12pt"
font-size="1.2em"
Values which set the font size relative to the font size of the containing element can also be used like this:
font-size="smaller"
Percentage sizes refer to the font size of the containing element. Default value: "medium"
Value | Notes |
---|
Value | Notes |
---|---|
<length> | A length such as '10cm'. Valid units are pt (points) cm (centimetres) in (inches) mm (millimetres) em (current font size in points). |
<percentage> |
font-style
This sets the font style of this element and elements it contains. Typical values are show here:
font-style="italic"
Default value: "normal"
Value | Notes |
---|---|
normal | The style is the same as the style of the parent element. |
italic | The style is italic. |
oblique | The style is italic. |
inherit |
font-weight
This sets the font weight of this element and elements it contains. The specification supports numeric values. These are mapped as follows:
Default value: "normal"
Value | Notes |
---|---|
100-900 | See the table above |
normal | The weight is inherited from the parent element. |
bold | The text will be bold. |
inherit |
format
In conjuction with grouping-separator and grouping-size this attribute sets the format to be used when formatting page numbers contained within this fo:page-sequence. Default value: "1"
Value | Notes |
---|---|
1 | Use numeric formatting so page numbers will be 1,2,3 .. |
i | Use roman formatting so page numbers will be i, ii, iii, iv, v .. |
height
Sets the height of the content of an element excluding padding and borders. This means an element with height="3cm" and border=".25cm" will have a height including borders and padding of 3.5cm. This example shows the effect of the height attribute on the content of the block-container:
<fo:block-container space-before="1cm" height="3cm"
border=".5cm solid red">
<fo:block>3+.5</fo:block>
</fo:block-container>
This produces this output: By pressing Control-U in Acrobat Reader you can measure the content and see that the area within the borders is 3cm high. Note that the width and height attributes do not apply to the fo:block element. To set minumum and maximum height values use the block-progression-dimension attribute. Default value: "auto"
id
This attribute is set on elements which need to be referenced from somewhere else in the document. An example of this is the fo:page-number-citation element which inserts into the document the page number some other content appears on. The content whose page number we want to retrieve is given an id attribute, and the fo:page-number-citation sets its ref-id attribute to the same value. An example of this is:
<fo:?xml version="1.0" encoding="UTF-8"?>
<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
<fo:layout-master-set>
<fo:simple-page-master master-name="simple">
<fo:region-body margin="2.5cm" region-name="body"/>
</fo:simple-page-master>
</fo:layout-master-set>
<fo:page-sequence master-reference="simple">
<fo:flow flow-name="body">
<fo:block id="22">
Hello
</fo:block>
</fo:flow>
</fo:page-sequence>
<fo:page-sequence master-reference="simple">
<fo:flow flow-name="body">
<fo:block>
The block with id="22" is on page
<fo:page-number-citation ref-id="22"/>
</fo:block>
</fo:flow>
</fo:page-sequence>
</fo:root>
Default value: "a unique value generated by Ibex"
Value | Notes |
---|---|
<fo:id> | a unique string |
initial-page-number
This attribute sets the page number of the first page create by a fo:page-sequence element. Default value: "auto"
inline-progression-dimension
Sets the dimension of content in the inline progression direction which for a non-rotated page is across the page. The content of an element excludes padding and borders. This means an element with inline-progression-dimension="3cm" and border=".25cm" will have a width including borders and padding of 3.5cm. Can be set as a single value such as:
inline-progression-dimension="20cm"
or you can specify minimum and maximum values like this:
inline-progression-dimension.minimum="5cm"
inline-progression-dimension.maximum="25cm"
Default value: "auto"
Value | Notes |
---|---|
auto | |
<length> | A length such as '10cm'. Valid units are pt (points) cm (centimetres) in (inches) mm (millimetres) em (current font size in points). |
<percentage> | A percentage such as "10%". The value is calculated as a percentage of the parent elements width |
<length-range> | The value has three sub-components, namely minimim, optimum and maximum. Each of these can be set to a |
inherit |
internal-destination
This sets the destination of a fo:basic-link element. This should be set a value used as the id attribute of the element to be linked to. Default value: "''"
keep-together
Set this attribute to "always" to keep content together on one page. If content with keep-together="always" will not fit on what remains of a page it will be moved to the next page. If it is larger than the region in which it is being placed it will be split.
Default value: "auto"
keep-with-next
Set this attribute to "always" to keep the content with the next element in the FO. If both elements do not fit on a page they will both be moved to the next page. This is typically used to keep a heading together with the content which follows. Any number of elements can be kept together by having keep-with-next="always" set on each one. If the list to be kept together exceeds the size of the region in which they are being placed they will not be kept together. Default value: "auto"
keep-with-previous
Set this attribute to "always" to keep the content with the previous element in the FO. If both elements do not fit on a page they will both be moved to the next page. This is typically used to keep a the last two rows of a table together so that a single row is never displayed by itself. Any number of elements can be kept together by having keep-with-previous="always" set on each one. If the list to be kept together exceeds the size of the region in which they are being placed they will not be kept together. Default value: "auto"
leader-length
This sets the length of a fo:leader element. This can be set as three components for the minimum, optimum and maximum values like this:
leader-length.mimimum="10pt"
leader-length.optimum="50%"
leader-length.maximum="100%"
Or alternatively all three components can be set to the same value like this:
leader-length="100%"
The default values for each component are: leader-length.mimimum="0pt"
leader-length.optimum="12pt"
leader-length.maximum="100%"
Default value: "see description"
leader-pattern
This sets the appearance of a leader element. Default value: "space"
Value | Notes |
---|---|
space | The leader will be blank. This is useful for justification of text. |
dots | The leader will be a dotted line. |
rule | The leader will be a solid line. |
left
When used on an absolutely or relatively positioned element this sets the offset from the left edge of the container to the left edge of this element. Default value: "auto"
Value | Notes |
---|---|
<length> | A length such as '10cm'. Valid units are pt (points) cm (centimetres) in (inches) mm (millimetres) em (current font size in points). |
<percentage> |
line-height
Sets the height of a line. Percentage values refer to the current font size. Default value: "normal"
Value | Notes |
---|---|
<length> | A length such as '10cm'. Valid units are pt (points) cm (centimetres) in (inches) mm (millimetres) em (current font size in points). |
normal | Line height is 1.2 times the font size. |
<percentage> |
linefeed-treatment
This sets the way in which linefeeds in the FO appear in the output. By default linefeeds are treated as spaces only. See page for a detailed example of the effects of this attribute. Default value: "treat-as-space"
Value | Notes |
---|---|
treat-as-space | Linefeeds in the FO become spaces in the output. |
preserve | Linefeeds in the FO become linefeeds in the output. |
margin
This is a shorthand way of setting margin-top, margin-bottom , margin-right and margin-left. To set all margins to the same size use a single value like this:
margin="1pt"
If there are two values the top and bottom margins are set to the first value and the side margins are set to the second, like this:
margin="1pt 3pt"
If there are three values the top margin is set to the first value, the side margins are set to the second, and the bottom is set to the third like this:
margin="1pt 2pt 3pt"
If there are four values the top margin is set to the first value, the right margin is set to the second, the bottom is set to the third and the left is set to the forth (so clockwise from the top) like this:
margin="1pt 2pt 3pt 4pt"
Default value: Shorthand properties do not have default values. See individual properties for their default values.
Value | Notes |
---|---|
inherit | |
<length> | A length such as '10cm'. Valid units are pt (points) cm (centimetres) in (inches) mm (millimetres) em (current font size in points). |
margin-bottom
Sets the bottom margin on an element. For example:
margin-bottom="1pt"
Default value: "0pt"
Value | Notes |
---|---|
<length> | A length such as '10cm'. Valid units are pt (points) cm (centimetres) in (inches) mm (millimetres) em (current font size in points). |
<percentage> | |
inherit |
margin-left
Sets the left margin on an element. For example:
margin-left="1pt"
Default value: "0pt"
Value | Notes |
---|---|
<length> | A length such as '10cm'. Valid units are pt (points) cm (centimetres) in (inches) mm (millimetres) em (current font size in points). |
<percentage> | |
inherit |
margin-right
Sets the right margin on an element. For example:
margin-right="1pt"
Default value: "0pt"
Value | Notes |
---|---|
<length> | A length such as '10cm'. Valid units are pt (points) cm (centimetres) in (inches) mm (millimetres) em (current font size in points). |
<percentage> | |
inherit |
margin-top
Sets the top margin on an element. For example:
margin-top="1pt"
Default value: "0pt"
Value | Notes |
---|---|
<length> | A length such as '10cm'. Valid units are pt (points) cm (centimetres) in (inches) mm (millimetres) em (current font size in points). |
<percentage> | |
inherit |
marker-class-name
Sets the name for a fo:marker which is then used on a fo:retrieve-marker element to retrieve the content contained in that marker. See fo:marker for an example. Default value: This attribute has no default value, you must provide a value.
master-name
This is a unique name given to a fo:simple-page-master or fo:page-sequence-master and then used as the master-reference attribute of a fo:page-sequence to specify which page master will be used to lay out the content of the fo:page-sequence. Default value: This attribute has no default value, you must provide a value.
master-reference
Both fo:simple-page-master and fo:page-sequence-master have a unique master-name attribute which is used as the master-reference attribute of a fo:page-sequence to specify which page master will be used to lay out the content of the fo:page-sequence. Default value: This attribute has no default value, you must provide a value.
number-columns-repeated
This is used on a fo:table-column element to indicate how many columns the fo:table-column element applies to. Default value: "1"
number-columns-spanned
This is used on a fo:table-cell element to specify how many columns the cell spans. This is functionally similar to the HTML colspan attribute. Default value: "1"
number-rows-spanned
This is used on a fo:table-cell element to specify how many rows the cell spans. This is functionally similar to the HTML rowspan attribute. Default value: "1"
orphans
This specifies the number of lines of text which must appear in a paragraph before a page break. At the default setting of "2" a single line will never appear by itself at the bottom of a page. If there is room for only a single line on a page (and the paragraph has more than one line) the whole paragraph will be shifted to the next page.
Increasing the value increases the number of lines which must appear on a page before a page break.
See also widows. Default value: "2"
overflow
This attribute determines whether content which exceeds the size of an element should be displayed or not. An example of this is the fixed size region elements such as fo:region-before which have their size set by the extent attribute. If content is placed in the region using a fo:static-content element the content may be too large for the region. If this happens and the overflow attribute is set to "hidden" the content will not appear. Default value: "auto"
Value | Notes |
---|---|
hidden | Content which exceeds the elements boundaries will be discarded. |
auto | Content which exceeds the elements boundaries will be displayed. |
visible | Content which exceeds the elements boundaries will be displayed. |
padding
Padding is space which appears between the border of an element and the content (such as text) of that element. This is a shorthand way of setting padding-top, padding-bottom , padding-right and padding-left. To set all paddings to the same size use a single value like this:
padding="1pt"
Default value: Shorthand properties do not have default values. See individual properties for their default values.
Value | Notes |
---|---|
inherit | |
<length> | A length such as '10cm'. Valid units are pt (points) cm (centimetres) in (inches) mm (millimetres) em (current font size in points). |
padding-after
Padding is space which appears between the border of an element and the content (such as text) of that element. This sets the padding on the after edge of an element which for an non-rotated area is the bottom edge.
padding-after="1pt"
Default value: "0pt"
Value | Notes |
---|---|
inherit | |
<length> | A length such as '10cm'. Valid units are pt (points) cm (centimetres) in (inches) mm (millimetres) em (current font size in points). |
padding-before
Padding is space which appears between the border of an element and the content (such as text) of that element. This sets the padding on the before edge of an element which for an non-rotated area is the top edge.
padding-before="1pt"
Default value: "0pt"
Value | Notes |
---|---|
inherit | |
<length> | A length such as '10cm'. Valid units are pt (points) cm (centimetres) in (inches) mm (millimetres) em (current font size in points). |
padding-bottom
Padding is space which appears between the border of an element and the content (such as text) of that element. This sets the padding on the bottom edge of an element.
padding-bottom="1pt"
Default value: "0pt"
Value | Notes |
---|---|
inherit | |
<length> | A length such as '10cm'. Valid units are pt (points) cm (centimetres) in (inches) mm (millimetres) em (current font size in points). |
padding-end
Padding is space which appears between the border of an element and the content (such as text) of that element. This sets the padding on the end edge of an element which for an non-rotated area is the right edge.
padding-end="1pt"
Default value: "0pt"
Value | Notes |
---|---|
inherit | |
<length> | A length such as '10cm'. Valid units are pt (points) cm (centimetres) in (inches) mm (millimetres) em (current font size in points). |
padding-left
Padding is space which appears between the border of an element and the content (such as text) of that element. This sets the padding on the left edge of an element.
padding-left="1pt"
Default value: "0pt"
Value | Notes |
---|---|
inherit | |
<length> | A length such as '10cm'. Valid units are pt (points) cm (centimetres) in (inches) mm (millimetres) em (current font size in points). |
padding-right
Padding is space which appears between the border of an element and the content (such as text) of that element. This sets the padding on the right edge of an element.
padding-right="1pt"
Default value: "0pt"
Value | Notes |
---|---|
inherit | |
<length> | A length such as '10cm'. Valid units are pt (points) cm (centimetres) in (inches) mm (millimetres) em (current font size in points). |
padding-start
Padding is space which appears between the border of an element and the content (such as text) of that element. This sets the padding on the start edge of an element which for an non-rotated area is the left edge.
padding-start="1pt"
Default value: "0pt"
Value | Notes |
---|---|
inherit | |
<length> | A length such as '10cm'. Valid units are pt (points) cm (centimetres) in (inches) mm (millimetres) em (current font size in points). |
padding-top
Padding is space which appears between the border of an element and the content (such as text) of that element. This sets the padding on the top edge of an element.
padding-top="1pt"
Default value: "0pt"
Value | Notes |
---|---|
inherit | |
<length> | A length such as '10cm'. Valid units are pt (points) cm (centimetres) in (inches) mm (millimetres) em (current font size in points). |
page-height
This is used on a fo:simple-page-master element to set the height of a page. If not set or if set to "auto" the page height is determined from the Settings.PageHeight property. Default value: "auto"
Value | Notes |
---|---|
auto | |
<length> | A length such as '10cm'. Valid units are pt (points) cm (centimetres) in (inches) mm (millimetres) em (current font size in points). |
page-width
This is used on a fo:simple-page-master element to set the width of a page. If not set or if set to "auto" the page width is determined from the Settings.PageWidth property. Default value: "auto"
Value | Notes |
---|---|
auto | |
<length> | A length such as '10cm'. Valid units are pt (points) cm (centimetres) in (inches) mm (millimetres) em (current font size in points). |
precedence
This is used on fo:region-before and fo:region-after elements to control whether the top and bottom regions take precedence over (i.e. extend into the corners over) the side regions. Default value: "false"
Value | Notes |
---|---|
false | |
true |
provisional-distance-between-starts
This applies to the fo:list-block element and sets the distance (in each fo:list-item) between the start of the label element and the start of the body element. This is not the same as the width of the label element because the width of the label element is reduced by the provisional-label-separation value. See fo:list-block for an example. Default value: "24pt"
provisional-label-separation
This applies to the fo:list-block element and sets the distance between the end of the label element and the start of the body element. See fo:list-block for an example and also provisional-distance-between-starts. Default value: "6pt"
ref-id
This attribute is used on the fo:page-number-citation to identify which the element for which we want to retrieve the page number. This should match the value of the id attribute on the other element. See fo:page-number-citation for an example. Default value: This attribute has no default value, you must provide a value.
reference-orientation
This attribute is used to set the rotation of whole pages (when used on fo:simple-page-master), regions (when used on region element), blocks (when used on fo:block-container) and fo:table elements. Rotation is counter-clockwise. See fo:block-container for an example. Default value: "0"
Value | Notes |
---|---|
0 | |
90 | |
180 | |
270 | |
-90 | |
-180 | |
-270 | |
inherit |
region-name-reference
This is used on a fo:region-name-specifier to specify the name of a region which will have flows mapped onto it by the containing flow-map. Default value: "none, a value is required"
retrieve-boundary
This attribute is used on a fo:retrieve-marker to specify limits on which markers should be retrieved. See fo:marker for a complete example. Default value: "page-sequence"
Value | Notes |
---|---|
page | |
page-sequence | |
document |
retrieve-class-name
This attribute is used on a fo:retrieve-marker to specify which marker is to be retrieved. This attribute specifies which class of marker is retrieved and the retrieve-boundary and retrieve-position attributes are used to choose one of the markers in that class. See fo:marker for a complete example. Default value: This attribute has no default value, you must provide a value.
retrieve-position
This attribute is used on a fo:retrieve-marker to specify which marker is to be retrieved. The retrieve-class-name attribute specifies which class of marker is retrieved and the retrieve-boundary and retrieve-position attributes are used to choose one of the markers in that class. See fo:marker for a complete example. Default value: "first-starting-within-page"
Value | Notes |
---|---|
first-starting-within-page | Use the first marker which appears starts on this page |
first-including-carryover | Use the first marker which has any content on this page |
last-starting-within-page | |
last-ending-within-page |
right
For an absolutely positioned element this specifies the distance between the right edge of the containing element and the right edge of this element. Default value: "auto"
rule-thickness
This is used on the fo:leader element to specify the thickness (i.e. height) of the line the leader creates. Default value: "1pt"
Value | Notes |
---|---|
<length> | A length such as '10cm'. Valid units are pt (points) cm (centimetres) in (inches) mm (millimetres) em (current font size in points). |
scaling
This is used on graphic elements fo:external-graphic and fo:instream-foreign-object to specify how the image should be scaled. If the scaling is uniform a change to the image size using content-height or content-width will result in a corresponding change in the other dimension to preserve the aspect ratio. If scaling is non-uniform a change to height or width will not change the other dimension and the aspect ratio will be changed. Default value: "uniform"
Value | Notes |
---|---|
uniform | See above. |
non-uniform | See above. |
space-after
This attribute is used to define the amount of space which appears between this element and the next.
This attribute can be set as a single value like this:
space-after="3mm"
or individual components can be set like this:
space-after.minimum="3pt"
space-after.optimum="4pt"
space-after.maximum="5pt"
Space resolution in XSL-FO is complicated. If two elements have space after the first one and before the second one, usually the space is combined using a formula so that generally speaking the largest space will be used. For example if there are two blocks A and B, and A has space-after="3cm" and B has space-before="2cm" the space between the blocks will not be the sum of the two spaces (ie. 5cm) it will be the largest of the two, ie. 3cm. To prevent the two spaces from being merged, and get the sum of the two spaces you can use the precedence component like this:
space-after="3cm" space-after.precedence="force"
Precedence can also be assigned a number. If there are two spaces to be merged and they have different precedence values the one with the highest value will be used. For example:
<fo:block space-after="3cm" space-after.precedence="5">
A
</fo:block>
<fo:block space-before="1cm" space-after.precedence="6">
B
</fo:block>
In this case the space between the two blocks will be 1cm because the second block has the higher precedence value so its space value is the one which is used. Space which appears before a block at the top of a region is usually discarded. To avoid this and make the space appear use the conditionality component like this:
space-before="3cm" space-before.conditionality="retain"
To make matters even more complex, the space after an element refers to the space between the last mark made by this element and the first mark made by the next element. This means we need to consider child elements of the two elements whose space is being merged. For example the block A below has a child block A2 which has a space-after attribute. This means when Ibex merges the space between A and B, it also considers the space between A2 and B.
<fo:block space-after="3cm" >
A
<fo:block space-after="4cm" >
A2
</fo:block>
</fo:block>
<fo:block space-before="1cm" >
B
</fo:block>
so the space between A and B will be 4cm because this is the largest value. If B had a child block this would also be considered. And it gets worse. In the example shown above A2 makes the last mark on the page made by the A block and its children. If A had a bottom border, this border would then be the last mark made by the A block and its children (because the border of A is after A2) and the merging formula would not consider A2 (as it does not now make the last mark) and so the gap between A and B would now be 3cm. Default value: "0pt"
Value | Notes |
---|---|
<length> | A length such as '10cm'. Valid units are pt (points) cm (centimetres) in (inches) mm (millimetres) em (current font size in points). |
<percentage> |
space-before
This attribute is used to define the amount of space which appears between this element and the previous one.
This attribute can be set as a single value like this:
space-before="3mm"
or individual components can be set like this:
space-before.minimum="3pt"
space-before.optimum="4pt"
space-before.maximum="5pt"
Space resolution in XSL-FO is complicated. See space-after for a detailed description of space resolution. Default value: "0pt"
Value | Notes |
---|---|
<length> | A length such as '10cm'. Valid units are pt (points) cm (centimetres) in (inches) mm (millimetres) em (current font size in points). |
<percentage> |
span
This attribute is used on block-level (fo:block,fo:table,fo:list-block) elements whose immediate parent element is a fo:flow. The span indicates if the block element should span all the columns of a multi-column fo:region-body. The only options are "none" and "all". It is not possible to span some but not all columns. Default value: "none"
Value | Notes |
---|---|
none | Span one column |
all | Span all columns |
inherit |
src
This specifies the source for a fo:external-graphic element. The src attribute is called a uri-specification and must follow the following rules: A sequence of characters that is "url(", followed by optional white space, followed by an optional single quote (") or double quote (") character, followed by a URI reference as defined in [RFC2396], followed by an optional single quote (") or double quote (") character, followed by optional white space, followed by ")". The two quote characters must be the same and must both be present or both be absent. If the URI reference contains a single quote, the two quote characters must be present and be double quotes.
This means the following are all valid values for the src attribute: uri(ibex.jpg)
uri("ibex.jpg")
uri("ibex.jpg")
url(http://www.xmlpdf.com/images/download2.gif)
Default value: This attribute has no default value, you must provide a value.
start-indent
This attribute sets indentation of content from the start edge of the containing area. For non-rotated content the start edge is the left edge.
This attribute sets the indentation of the content contained in the element. The content will be positioned the required distance from the right edge of the containing area, and any padding and border will then be placed outside the content. For CSS style alignment of nested elements use the margin-left and margin-right attributes instead of start-indent and end-indent. Default value: "0pt"
Value | Notes |
---|---|
auto | |
<length> | A length such as '10cm'. Valid units are pt (points) cm (centimetres) in (inches) mm (millimetres) em (current font size in points). |
<percentage> | |
inherit |
starting-state
Specifies if a bookmark entry should be open (with its child bookmarks visible) when the PDF file is opened.
Default value: "show"
Value | Notes |
---|---|
inherit | |
show | |
hide |
starts-row
Within a fo:table-body (or fo:table-header and fo:table-footer) element a table has fo:table-cell elements. Normally cells are placed inside a fo:table-row element, but it is possible to place the cells directly below the fo:table-body element and not have any fo:table-row elements. In this case the formatter determines formation of rows by looking for ends-row and starts-row attributes on each fo:table-cell. If a fo:table-cell ends the row then the ends-row attribute should be set to "true", otherwise it should be set to "false" or not used at all. A table which has two rows of three cells each and is created without row elements looks like this:
<fo:table>
<fo:table-body>
<fo:table-cell starts-row="true">col 1</fo:table-cell>
<fo:table-cell>col 2</fo:table-cell>
<fo:table-cell ends-row="true">col 3</fo:table-cell>
<fo:table-cell starts-row="true">col 1</fo:table-cell>
<fo:table-cell>col 2</fo:table-cell>
<fo:table-cell ends-row="true">col 3</fo:table-cell>
</fo:table-body>
</fo:table>
Default value: "false"
Value | Notes |
---|---|
false | This cell does not start a new row. |
true | This cell starts a new the row. |
table-layout
This attribute controls whether the layout of a fo:table (which means the column widths) is calculated from the content of the cells or from fo:table-column elements. Use "fixed" to calculate column widths from fo:table-column elements. This is the recommended approach. It is faster and makes the output file look consistent when using different data. Default value: "auto"
Value | Notes |
---|---|
auto | |
fixed | see above |
table-omit-footer-at-break
By default a fo:table-footer element is repeated before every table break. If you set this attribute to "true" the table footer will appear only once, at the end of the table. Default value: "false"
Value | Notes |
---|---|
true | Footer appears once at end of table |
false | Footer appears at every page break |
table-omit-header-at-break
By default a fo:table-header element is repeated after every table break. If you set this attribute to "true" the table header will appear only once, at the beginning of the table. Default value: "false"
Value | Notes |
---|---|
true | header appears once at start of table |
false | header appears after every page break |
text-align
This sets the text alignment of text contained within the element. This does not align the last (or only) line of a paragraph - see the text-align-last attribute for aligning the last line. Default value: "start"
Value | Notes |
---|---|
start | same as left for non-rotated content |
left | |
center | |
end | same as right for non-rotated content |
right | |
justify |
text-align-last
This sets the text alignment of text last line of a paragraph - see the text-align attribute for aligning lines other than the last one. Default value: "start"
Value | Notes |
---|---|
start | same as left for non-rotated content |
left | |
center | |
end | same as right for non-rotated content |
right | |
justify |
white-space-collapse
This controls how multiple contiguous whitespace in the FO is treated by Ibex. By default after processing of linefeeds all remaining runs of two or more consecutive spaces are replaced by a single space, then any remaining space immediately adjacent to a remaining linefeed is also discarded.
See for a detailed example of the effects of this attribute. Default value: "true"
white-space-treatment
This controls how whitespace characters in the FO are treated by Ibex.
See for a detailed example of the effects of this attribute. Default value: "ignore-if-surrounding-linefeed"
widows
This specifies the number of lines of text which must appear in a paragraph at the top of a page. At the default setting of "2" a single line will never appear by itself at the top of a page. If possible a line from the previous page will be moved to the the current page so that 2 lines of text appear at the top of the page. If this is not possible (perhaps because of the orphans setting) the whole paragraph will be moved to the current page. Increasing the value increases the number of lines which must appear on a page.
See also orphans. Default value: "2"
width
This sets the desired width for an element. This is shorthand way of setting all three components of the inline-progression-dimension attribute. Default value: "auto"
Value | Notes |
---|---|
<length> | A length such as '10cm'. Valid units are pt (points) cm (centimetres) in (inches) mm (millimetres) em (current font size in points). |
<percentage> |
wrap-option
This option controls word wrapping within an element. Default behavior for text within a fo:block is for words which do not fit on one line to wrap to the next line and the height of the block to increase. If wrap-option="no-wrap" then words which do not fit on the first line are discarded if overflow="hidden". See also overflow Default value: "wrap"
Value | Notes |
---|---|
inherit | |
wrap | words wrap to the next line |
no-wrap | words do not wrap to the next line |
z-index
This attribute controls the positioning of one element over another. By default a more deeply nested element will appear over its container element but by changing the z-order you can change which elemnets appear over which other elements. Default value: "auto"