History | Edit

The xsl:template is the basic element for stylesheets transformation. The Templates view is only available during XSLT debugging sessions and shows all xsl:template instructions used by the transformation. If the view is not displayed, it can be opened by selecting it from the Window > Show View menu.

Being able to see the number of hits for each of the templates allows you to get an idea of the stylesheet coverage by template rules with respect to the input source.

Figure: Templates view

The contextual menu contains one action: Go to, which moves the selection in the editor panel to the line that contains the XSLT template displayed on the selected line from the view.

Table 1. Templates columns
Column Description
Match The match attribute of the xsl:template.
Hits The number of hits for the xsl:template. Shows how many times the XSLT processor used this particular template.
Priority The template priority as established by XSLT processor.
Mode The mode attribute of the xsl:template.
Name The name attribute of the xsl:template.
Resource The resource file where the template is located. The complete path of the resource file is available as tooltip.
Important: Remarks:
  • Clicking a record highlights that template definition inside the resource.
  • Saxon only shows the applied templates having at least one hit from the processor. Xalan shows all defined templates, with or without hits.
  • Template table values can be sorted by clicking the corresponding column header. When clicking a column header the sorting order switches between: ascending, descending, no sort.
  • Xalan shows also the built-in rules.