B. Parameters of the XSLT stylesheets used to convert XHTML to XSL-FO
Prev |  |

## B. Parameters of the XSLT stylesheets used to convert XHTML to XSL-FO

Parameter | Value | Default Value | Description
--- | --- | --- | ---
`apply-css-styles` | `'no'` | `'yes'` | `'yes'` | Specifies whether CSS styles specified in XHTML `style` attributes, `style` and `link` elements also apply to the XSL-FO file[a]. Depending on the context, the following CSS properties are converted to their equivalent XSL-FO attributes. The corresponding shorthand CSS properties are supported too. Any other CSS property is ignored. margin-top, margin-right, margin-bottom, margin-left. padding-top, padding-right, padding-bottom, padding-left. border-top-style, border-right-style, border-bottom-style, border-left-style. border-top-width, border-right-width, border-bottom-width, border-left-width. border-top-color, border-right-color, border-bottom-color, border-left-color. background-color, background-image, background-repeat, background-position. color. font-family, font-style, font-weight, font-size. text-decoration. text-align. text-indent. vertical-align. line-height. list-style-type, list-style-position, list-style-image. width, height. caption-side. border-spacing. ### Important This feature, which leverages XMLmind XML Editor CSS engine, will not work unless the XSLT stylesheets are being invoked by an XMLmind application such as XMLmind XML Editor or XMLmind XSL Utility.
`base-font-size` | Length in `pt` | `'10pt'` | The size of the font used for most body elements (paragraphs, tables, lists, etc). All the other font sizes are computed relatively to this font size.
`external-href-after` | String | `']'` | Appended after the external URL referenced by an `a` element. Ignored unless `show-external-links='yes'`.
`external-href-before` | String | `' ['` | Separates the text of an `a` element from its referenced external URL. Ignored unless `show-external-links='yes'`.
`font-family` | One or more font families separated by commas | `'serif'` | The font family used by default for all elements.
`footer-center` | A mix of text and variables. | `''` | Specifies the contents of the central part of a page footer. See the section called “Specifying a header or a footer”.
`footer-center-width` | String representing an integer larger than or equal to 1. | `'6'` | Specifies the proportional width of the central part of a page footer. See the section called “Specifying a header or a footer”.
`footer-left` | A mix of text and variables. | `'{{even-page-number}}'` | Specifies the contents of the left part of a page footer. See the section called “Specifying a header or a footer”.
`footer-left-width` | String representing an integer larger than or equal to 1. | `'2'` | Specifies the proportional width of the left part of a page footer. See the section called “Specifying a header or a footer”.
`footer-right` | A mix of text and variables. | `'{{odd-page-number}}'` | Specifies the contents of the right part of a page footer. See the section called “Specifying a header or a footer”.
`footer-right-width` | String representing an integer larger than or equal to 1. | `'2'` | Specifies the proportional width of the right part of a page footer. See the section called “Specifying a header or a footer”.
`footer-separator` | `'no'` | `'yes'` | `'yes'` | Specifies whether an horizontal rule should be drawn above the page footer. See the section called “Specifying a header or a footer”.
`header-center` | A mix of text and variables. | `'{{document-title}}'` | Specifies the contents of the central part of a page header. See the section called “Specifying a header or a footer”.
`header-center-width` | String representing an integer larger than or equal to 1. | `'6'` | Specifies the proportional width of the central part of a page header. See the section called “Specifying a header or a footer”.
`header-left` | A mix of text and variables. | `''` | Specifies the contents of the left part of a page header. See the section called “Specifying a header or a footer”.
`header-left-width` | String representing an integer larger than or equal to 1. | `'2'` | Specifies the proportional width of the left part of a page header. See the section called “Specifying a header or a footer”.
`header-right` | A mix of text and variables. | `''` | Specifies the contents of the right part of a page header. See the section called “Specifying a header or a footer”.
`header-right-width` | String representing an integer larger than or equal to 1. | `'2'` | Specifies the proportional width of the right part of a page header. See the section called “Specifying a header or a footer”.
`header-separator` | `'no'` | `'yes'` | `'yes'` | Specifies whether an horizontal rule should be drawn below the page header.
`hyphenate` | `'no'` | `'yes'` | `'no'` | Specifies whether words may be hyphenated.
`justified` | `'no'` | `'yes'` | `'no'` | Specifies whether text (e.g. in paragraphs) should be justified (that is, flush left and right) or just left aligned (that is, flush left and ragged right).
`page-orientation` | `'portrait'` | `'landscape'` | `'portrait'` | The orientation of the printed page.
`page-ref-after` | String | `']'` | Appended after the page number pointed to by an `a` element. Ignored unless `show-xref-page='yes'`.
`page-ref-before` | String | `' ['` | Separates the text of an `a` element from the page number it points to. Ignored unless `show-xref-page='yes'`.
`paper-type` | Allowed values are: `'Letter'`, `'Legal'`, `'Ledger'`, `'Tabloid'`, `'A0'`, `'A1'`, `'A2'`, `'A3'`, `'A4'`, `'A5'`, `'A6'`, `'A7'`, `'A8'`, `'A9'`, `'A10'`, `'B0'`, `'B1'`, `'B2'`, `'B3'`, `'B4'`, `'B5'`, `'B6'`, `'B7'`, `'B8'`, `'B9'`, `'B10'`, `'C0'`, `'C1'`, `'C2'`, `'C3'`, `'C4'`, `'C5'`, `'C6'`, `'C7'`, `'C8'`, `'C9'`, `'C10'` (case-insensitive). | `'A4'` | A convenient way to specify the size of the printed page. It is also possible to specify a custom paper type by ignoring the `paper-type` parameter and directly specifying the `page-width` and `page-height` parameters.
`show-external-links` | `'no'` | `'yes'` | `'no'` | Specifies whether the external URL referenced by an `a` element should be displayed right after the text contained by this element. Example: `show-external-links='yes'` causes `<a href="http://www.oasis-open.org/">Oasis</a>` to be rendered as follows: `Oasis [http://www.oasis-open.org/]`.
`show-xref-page` | `'no'` | `'yes'` | `'no'` | Specifies whether the page number corresponding to the internal link target referenced by an `a` element should be displayed right after the text contained by this element. Example: `show-xref-page='yes'` causes `<a href="#introduction">Introduction</a>` to be rendered as follows: `Oasis [3]`.
`two-sided` | `'no'` | `'yes'` | `'no'` | Specifies whether the document should be printed double sided.
`ul-li-bullets` | One or more bullet characters separated by spaces | `'&#x2022; &#x2013;'` | Specify which bullet character to use for an `ul`/`li` element. Additional characters are used for nested `li` elements. For example, if `ul-li-bullets="* - +"`, "`*`" will be used for `ul`/`li` elements, "`-`" will be used for `ul`/`li` elements contained in a `ul`/`li` element and "`+`" will be used for `ul`/`li` elements nested in two `ul`/`li` elements.
[a] In addition to the presentation attributes (`xsl:attribute-set`) specified in the XSLT stylesheets that generate the XSL-FO file

