DiType User Guide/XSL-FO Conformance

From Docs

Jump to: navigation, search

< DiType User Guide

Contents

XSL-FO Support

This appendix describes the implementation of XSL Formatting Objects in DiType — an XSL Engine for PDF developed by RenderX, Inc, version 2.2. It lists all supported formatting objects and their properties, provides information about fallbacks for unsupported objects, and discusses details of XSL spec interpretation adopted in the engine.

Note: DiType implements Extensible Stylesheet Language version 1.1 as specified in the XSL 1.1 Recommendation of December 5, 2006 .

Formatting Objects Supported by DiType

§ Object Name Supported
6.4.2 <fo:root> Yes
6.4.3 <fo:declarations> No
6.4.4 <fo:color-profile> No
6.4.5 <fo:page-sequence> Yes
6.4.6 <fo:page-sequence-wrapper> Yes
6.4.7 <fo:layout-master-set> Yes
6.4.8 <fo:page-sequence-master> Yes
6.4.9 <fo:single-page-master-reference> Yes
6.4.10 <fo:repeatable-page-master-reference> Yes
6.4.11 <fo:repeatable-page-master-alternatives> Yes
6.4.12 <fo:conditional-page-master-reference> Yes
6.4.13 <fo:simple-page-master> Yes
6.4.14 <fo:region-body> Yes
6.4.15 <fo:region-before> Yes
6.4.16 <fo:region-after> Yes
6.4.17 <fo:region-start> Yes
6.4.18 <fo:region-end> Yes
6.4.19 <fo:flow> Yes
6.4.20 <fo:static-content> Yes
6.4.21 <fo:title> No
6.4.22 <fo:flow-map> Yes
6.4.23 <fo:flow-assignment> Yes
6.4.24 <fo:flow-source-list> Yes
6.4.25 <fo:flow-name-specifier> Yes
6.4.26 <fo:flow-target-list> Yes
6.4.21 <fo:region-name-speificier> Yes
6.5.2 <fo:block> Yes
6.5.3 <fo:block-container> Yes
6.6.2 <fo:bidi-override> Yes
6.6.3 <fo:character> Yes
6.6.4 <fo:initial-property-set> Yes
6.6.5 <fo:external-graphic> Yes
6.6.6 <fo:instream-foreign-object> Yes [1]
6.6.7 <fo:inline> Yes
6.6.8 <fo:inline-container> No [2]
6.6.9 <fo:leader> Yes [3]
6.6.10 <fo:page-number> Yes
6.6.11 <fo:page-number-citation> Yes
6.6.12 <fo:page-number-citation-last> Yes
6.6.13 <fo:folio-prefix> Yes
6.6.14 <fo:folio-suffix> Yes
6.6.15 <fo:scaling-value-citation> Yes
6.7.2 <fo:table-and-caption> Yes
6.7.3 <fo:table> Yes
6.7.4 <fo:table-column> Yes
6.7.5 <fo:table-caption> Yes
6.7.6 <fo:table-header> Yes
6.7.7 <fo:table-footer> Yes
6.7.8 <fo:table-body> Yes
6.7.9 <fo:table-row> Yes
6.7.10 <fo:table-cell> Yes
6.8.2 <fo:list-block> Yes
6.8.3 <fo:list-item> Yes
6.8.4 <fo:list-item-body> Yes
6.8.5 <fo:list-item-label> Yes
6.9.2 <fo:basic-link> Yes
6.9.3 <fo:multi-switch> -
6.9.4 <fo:multi-case> -
6.9.5 <fo:multi-toggle> -
6.9.6 <fo:multi-properties> -
6.9.7 <fo:multi-property-set> -
6.12.2 <fo:float> Yes [4]
6.12.3 <fo:footnote> Yes
6.12.4 <fo:footnote-body> Yes
6.13.4 <fo:wrapper> Yes
6.13.5 <fo:marker> Yes [5]
6.13.6 <fo:retrieve-marker> Yes
6.13.7 <fo:retrieve-table-marker> No

Formatting Properties Supported by DiType

