Altova XMLSpy 2024 Enterprise Edition

The Templates Window is available for XSLT debugging only (not for XQuery debugging).

 

The Templates Window displays the various templates used in the XSLT stylesheet, including built-in templates and named templates. Matched templates are listed by the nodes they match. Named templates are listed by their name. For both types of template, the mode, priority, and location of the template are displayed.

XSDebuggerInfoWinTemplates

The Templates Window displays all the templates of the XSLT stylesheet:

 

Named templates are templates that are identified by a name. In the Templates Window such templates are listed with their names in the Names column. In the screenshot above, there is one named template; it has a name of section-summary.

Matched templates are those templates that are matched by a test, such as a node-name test or a node-type test. In the screenshot above, there are three matched templates: one that matches the root element and two that match the element named OrgChart.

Built-in templates are those that, according to the XSLT specifications, must be provided by the XSLT processor. They can be identified by their entries in the Location column. In the screenshot above, for example, the xslt-2.0 entry identifies these templates as the built-in templates of the Altova XSLT 2.0 processor (which is being used because the current XSLT stylesheet is an XSLT 2.0 document).

 

Note the following points:

 

Click an entry in this window, to go to the corresponding template in the XSLT document window.

If a template's mode attribute has been specified, then this value is shown in the Mode column of that template. For example, in the screenshot above, we see that there are two templates that match the element named OrgChart. One of them has a mode value set to DE, while the other has a mode value set to EN. (Modes are used to process the same content in different ways. In our example, the OrgChart content could be processed once with a template for DE output and values and once with a template for EN output.)

The Priority column lists the priority value assigned to a template. If there is more than one template that matches a node, then the XSLT precedence rules for template selection are used to determine which template will be used. If after all the precedence rules are exhausted and there is still more than template that can be applied, then the template with the highest priority value will be used. While debugging, you can compare priority values in this window to identify problems.  

 

© 2017-2023 Altova GmbH