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.
About this task
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:
Procedure
- Open your XSL file in the XSL editor.
- Click the Snippets tab, open the
XSL drawer,
and then double-click xsl:call-template element.
- 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.
- If the template you are calling has parameters,
they will be added
to the Parameter list. For each parameter:
- In the Name field,
review the name of
parameter. You cannot change it
- 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.
- Click Finish.
Results
The <xsl:call-template> element will
be inserted into the
XSL file.