How to Use Execution View to Prevent or Troubleshoot Runtime Errors

To launch the Execution View dialog, right-click the canvas (center) pane, and select Execution View. Alternatively, click the Execution View for XSLT Map button on the XSLT toolbar.

The Execution View is available in both the Map and XSLT views. However, it is most useful when the map contains multiple templates and the user needs to figure out as to where the templates are being invoked.

Figure 41-49 shows the Execution View dialog for an XSLT map that contains multiple templates. As per the execution view, the root template with match='/' executes first. This is followed by the creation of the Invoice, Description, and ID nodes. An apply-templates statement then invokes the ShipTo template followed by an apply-templates statement that invokes the BillTo template. Other nodes and templates are then created.

Figure 41-49 Execution View Dialog and Corresponding XSLT Tree

Description of Figure 41-49 follows
Description of "Figure 41-49 Execution View Dialog and Corresponding XSLT Tree"

If you click an element in the Execution View tree, the corresponding element is highlighted in the XSLT tree. For example, as shown in Figure 41-49, if you want to locate the apply-templates node that invokes the BillTo template, select the apply-templates node in the Execution View and the corresponding apply-templates statement is highlighted in the XSLT pane.

Execution View also shows calls to named templates. When you select a node inside a named template call in the Execution View tree, the XSLT editor view is refreshed to show the selected node in the named template implementation.

Execution View helps you understand the overall flow of an XSLT stylesheet. Using the Execution View, you can locate issues related to templates that are not invoked, or apply-templates statements that are invoking incorrect templates.

When using imported named templates or template rules, Execution View shows the corresponding calls, and you can use Execution View to troubleshoot problems like import precedence. However, Execution View cannot navigate to the external XSLT files.