Mapping Assistant

The Mapping Assistant helps you determine the mapping that is applying a particular style, and to create new mappings in the context of your data. It uses information produced by the composition engine to display both the elements in the source data and the mappings used to style them. This information is only created if the appropriate option is set on the Compose tab of the partition properties.

To open the Mapping Assistant press the button or select View » Mapping assistant.

The left hand panel displays information about the data. At the top is a tree view where each node represents an XML element in the document. If a mapping was selected for the element the node displays its name in bold. If no mapping was selected the element name appears in italic (see product in the above example).

A “+” after a mapping name indicates that the style was modified at runtime, either by a variable reference or a command such as <font-properties>.

In the data view the up and down arrow keys can be used to navigate through the items. You can also use Ctrl+UP to move to the parent of the current item.

Below the tree view is a panel displaying information about the element corresponding to the selected node. The first line shows the document path for this element (the names of the element and its ancestors). The table displays the names and values of the element attributes.

The right hand panel displays the text and image content of the document. The content has some styling applied, although complex styles such as boxes, tables and some font effects do not appear. Below the text display are some controls that allow you search for a piece of text.

The content display does not include page-oriented data such as headers and footers.

Images and note references are represented by small buttons. Click on the button to open a pop-up viewer. This behavior can be modified in the text preferences. The button label varies according to the data it represents:

  • For an image the button will show an image thumbnail or a generic icon if a thumbnail cannot be generated.

  • For footnotes the button label is the text used for the reference.

  • Sidenotes are displayed with the label “SN”.

  • Floats are displayed with the label “FLOAT”.

The amount of text displayed is limited in order to keep the application responsive. You can adjust the limit in the text preferences. When developing a stylesheet it is a good idea to work with a small document that contains examples of all the structures you need to style.

[Warning] Warning

If there is insufficient memory available to load the document the application may become unstable and prevent you from saving changes to mappings.

It is recommended that you avoid large values of the text limit to prevent this. If the document contains a large number of images you can reduce the memory requirements by disabling thumbnails in the text preferences.

On a 64-bit operating system it is possible to increase the amount of memory available by using a 64-bit runtime. This can be done by defining the TLGUI_JAVAEXE environment variable as described in the documentation for the Preferences dialog.