§ Property Name Implemented
7.4.1 source-document No
7.4.2 role No
7.5.1 absolute-position Yes [6]
7.5.2 top Yes
7.5.3 right Yes
7.5.4 bottom Yes
7.5.5 left Yes
7.6.1 azimuth -
7.6.2 cue-after -
7.6.3 cue-before -
7.6.4 elevation -
7.6.5 pause-after -
7.6.6 pause-before -
7.6.7 pitch -
7.6.8 pitch-range -
7.6.9 play-during -
7.6.10 richness -
7.6.11 speak -
7.6.12 speak-header -
7.6.13 speak-numeral -
7.6.14 speak-punctuation -
7.6.15 speech-rate -
7.6.16 stress -
7.6.17 voice-family -
7.6.18 volume -
7.7.1 background-attachment Yes
7.7.2 background-color Yes
7.7.3 background-image Yes
7.7.4 background-repeat Yes
7.7.5 background-position-horizontal Yes [7]
7.7.6 background-position-vertical Yes [7]
7.7.7 border-before-color Yes
7.7.8 border-before-style Yes
7.7.9 border-before-width Yes
7.7.10 border-after-color Yes
7.7.11 border-after-style Yes
7.7.12 border-after-width Yes
7.7.13 border-start-color Yes
7.7.14 border-start-style Yes
7.7.15 border-start-width Yes
7.7.16 border-end-color Yes
7.7.17 border-end-style Yes
7.7.18 border-end-width Yes
7.7.19 border-top-color Yes
7.7.20 border-top-style Yes
7.7.21 border-top-width Yes
7.7.22 border-bottom-color Yes
7.7.23 border-bottom-style Yes
7.7.24 border-bottom-width Yes
7.7.25 border-left-color Yes
7.7.26 border-left-style Yes
7.7.27 border-left-width Yes
7.7.28 border-right-color Yes
7.7.29 border-right-style Yes
7.7.30 border-right-width Yes
7.7.31 padding-before Yes
7.7.32 padding-after Yes
7.7.33 padding-start Yes
7.7.34 padding-end Yes
7.7.35 padding-top Yes
7.7.36 padding-bottom Yes
7.7.37 padding-left Yes
7.7.38 padding-right Yes
7.8.2 font-family Yes
7.8.3 font-selection-strategy Yes
7.8.4 font-size Yes
7.8.5 font-stretch Yes
7.8.6 font-size-adjust Yes
7.8.7 font-style Yes
7.8.8 font-variant No
7.8.9 font-weight Yes
7.9.1 country No
7.9.2 language Yes
7.9.3 script No
7.9.4 hyphenate Yes
7.9.5 hyphenation-character Yes
7.9.6 hyphenation-push-character-count Yes
7.9.7 hyphenation-remain-character-count Yes
7.10.1 margin-top Yes
7.10.2 margin-bottom Yes
7.10.3 margin-left Yes
7.10.4 margin-right Yes
7.10.5 space-before Yes
7.10.6 space-after Yes
7.10.7 start-indent Yes
7.10.8 end-indent Yes
7.11.1 space-end Yes
7.11.2 space-start Yes
7.12.1 relative-position No
7.13.1 alignment-adjust Yes
7.13.2 alignment-baseline Yes
7.13.3 baseline-shift Yes
7.13.4 display-align Yes
7.13.5 dominant-baseline Yes
7.13.6 relative-align Yes [8]
7.14.1 block-progression-dimension Yes
7.14.2 content-height Yes
7.14.3 content-width Yes
7.14.4 height Yes
7.14.5 inline-progression-dimension Yes
7.14.6 max-height No [9]
7.14.7 max-width No [10]
7.14.8 min-height No [11]
7.14.9 min-width No [12]
7.14.10 scaling Yes
7.14.11 scaling-method No
7.14.12 width Yes
7.15.1 hyphenation-keep No
7.15.2 hyphenation-ladder-count No
7.15.3 last-line-end-indent Yes
7.15.4 line-height Yes
7.15.5 line-height-shift-adjustment Yes
7.15.6 line-stacking-strategy Yes
7.15.7 linefeed-treatment Yes [13]
7.15.8 white-space-treatment Yes
7.15.9 text-align Yes [14]
7.15.10 text-align-last Yes
7.15.11 text-indent Yes
7.15.12 white-space-collapse Yes [15]
7.15.13 wrap-option Yes
7.16.1 character Yes
7.16.2 letter-spacing Yes
7.16.3 suppress-at-line-break No
7.16.4 text-decoration Yes
7.16.5 text-shadow Yes [16]
7.16.6 text-transform Yes
7.16.7 treat-as-word-space No
7.16.8 word-spacing Yes
7.17.1 color Yes
7.17.2 color-profile-name No
7.17.3 rendering-intent No
7.18.1 clear Yes
7.18.2 float Yes
7.18.3 intrusion-displace Yes [17]
7.19.1 break-after Yes
7.19.2 break-before Yes
7.19.3 keep-together Yes [18]
7.19.4 keep-with-next Yes [18]
7.19.5 keep-with-previous Yes [18]
7.19.6 orphans Yes
7.19.7 widows Yes
7.20.1 clip No
7.20.2 overflow Yes [19]
7.20.3 reference-orientation Yes
7.20.4 span Yes
7.21.1 leader-alignment No
7.21.2 leader-pattern Yes
7.21.3 leader-pattern-width Yes
7.21.4 leader-length Yes
7.21.5 rule-style Yes
7.21.6 rule-thickness Yes
7.22.1 active-state -
7.22.2 auto-restore -
7.22.3 case-name -
7.22.4 case-title -
7.22.5 destination-placement-offset No
7.22.6 external-destination Yes [20]
7.22.7 indicate-destination No
7.22.8 internal-destination Yes
7.22.9 show-destination Yes [21]
7.22.10 starting-state -
7.22.11 switch-to -
7.22.12 target-presentation-context -
7.22.13 target-processing-context -
7.22.14 target-stylesheet -
7.23.1 marker-class-name Yes
7.23.2 retrieve-class-name Yes
7.23.3 retrieve-position Yes
7.23.4 retrieve-boundary Yes
7.24.1 format Yes
7.24.2 grouping-separator No
7.24.3 grouping-size No
7.24.4 letter-value No
7.25.1 blank-or-not-blank Yes
7.25.2 column-count Yes
7.25.3 column-gap Yes
7.25.4 extent Yes
7.25.5 flow-name Yes
7.25.6 force-page-count Yes
7.25.7 initial-page-number Yes
7.25.8 master-name Yes
7.25.9 master-reference Yes
7.25.10 maximum-repeats Yes
7.25.11 media-usage No
7.25.12 odd-or-even Yes
7.25.13 page-height Yes
7.25.14 page-position Yes
7.25.15 page-width Yes
7.25.16 precedence Yes
7.25.17 region-name Yes
7.26.1 border-after-precedence Yes
7.26.2 border-before-precedence Yes
7.26.3 border-collapse Yes
7.26.4 border-end-precedence Yes
7.26.5 border-separation Yes
7.26.6 border-start-precedence Yes
7.26.7 caption-side Yes [22]
7.26.8 column-number Yes
7.26.9 column-width Yes
7.26.10 empty-cells No [23]
7.26.11 ends-row Yes
7.26.12 number-columns-repeated Yes
7.26.13 number-columns-spanned Yes
7.26.14 number-rows-spanned Yes
7.26.15 starts-row Yes
7.26.16 table-layout Yes
7.26.17 table-omit-footer-at-break Yes
7.26.18 table-omit-header-at-break Yes
7.27.1 direction Yes
7.27.2 glyph-orientation-horizontal No
7.27.3 glyph-orientation-vertical No
7.27.4 text-altitude Yes
7.27.5 text-depth Yes
7.27.6 unicode-bidi Yes [24]
7.27.7 writing-mode Yes [25]
7.28.1 content-type Yes
7.28.2 id Yes
7.28.3 provisional-label-separation Yes
7.28.4 provisional-distance-between-starts Yes
7.28.5 ref-id Yes
7.28.6 score-spaces No
7.28.7 src Yes
7.28.8 visibility No
7.28.9 z-index Yes
7.29.1 background Yes
7.29.2 background-position Yes
7.29.3 border Yes
7.29.4 border-bottom Yes
7.29.5 border-color Yes
7.29.6 border-left Yes
7.29.7 border-right Yes
7.29.8 border-style Yes
7.29.9 border-spacing Yes
7.29.10 border-top Yes
7.29.11 border-width Yes
7.29.12 cue -
7.29.13 font Yes
7.29.14 margin Yes
7.29.15 padding Yes
7.29.16 page-break-after Yes
7.29.17 page-break-before Yes
7.29.18 page-break-inside Yes
7.29.19 pause -
7.29.20 position Yes
7.29.21 size Yes
7.29.22 vertical-align Yes
7.29.23 white-space Yes
7.29.24 xml:lang No

