Next / Previous / Contents / TCC Help System / NM Tech homepage

8.6. <xsl:with-param>: Pass an argument to a template

This element is used inside either <xsl:call-template> or <xsl:apply-templates> to pass argument (parameter) values to the called template. The name attribute of this element must match one of the parameter names in the called template; see <xsl:param>, above. Attributes:

name (required)

Specifies the name of the parameter to which we're passing the value.

select

Specifies the value we're supplying to the parameter.

If the select attribute is omitted, you can supply the value as content; otherwise, the element is empty. These two constructs have the same effect:

    <xsl:with-param name="color" select="'green'"/>
    <xsl:with-param name="color">green</xsl:with-param>