## Specifying a header or a footer

The header or the footer of a generated PDF, RTF, etc, page has 3 columns.

Figure B.1. Layout of a header

The width of these columns may be specified using the `header-left-width`, `header-center-width`, `header-right-width` parameters for the header and the `footer-left-width`, `footer-center-width`, `footer-right-width` parameters for the footer.

The width of a column is specified as an integer which is larger than or equal to 1. This value is the proportional width of the column. For example, if the left column has a width equal to 2 and the right column has a width equal to 4, this simply means that the right column is twice (4/2 = 2) as wide as the left column.

The contents of these columns may be specified using the `header-left`, `header-center`, `header-right` parameters for the header and the `footer-left`, `footer-center`, `footer-right` parameters for the footer.

When `header-left`, `header-center`, `header-right` are all specified as the empty string, no header is generated. When `footer-left`, `footer-center`, `footer-right` are all specified as the empty string, no footer is generated.

The content of a column is a mix of text and variables. Example: "`Page {{page-number}} of {{page-count}}`".

Supported variables are:

`{{document-title}}`

  The title of the document.

`{{current-heading}}`

  In principle, the title of the last `h1`, `h2`, `h3`, etc, element being rendered.

  No effect unless the XSLT stylesheets are customized in order to give a value to this variable.

      <fo:marker
        marker-class-name="current-heading">
        ...
      </fo:marker>