Notes on Formatting Objects Implementation

<fo:block>  
According to the XSL Specification, an empty block that has a non-null padding and/or border should be visible. DiType suppresses all blocks that have no visible contents regardless of their border or padding attributes.
<fo:bidi-override>  
In the current implementation of bidi algorithm, any markup element opens a new level of embedding. Consequently, unicode-bidi = "normal" is not supported: <fo:bidi-override> behaves as if unicode-bidi = "embed" were specified.
<fo:inline-container>  
Unsupported; contents are placed inline.
<fo:multi-switch> <fo:multi-case> <fo:multi-toggle> <fo:multi-properties> <fo:multi-property-set>  
Unsupported; contents are ignored. These elements deal with interactivity. Since PDF and PostScript are intrinsically static formats, none of them are applicable.
<fo:float>  
The before-float appears at the top of the next page.
<fo:table-caption>  
Only "before" and "after" captions are implemented. Side captions are treated as follows: caption-side = "start" falls back to "before" , and caption-side = "end" falls back to "after."
<fo:table-column>  
In the collapsed border model, only border-start and border-end are supported on <fo:table-column> elements.
<fo:table-row>  
In the collapsed border model, only border-before and border-after are supported on <fo:table-row> elements.
<fo:table-cell>  
If a cell spans multiple rows in a table with a collapsed border model, its border-after is taken from the row where the cell begins.
<fo:leader>  
In this version, leaders with leader-pattern = "use-content" can contain only plain text inside; all formatting is lost.
<fo:marker>  
This version cannot process markers specified as children of an <fo:wrapper>.

