Applying Templates

The xsl:apply-templates instruction allows you to control the order of operations when you apply a stylesheet. For an in-depth description of how the XSLT processor applies templates, see How the XSLT Processor Applies a Stylesheet.

To apply a template so that you can see the output in the Preview window, you must apply the entire stylesheet. Press F5 to apply the stylesheet and refresh the output. If Stylus Studio detects any errors in the stylesheet or in the XML source document, it displays a message that indicates the cause and location of the error.

In the Preview window, in the Text view, the text with a gray background was generated by the template the cursor is in. If the editor is in Template mode, the text with the gray background was generated by the currently visible template.

Free Stylus Studio XML Training:
W3C Member