Skip to content
CallTemplate

CallTemplate

Invoke a named Template. Parameters are passed with Param children, whose select expressions are evaluated in the calling context. The parameter bindings are scoped to the template body.

Child elements

Param

Parent elements

AtPageCreation, AtPageShipout, Case, Contents, ForAll, Loop, Otherwise, Record, Template, Until, While

Attributes

name (text)
The name of the template to call.

Example

<Template name="headline">
  <Param name="text"/>
  <PlaceObject>
    <TextBlock>
      <Paragraph><B><Value select="$text"/></B></Paragraph>
    </TextBlock>
  </PlaceObject>
</Template>

<Record match="chapter">
  <CallTemplate name="headline">
    <Param name="text" select="@title"/>
  </CallTemplate>
</Record>

See also