Supported Expressions

DiType implements a subset of XSL algebraic expressions. The following operators and functions are recognized:

  • Arithmetical operators: + , - , * , div , mod
  • floor()
  • ceiling()
  • round()
  • abs()
  • max()
  • min()
  • rgb()
  • rgb-icc() (supported partially — see notes below)
  • from-nearest-specified-value()
  • from-parent()
  • from-table-column()
  • inherited-property-value()
  • proportional-column-width()
  • body-start() (stand-alone use only, cannot be an operand in expressions)
  • label-end() (stand-alone use only, cannot be an operand in expressions)

Function rgb-icc() recognizes four predefined color profile names: #Grayscale , #CMYK , #SpotColor , and #Registration (see details below). For any other value of the fourth parameter, the function returns the fallback RGB color. ICC profiles are not supported.

Support for expressions is subject to the following limitations:

  • For compound expressions, the result of evaluation of all intermediate subexpressions must be a valid XSL type. For example, the expression (2in * 2in) div 1in is not supported because its first subexpression yields dimensionality of square inches, which is not a valid XSL unit; while 2in * (2in div 1in) works.
  • Expressions that require knowledge of the layout to evaluate (e.g. block widths expressed in percentages) can be used only as stand-alone expressions, not as parts of a bigger expression, and cannot be referenced by property-value functions. The same limitation applies to body-start() and label-end() functions.
  • Property value functions ( from-nearest-specified-value() , from-parent() , from-table-column() , inherited-property-value() ) cannot be used in shorthand expressions, and cannot take shorthand property names as their arguments.
  • Property value functions that take start-indent / end-indent as arguments may not work correctly if the block with indents is placed into another block that has CSS-style margin-* attributes. For safety, use either expressions with indents or CSS margins, but not both; mixing these two coding styles in the same stylesheet may yield unpredictable results.

