Adding <xsl:call-template> elements to XSL files

The <xsl: call-template> element is used for invoking a template by its name. It has a required name attribute that identifies the template to be invoked.

The following instructions were written for the Resource perspective, but they will also work in many other perspectives.

Follow these steps to add an <xsl:call-template> element to your XSL file. The <xsl:call-template> element will be displayed in a read-only field as it is being created:

  1. Open your XSL file in the XSL editor.
  2. Click the Snippets tab, open the XSL drawer, and then double-click xsl:call-template element.
  3. In the Call template name field, select the name of the template you want to call. Only templates with a name attribute will appear in this list.
  4. If the template you are calling has parameters, they will be added to the Parameter list. For each parameter:
    1. In the Name field, review the name of parameter. You cannot change it
    2. In the Select field, type the default value of the parameter. Click XPath if you want to  use the XPath Expression wizard to create the default value.
  5. Click Finish.
The  <xsl:call-template> element will be inserted into the XSL file.
Related concepts
XSL editor

Feedback