Extension Instructions Calling Named Templates

If the name of a named template uses a namespace listed in an extension-element-prefixes attribute, then a call on the named template may be written as an extension instruction, as an alternative to using xsl:call-template.

For example, if the template is declared as:

<xsl:template name="x:indent"> <xsl:param name="spaces" as="xs:integer"/> <xsl:value-of select="'&#xa;' || string-join((1 to $spaces)!' ')"/> </xsl:template>

Then it may be invoked by writing:

<x:indent spaces="4"/>

which (assuming the presence of extension-element-prefixes="x") is equivalent to:

<xsl:call-template name="x:indent"> <xsl:with-param name="spaces" select="4"/> </xsl:call-template>

Attributes on the extension instruction are mapped to parameters declared in the named template. The rules for passing parameters are as follows:

Parameters that may be omitted (and defaulted) in an xsl:call-template instruction may similarly be omitted in the extension instruction.

The extension instruction must have no children other than xsl:fallback.

There is no way to supply tunnel parameters.