Altova XMLSpy 2024 Enterprise Edition

icEnableBackMapping

This command, which is also available in the Main toolbar, switches on the Back-Mapping feature.

 

After Back-Mapping has been enabled (via this command), XSLT transformations and XQuery executions will be carried out so that the result document can be mapped back on to the originating XSLT+XML or XQuery+XML documents. This means that if you click on a node in the result document, then the XSLT instruction and the XML source data that generated that particular result node will be highlighted (see screenshot below). This is useful for checking how exactly the XSLT transformation or XQuery execution creates the different parts of the result document. You can also click a node in either the XSLT/XQuery document or XML document to view the corresponding parts in the other two documents.

 

Note:Result documents of all types except HTML are opened in Text View. HTML result documents are opened in Browser View, but you can switch to Text View. If the result document is opened in Browser View, then back-mapping is available only by selecting in the result document; back-mapping is not available by selecting in either the XML or XSLT/XQuery document.

 

Note:Back-mapping is not available for transformations from Authentic View or those that are run as project transformations.

 

The screenshot below shows the back-mapping of an XSLT transformation. All three documents—XML+XSLT+Result—are tiled vertically, in that order, next to each other. The XSLT instruction that generates the section/@id attribute in the result document has been clicked. As a result, all the result nodes generated from this instruction are highlighted, as well as the XML source data from which the result node was generated. You can also click nodes in the result document or XML document to highlight the corresponding nodes in the other two documents.

Click to expand/collapse

When you click the Enable XSLT/XQuery Back-Mapping command, a dialog appears that asks whether you wish to tile the document windows after transformation. If you choose to do this, then the three documents will be tiled vertically side-by-side as in the screenshot above.

 

Note the following points:

 

Only XML documents that are loaded from a disk location are displayed; temporary trees are not displayed.

In some cases, such as XQuery executions, the result document is created without obtaining data from any XML source. In these cases, no XML file is involved in the back-mapping; as a result, none is displayed.

If multiple XML files are used as data sources, then the first one to be encountered in the transformation or execution process is displayed.

Back-mapping is slower and more memory-intensive than transformations/executions that are not back-mapped. Be aware of this especially when working with large files.

The context menu of the result document (when tiled and not tiled) contains commands (Go to Context Node and Go to Source Instruction) to take you to the corresponding nodes in the XML and XSLT/XQuery document, respectively.

 

The Back-Mapping toolbar

The Back-Mapping toolbar (screenshot below) contains the following icons:

tbBackMapping

Highlight HTML in Browser View on mouseover: If the result document is displayed in Browser View, then back-mapping is available only by selecting content in the result document; it is not available by selecting in either the XML or XSLT/XQuery document. In Browser View, you can select content for back-mapping in one of two ways: (i) by clicking content in Browser View, or (ii) by mousing over content. Use this toggle command to choose between the two selection methods. Mousing over is useful in cases where clicking content in Browser View might cause a change in the result document (for example, by clicking a radio button or combo box).

End back-mapping session: Ends the back-mapping session.

 

Ending the back-mapping session

While a back-mapping session is running, an End Back-Mapping Session icon is displayed in the Back-Mapping toolbar (see above). Click it to end the back-mapping session. You should use the back-mapping session for diagnostics only. If you wish to edit any of the documents, it is best to end the back-mapping session before editing.

 

Text highlighting colors

The colors of the active back-mapping (back-mapped content that is currently selected) and inactive back-mapping  (back-mapped content that is not selected) can be set in the Miscellaneous category of the Text Font settings (Tools | Options | Fonts and Colors).

 

© 2017-2023 Altova GmbH