`{{page-number}}`

  Current page number.

`{{odd-page-number}}`

  Current page number; empty when a double-sided output is being generated and the current page number is even.

`{{even-page-number}}`

  Current page number when a double-sided output is being generated and the current page number is even; empty otherwise.

`{{page-count}}`

  Total number of pages of the document.

`{{break}}`

  A line break.

`{{image(`URI`)}}`

  An image having specified URI. A relative URI is resolved against the current working directory. Example: "`{{image(artwork/logo.svg)}}`".

  The image is displayed at its intrinsic size. If it is too tall to fit in a page header or footer, you may need to increase the height of the header or footer by using the following parameters: `header-height`, `body-top-margin`, `footer-height`, `body-bottom-margin`.

`{{url(`URI`)}}`

  A styled hyperlink to specified URI. No attempt is made to resolve a relative URI. The specified URI may be optionally followed by a space character and then, the text of the link. Examples: "`{{url(http://www.xmlmind.com/xmleditor/)}}`", "`{{url(http://www.xmlmind.com/xmleditor/ XMLmind XML Editor)}}`"

## Advanced parameters

Parameter | Value | Default Value | Description
--- | --- | --- | ---
`body-bottom-margin` | Length | `'0.5in'` | See figure below.
`body-top-margin` | Length | `'0.5in'` | See figure below.
`footer-height` | Length | `'0.4in'` | See figure below.
`header-height` | Length | `'0.4in'` | See figure below.
`img-src-path` | URI ending with '`/`' | `''` | If this parameter is not empty and if the value of the `src` attribute is a relative URI, then this parameter is prepended to the value of the `src` attribute. This low-level alternative to `resolve-img-src='yes'` also allows to generate an XSL-FO file where all the references to graphic files are absolute URIs.
`page-bottom-margin` | Length | `'0.5in'` | See figure below.
`page-height` | Length. Example: `'297mm'`. | Depends on `paper-type`. | The height of the printed page.
`page-inner-margin` | Length | if parameter `two-sided` is specified as `'yes'` then `'1.25in'` otherwise `'1in'`. | See figure below.
`page-outer-margin` | Length | Default value: if parameter `two-sided` is specified as `'yes'` then `'0.75in'` otherwise `'1in'`. | See figure below.
`page-top-margin` | Length | `'0.5in'` | See figure below.
`page-width` | Length. Example: `'8.5in'`. | Depends on `paper-type`. | The width of the printed page.
`resolve-a-href` | `'no'` | `'yes'` | `'no'` | In the XSL-FO file, convert relative URIs contained in the `href` attribute of `a` elements to absolute URIs. This is done by resolving the relative URI against the base of the `a` element.
`resolve-img-src` | `'no'` | `'yes'` | `'yes'` | In the XSL-FO file, convert relative URIs contained in the `src` attribute of `img` elements to absolute URIs. This is done by resolving the relative URI against the base of the `img` element.
`root-id` | ID found in the source XHTML document | `''` | If this parameter is not empty, it must be the value of an `id` attribute that occurs in the document being formatted. The entire document will be loaded, but formatting will begin at the element identified, rather than at the root element. For example, this allows to convert a specific `div` element rather than the whole XHTML document.
`screen-resolution` | Number | `96.0` | Screen resolution in DPI. Used to convert `px` to `pt`.

Figure B.2. Page areas

## System parameters

### Note

The following parameters are expected to be automatically specified by the application invoking the XSLT stylesheets. Such system parameters are not intended to be specified by the end-user. Such system parameters are documented here only because the end-user may see them referenced in some dialog boxes or in some configuration files.

Parameter | Value | Default Value | Description
--- | --- | --- | ---
`foProcessor` | String. Examples: '`FOP`', '`XEP`', '`XFC`'. | If `outputFormat` has been specified and if system property XSL_FO_PROCESSORS contains the list of all available XSL-FO processors, the default value is computed, otherwise the default value is `''`. | The name of the XSL-FO processor used to convert the XSL-FO file generated by the XSLT stylesheets to the target output format.
`outputFormat` | String. Examples: '`ps`', '`pdf`', '``rtf``', '`wml`', '`docx`', '`odt`'. | `''` | The file extension of the target output file.

Prev |  |
A. Table rendering | Home |