Color Specifiers

DiType can produce PDF, PostScript and SVG output using the following color types:

  1. Grayscale. The following specifiers produce grayscale color output:
    • Predefined HTML and SVG names that correspond to RGB values with R = G = B : white , black , silver , gray , grey , lightgray , lightgrey , darkgray , darkgrey , dimgray , dimgrey , whitesmoke , gainsboro.
    • HTML-style RGB values with R = G = B : #555 , #9D9D9D , etc.
    • rgb-icc() function with built-in #Grayscale pseudo profile. Gray tone intensity is specified as a real value in the range 0.01.0 , the 5th argument to the function. Example:
      rgb-icc (128, 128, 128, #Grayscale, 0.5)

  2. RGB. The following specifiers produce RGB color output:
    • HTML and SVG predefined names, and RGB specifiers that are not mentioned above.
    • rgb() function. Values of color components are specified as real values in the range 0.0255.0. Example:
      rgb (127.5, 39.86, 255)

  3. CMYK. The following specifier produce CMYK color output:
    • rgb-icc() function with built-in #CMYK pseudo profile. Ink values are specified as real values in the range 0.01.0 , arguments from 5th to 8th; order of inks is cyanmagentayellowblack. Example:
      rgb-icc (255, 255, 0, #CMYK, 0, 0, 1, 0)

  4. Spot colors. The following specifiers produce spot color output:
    • rgb-icc() function with built-in #SpotColor pseudo profile. The 5th argument is the colorant name, specified as a string; use quotes if the name contains spaces. The 6th argument is the tint value, specified as a real number in the range 0.01.0. These mandatory attributes may be followed by an optional specification of the alternate color for the colorant, in either CMYK or grayscale color space: 7th argument is the color space name (either #CMYK or #Grayscale ), and the rest are component intensities (1 for grayscale, 4 for CMYK).
      Note: The alternate color specifies an equivalent representation for the full colorant intensity. Occurrences of the same spot color with different tints should have the same alternate color specifier.
      If the alternate color is not specified, DiType looks it up in SpotColor matching table (path to the table is defined by the <SPOT_COLOR_TRANSLATION_TABLE> option); if not found there, black color in grayscale color space is used.
      Examples:
      rgb-icc(255,255,0, #SpotColor,'PANTONE Orange 021 C',0.33)
      rgb-icc(255,255,0, #SpotColor,'PANTONE 169 M',0.5, #CMYK,0,0.2,0.2,0)
      rgb-icc(255,255,0, #SpotColor,MyColor,0.33, #Grayscale,0.5)


  5. Registration color. The following specifier produces registration (all-colorants) color output:
    • rgb-icc() function with built-in #Registration pseudo profile. Tint intensity is specified as a real value in the range 0.01.0 , the 5th argument to the function. Example:
      rgb-icc (128, 128, 128, #Registration, 0.5)

XSL 1.1 Support

DiType implements several new features of XSL 1.1. The following is an informal table describing features and current level of support and limitations.

Feature Comments
Bookmarks Partial (no styling for bookmark titles). The rx:outline extension is supported via a stylesheet.
Change bars Partial (currently, the elements are allowed only in %block; or %inline; contexts. Forking on out-of-flow elements is not implemented). The rx:change-bar-* extension is supported via a stylesheet.
Flow maps Fully implemented.
Folio prefix and suffix Fully implemented.
Graphic scaling Partial (fo:scaling-value-citation is not implemented).
@id on root, static-content, flow, footnote-body, footnote, float Partial (except on fo:root and fo:static-content).
Indexing Partial (except @index-class). The rx: extensions for indexing is supported via a stylesheet.
inside/outside values for @clear Fully supported.
block-container/@overflow="repeat" Not supported.
block-container/@overflow="error-if-overflow" Fully supported.
fo:page-number-citation-last Partial (except @page-citation-strategy). The rx:page-number-citation-last extension is supported via a stylesheet.
page-position="only" Fully supported.
page-sequence-wrapper Fully supported.
Table markers Not implemented (future).

Extensions to the XSL 1.0 Recommendation

DiType implements several extensions to the XSL Specification, placed into a separate namespace: xmlns:rx="http://www.renderx.com/XSL/Extensions". They add support for useful functionality that cannot be expressed by XSL Formatting Objects.

Document Information

This extension permits passing a set of name/value pairs to the generator of the output format. A typical application is setting PDF document info fields ( ‘Author’ and ‘Title’ ). Implementation uses two extension elements: <rx:meta-info> and <rx:meta-field>.

  • '<rx:meta-info>' — This element is merely a container for one or more <rx:meta-field> elements. It should be the first child of <fo:root>.
  • '<rx:meta-field>' — This element specifies a single name/value pair. It has two mandatory attributes: name and value. Current implementation of the PDF and PostScript generators recognize four possible values for name :
    • name = "author"- fills the ‘Author’ field in the resulting PDF file with a string specified by the value property.
    • name = "creator" - fills the ‘Creator’ field.
    • name = "title" - fills the ‘Title’ field.
    • name = "subject" - fills the ‘Subject’ field.
    • name = "keywords" - fills the ‘Keywords’ field.

    All other values for name are ignored. The ‘Producer’ field in the PDF file is set to "DiType <version>" ; there is no way to control it from the source file.
    In the PostScript generator module, the document info fields are added using the pdfmark operator. The respective fields are filled when PostScript is converted to PDF using Adobe Acrobat Distiller or GhostScript.

Document Outline (Bookmarks)

Document Outline is natively implemented in terms of XSL 1.1 bookmarks. For compatibility reasons the rx:outline extension is also supported. The rest of this section describes the extension.

This extension provides the following three elements:

  • <rx:outline> - The top-level element of the document outline tree. It should be located before any <fo:page-sequence> elements, and after the <fo:layout-master-set> and the <fo:declarations> elements (if present). It contains one or more <rx:bookmark> elements.
  • <rx:bookmark> - This element contains information about a single bookmark. It contains a mandatory <rx:bookmark-label> element as its first child, and zero or more nested <rx:bookmark> elements that describe nested bookmarks. Bookmark destination is expressed either by internal-destination property (for internal navigation), or by external-destination (for extra-document links). The initial presentation of the children bookmarks is controlled by collapse-subtree attribute. Values are either "true" (collapse children) or "false" (expand children).
  • <rx:bookmark-label> - This element contains text of a bookmark label. It must be the first child of its parent <fo:bookmark>. Content of this element should be plain text.

Indexes

Indexes are natively implemented in terms of XSL 1.1 Indexes. For compatibility reasons the corresponding rx: extension is also supported. The rest of this section describes the extension.

Building page number lists for back-of-the-book indexes is a common task. It is relatively easy to collect a list of references to index terms in the text. However, to turn them into a real index entry, you should exclude repeated page numbers and merge adjacent numbers into ranges. Neither of these two operations can be done in XSL 1.0. Therefore, DiType supports an extension for this purpose.

The task of building an index can be split in two subtasks:

  • Mark up occurrences of index terms in the main text.
  • Specify composition and formatting of page number lists in the index.
Index Term Markup
In order to mark up occurences of the index terms in the text, DiType introduces a special extension attribute: rx:key. It can be specified on any element that can take an id attribute; unlike the latter, it need not be unique across the document. Its value is used as a key to select elements for the page number list. For example, an index term to the word "rendering" might look like this:
The process of converting XSL-FO to a printable format
is called <fo:inline rx:key="key.render">rendering.</fo:inline>

There is also a mechanism to specify an explicit range, not distinct elements. Two extension elements serve this purpose:

  • <rx:begin-index-range> — Starts a range. It takes two attributes, both required:
    • id — A unique identifier used to define the limits of the range.
    • rx:key — An Index key used to select the range into a page number list.
  • <rx:end-index-range> — Ends a range. It takes one attribute, required:
    • ref-id — A reference to the id attribute of the <rx:begin-index-range> that started the range.

These two elements always form a pair. These elements may be located anywhere inside <fo:flow> ; there are no constraints on their nesting with respect to other elements.

Index Entries

In the index, the actual page reference is created by another extension element, <rx:page-index>. It picks elements from the text by their rx:key properties, and produces a sorted list of their page numbers, eliminating duplicates.

<rx:page-index> should contain one or more <rx:index-item> elements as children. Each <rx:index-item> has a required ref-key attribute, and selects elements that have an rx:key attribute with the same value.

A distinct element bearing the appropriate rx:key value is represented as follows:

  • If it fits completely onto one page, it is represented as a single page number.
  • If it spans multiple pages, its entry is formatted as a range from the first to the last of the spanned pages.

A range (created by a <rx:begin-index-range> and <rx:end-index-range> element pair) is represented as a range from the page where <rx:begin-index-range> is located to the page of its matching <rx:end-index-range>.

A basic entry in an index looks like this:
<fo:inline rx:key="key.elephant">Elephants</fo:inline> live in Africa. …
<fo:inline rx:key="key.elephant">African elephants</fo:inline> have big ears …
…
<fo:block text-align="center" font="bold 16pt Futura">INDEX</fo:block>
<fo:block>
    Elephants <rx:page-index>
                   <rx:index-item ref-key="key.elephant"/>
              </rx:page-index>
</fo:block> 

There are other attributes of <rx:index-item> to control the formatting of the index entry:

range-separator  
Specifies the string used to separate page numbers that form a continuous range. Default is en dash: "–" (U+2013).
merge-subsequent-page-numbers  
Specifies whether sequences of adjacent page numbers should be merged into ranges. Default is "false."
link-back  
Specifies whether page numbers should be made into hyperlinks to the corresponding page. Default is "false."

Besides that, <rx:index-item> can take additional inline attributes, applied to each page number generated from this element. This allows for different presentation styles across the list, e.g., to make references to primary definitions bold.

Flow Sections

Flow sections permit splitting the flow into subflows, with different column counts in each subflow. The following element creates flow sections:

  • '<rx:flow-section>' — This element must be a direct child of <fo:flow>. It can be mixed with other block-level elements. It takes two attributes, both required:
    • column-count — The number of columns for the subflow.
    • columngap — The space between the columns.

Last Page Number Reference

Last Page Number Reference is natively implemented in terms of XSL 1.1 fo:page-number-citation-last. For compatibility reasons the rx:page-number-citation-last extension is also supported. The rest of this section describes the extension.

This extension element retrieves the number of the last page occupied by a particular element. Its syntax and semantics are similar to fo:page-number-citation.

  • '<fo:page-number-citation-last>' — The only required attribute, ref-id , specifies the id of the element whose last page number you want to retrieve. In particular, by referencing the id of the <fo:root> element, it is possible to retrieve the number of the last page in the document.
    For compatibility, this element is recognized in rx: namespace as well.

Change Bars

Change Bars are natively implemented in terms of XSL 1.1 Change Bars, currently with certain limitations. For compatibility, the corresponding rx: extension is also supported. The rest of this section describes the extension.

DiType has support for change regions, as described in XSL 1.1.

<rx:change-bar-begin> <rx:change-bar-end>  
These elements have exactly the same meaning and properties as listed in the Working Draft for elements <fo:change-bar-begin> and <fo:change-bar-end> , sections 6.3.12 and 6.3.13, respectively.

Background Image Scaling and Content Type

In XSL 1.0, there is no provision to scale/size a background image. XEP implements this functionality via the following extension properties:

rx:background-content-height rx:background-content-width rx:background-scaling rx:background-content-type  
These properties have the exact same semantics as content-height , content-width , scaling , and content-type , respectively. They apply to the image specified in background-image property (or inside background shorthand).

Initial Destination

This extension allows you to specify the destination to jump to when the document is first opened. It uses a single extension attribute, rx:initial-destination placed on <fo:root>. Its syntax is the same as the internal-destination attribute.

Base URI Definition: xml:base

DiType recognizes and processes xml:base attribute, defined in XML Base Recommendation . It permits you to set the base for resolving relative URIs (link targets, image locations, fonts, hyphenation patterns, etc.) for the whole document or a single subtree.

Note: The use of xml:base in XSL is not authorized by the XSL Specification; therefore, this option should be considered a proprietary extension to XSL.

Border and Padding on Regions

In the XSL Recommendation, border and padding properties are permitted on region elements ( <fo:region-body> , <fo:region-before> , <fo:region-after> , <fo:region-start> , and <fo:region-end> ). However, they may accept values of 0 (sic!). In DiType, non-zero values of these properties result in a border around the respective region area, and its content rectangle is padded by the specified amount.

Kerning: rx:kern

An inheritable extension attribute rx:kern allows you to control which kerning pairs available in the font will be honored. The values are:

Value Effect
auto All kerning pairs defined by the font are used. This is the default.
none Kerning is disabled.
<space-separated list of pairs> Those kerning pairs defined by the font that are present in the list are used. Sample value: "AT AV".

Ligaturization: rx:ligaturize

An inheritable extension attribute rx:ligaturize allows you to control which character sequences defined in the Unicode and present in the font will be converted to corresponding ligatures. The values are:

Value Effect
auto All possible ligatures will be used.
none No sequence will be ligaturized. This is the default.
<space-separated list of character sequences> Those sequences for which the font provides a ligature and if present in the list will be ligaturized. Sample value: "fi fl".

Note: If the input document already contains a ligature and this ligature is available in the font, it will come out as a ligature, no matter what the value of rx:ligaturize.

If the input document already contains a ligature but this ligature is not available in the font, it will be replaced with the corresponding sequence. If any character of this sequence is also not available in the font, the font-family for this character will be degraded in the regular order (i.e., another font in a multiple font family, or the default font). If degrading fails, a missing glyph will be drawn.

Hyphenation does not appear in the middle of a ligature. Other parts of a word may be properly hyphenated.


  1. <fo:instream-foreign-object> can host SVG graphics.
  2. All content is placed inline.
  3. In this version, only plain text can be put inside leaders with leader-pattern = "use-content".
  4. Top-floated ( float = "before" ) area is drawn on top of the following page.
  5. In the current version, markers cannot be specified as children of <fo:wrapper>.
  6. absolute-position = "fixed" works on <fo:block-container> only.
  7. 7.0 7.1 When the background image is repeated along an axis, its offset on this axis is ignored.
  8. Supported on <fo:list-item>. On <fo:table-cell> elements, falls back to relative-align = "before".
  9. Maps to height.
  10. Maps to width.
  11. Maps to height.
  12. Maps to width.
  13. Value "treat-as-zero-width-space" for linefeed-treatment is not implemented. This property does not work on inlines.
  14. <string> values for text-align are not implemented.
  15. This property does not work on inlines.
  16. Blurred shadows are not supported; blur radius is ignored.
  17. "indent" value is not implemented.
  18. 18.0 18.1 18.2 .within-page component is treated as .within-column. In tables, keep-with-previous / keep-with-next traits ignore table headers and footers: e.g. keep-with-previous condition specified on a row will keep it with the previous one regardless of the intervening header. If specified on the first row of the first <fo:table-body> in a table, keep-with-previous will attach the whole table to the preceding block-level element.
  19. Supported on side floats and absolutely positioned and rotated block-containers with fixed dimensions. When "error-if-overflow" is specified, a warning is issued on overflow, and the element is discarded in the same way as for "hidden" value.
  20. In PDF and PostScript generators, URLs starting with explicit "file:" protocol specification are rendered as PDF-to-PDF links ("remote go-to actions"). All other links are treated as Internet URIs, and open in a browser.
  21. show-destination is honored for creation of links between PDF documents ("remote go-to actions") in PDF and PostScript generators. In other cases, the attribute is not applicable.
  22. Only "before" and "after" values are implemented: caption-side = "start" falls back to "before," and caption-side="end" falls back to "after."
  23. In the current implementation, all cells present in the source document are shown regardless of whether their content is empty; cells not present in the source are not visible at all.
  24. Bidi implementation differs from Unicode Bidi algorithm: any markup element opens a new level of embedding. Consequently, unicode-bidi = "normal" is not supported (treated as "embed" ); see detailed discussion below.
  25. Only "lr-tb" and "rl-tb" values are supported. All other values are treated as "lr-tb."
Personal tools