How to select appropriate XSL-FO object for debugging

Let us identify the process of formatting XSL-FO file with a set of object properties to be displayed in layers as the process of debugging FO document. FO objects or groups of objects for debugging can be viewed in the XSL-FO objects tree:



You will find a detailed description of XSL-FO objects forming this tree in the following section.

Selecting groups of FO objects

You may select the following groups of FO objects by ticking tree nodes:

All XSL-FO tags
if you tick this tree node all possible boxes, baselines and breaks will be displayed. In other words, the resulting PDF document will contain the widest set of layers.
Block-Level XSL-FO tags (%block)
if you tick this tree node all possible boxes and breaks will be drawn for the block-level objects which are defined according to specification. In other words, the resulting PDF document will contain the complete set of layers for blocks and block-containers.
Inline-Level XSL-FO tags (%inline)
if you tick this tree node all possible boxes and baselines will be drawn for the inline-level objects which are defined according to specification. In other words, the resulting PDF document will contain the complete set of layers for inlines, inline-containers, leaders etc.
Text Lines
if you tick this tree node all possible boxes and baselines will be drawn for the text lines. In other words, the resulting PDF document will contain the complete set of layers for each nonempty document line.
Particular XSL-FO tags
if you tick this tree node the result will be similar to selecting "All XSL-FO tags" node. But you may expand this tree node and select any particular XSL-FO object to be debugged. In other words, the resulting PDF document will contain the complete set of layers for all selected XSL-FO objects. Of course, these sets differ for distinct objects. All objects support drawing boxes. Block-level, table objects, list object and fo:float support drawing boxes and breaks. Inline-level objects support drawing baselines and boxes.
Tag with specific ID
Actually, if you tick this tree node nothing changes unless you set up the id for some object in FO file and add this id to the objects tree to be displayed. The resulting PDF document will contain the complete set of layers for the object with the selected id. This feature is convenient when you need to debug some specific FO object, not the class of the objects.

Selecting specific object properties

Suppose, you need to display either baselines or boxes or breaks only. In this case you have to perform the following steps: choose the object or the group of objects, expand the tree node and tick necessary groups of properties like this:



You may also specify the final look of debugged objects more accurately if you learn how to use the Properties Window. You will also find there the examples of formatted documents.

Adding specific IDs to the objects tree

You have to add your own IDs to the object tree if you wish to use debugging for objects with specific ID. In order to add fo:ID to the objects tree choose "Add new FO tag ID" item of the context menu for "Tag with specific ID" tree node:



After this a new subnode named "id0" will appear under the "tag with specific ID":



Now you may specify the desired value of ID. Later you may edit, delete or duplicate this ID item using context menu:



Also, it is possible to select debugged properties for the object with specific ID.

As you have selected objects and properties to be debugged you may format your XSL-FO document. Please, consult How to format XSL-FO file? section to find out how to perform this operation.




Send comments on this topic.

© Altsoft Company. All rights reserved.