The <topleaf-properties/> command

Set default stylesheet mapping properties.

Where allowed

The $document mapping.

Range of effect

The entire document.



Sets a vertical threshold below which column balancing is not applied. This prevents the application of column balancing to pages where the last column of a layout is almost full. The default column balance threshold is 50 points (17.65mm).


Specifies the binding algorithm used by TopLeaf when resolving explicit binds (for example, a bind to following paragraph or a bind to previous paragraph).

The permitted values are:

  • normal — use the default binding algorithm to resolve all explicit bindings.

  • legacy — use the TopLeaf legacy binding algorithm to resolve explicit bindings. The legacy binding algorithm was the default in all legacy TopLeaf stylesheets.

    [Warning] Warning

    If you need to use the legacy binding algorithm then declare the command:

    <topleaf-properties binding="legacy" />

    in your $document tag mapping.

    Some of the known differences between the default binding mode and the legacy binding mode are listed below:

    Binding Binding algorithm support
    normal legacy
    Bind to next segment Yes Yes
    Bind to previous segment Yes No
    Bind between a paragraph and adjacent table row Yes No
    Set binding properties for the current element Yes No

When TopLeaf renders the content of a multi-column page layout, the columns of that layout at the end of a page or section may be only partially filled. If all columns in the segment are not used, you can horizontally align the columns that contain content within the page layout data area. The alignment is one of left, right, center, inside, or outside. The default horizontal column alignment is left.


Sets the column balancing mode when rendering a multi-column page layout. Permitted values are:

  • yes — reduce the depth of the rendered content by distributing it between the columns.

  • minimal — as for yes, but using the smallest possible number of columns.

  • no — column balancing is disabled. Content flows into the next column only when the previous column is full.

The default column balancing mode is inherited from the mode declared in the Format » Options dialog.


Specifies the default device resolution used when determining image sizes. If not defined, TopLeaf uses the resolution of the current display device.

If you use images that do not set an explicit resolution it is recommended that you set this value in order to obtain consistent results.


When comparing the current and published versions of a looseleaf or change pages document, specifies the maximum width that an existing interword space may vary and still be regarded as unchanged. The default is 1 decipoint.


Declares the name of an import folder, URL, or UNC path used to resolve references to included images and XML documents identified by a relative file path.


Determines how TopLeaf interprets xml:lang attributes present in a document.

If the value is honor, then TopLeaf will set the current language using the language identifier in the xml:lang tag attribute. The language code is used by TopLeaf to control hyphenation rules, line breaking, and text directionality. This is the default setting.

If the value ignore, then the value of the xml:lang attribute has no special meaning.

In both cases, the language assumed for any element context will be determined by:

The assigned language code is accessible from the {language} system variable and remains active throughout the scope of the current element (this means that it is inherited by all elements within that element).


Defines the circumstances in which the font leading is used to vertically positioning content on a page. By default, leading is applied when positioning successive lines of type, but not when spacing between a paragraph and a following table or boxed content. Set this property to any if you need to override this behaviour.

Permitted values are default or any.


Enables or disables legacy processing of named character entities.

In earlier versions of TopLeaf, references to named character entities not defined in a DTD or in the internal DTD subset were automatically mapped to a near or equivalent character in the Symbol typeface. Later versions of TopLeaf map references to named character entities not defined in a DTD or in the internal DTD subset to a specific Unicode code point.

If the value is yes legacy processing of named character entities is enabled. If the value no (the default), then legacy processing of named character entities is disabled.


Enables or disables TopLeaf’s legacy quote character processor.

In earlier versions of TopLeaf, the characters ` (U+0060) and ' (U+0027) were automatically translated to the single quote characters (U+2018) and (U+2019). This was a convenience for users with TopLeaf legacy data, but is inappropriate to the rendering of XML/SGML data. This function has been disabled for anything other than TopLeaf legacy data.

If the value is yes, then TopLeaf's legacy quote character processor is enabled. If the value is no (the default), then TopLeaf's legacy quote character processor is disabled.


Specifies the order in which content is declared within an output page. The permitted values are:

  • normal — The content of each page is declared within a series of blocks. Header and footer blocks are declared first, followed by the content of each data block. In a multi-column page layout, the content within the first block is followed by the content within the second block, and so on. This is the default.

  • legacy — Lines within a page are declared according to their vertical position. Lines at the top of the page are declared first, and lines at the bottom of the page are declared last.


Declares the image rescaling mode when processing content containing unbreakable objects that have a depth exceeding the depth of a data column.

The permitted values are:

  • yes — If the vertical depth of an unbreakable object exceeds the maximum depth of a data column, attempt to scale any contained images so that the object fits within the column.

  • paragraph — If the vertical depth of a paragraph exceeds the maximum depth of a data column, attempt to scale any contained images so that the paragraph fits within the column. Content bindings within or between the paragraph are ignored when determining the size of any scaled images.

  • no — Do not attempt to fit images within the maximum data column depth.

  • legacy —Apply legacy image rescaling. The presence of running heads, notes, or float objects present within the data column are ignored when determining the scaled image size. This mode was the default in all TopLeaf builds prior to 7.6.061.


This sets the value of the minimum segment split height for all segments. It is used when there is insufficient space remaining on the page for a segment.

When a segment is split over multiple pages, the height of the content on the first and last pages will be at least the value of the minimum split height. As a consequence, a segment with a height less than twice this value will not be split.

The default minimum segment split height is 57.5 points (20mm).


Specifies the page assembly timeout interval, expressed in seconds. The typesetting engine starts a timer running before assembling the content of each page. The typesetting engine will force an error exit if a page is not assembled within the page assembly timeout interval. The default timeout interval is 180 seconds. You may need to increase the timeout interval if your style sheets process a large number of mappings — for example, by loading an included Xref table — before rendering the content of a page. The specified timeout interval must be in the range 60 — 32767 seconds.


Specifies the maximum depth to which tags and custom markers may be nested. If this depth is exceeded the typesetting will exit.

The default value is 500. A value of zero allows unlimited nesting.


Specifies the algorithm used by TopLeaf to resolve the width of an interword space. When you set this property to legacy, TopLeaf uses an algorithm that assumes a uniform font size within a paragraph. If your paragraph content uses mixed font sizes then set this value to normal. If not specified, the default value is legacy.

[Warning] Warning

For some stylesheets, changing the wordspace property may also change the line break position within a paragraph. In a publication that relies on output differencing, this can have a significant effect on every page of a document.

Import Folders

Relative pathnames identify an included image or XML document located relative to the folder containing the current XML document.





TopLeaf always attempts to resolve a relative file path using the folder containing the current document or file. If a relative file path cannot be resolved using this method, TopLeaf attempts to resolve the relative file path using the value of the import folder path.

The value of the import folder path can be one of the following:

  • a folder within the local file system;

  • a folder identified by a UNC pathname;

  • a folder identified by a URI pathname


S:\Clients\My Projects\Documents

\\server\Clients\My Projects\Documents