Home >Online Product Documentation >Table of Contents >xsl:with-param
Passes a parameter value to a template.
The xsl:with-param instruction passes a parameter value to a template. If the template has no matching xsl:param declaration, the XSLT processor ignores the parameter. The value of parameter_name is a qualified name.
The name attribute is required, and it must be a string. The value of the name attribute is a qualified name.
The value that you pass to a template can be an object of any of the types that are returned by expressions. You can specify the value of the parameter in several ways:
select attribute. The value of the select attribute must be an expression. The XSLT processor evaluates the expression, and the result is the value of the parameter. If you specify the select attribute, you must not specify any contents for the xsl:with-param instruction. In other words, do not specify parameter_value.expr attribute. It is interpreted as an attribute value template. It allows computation of the value expression.select or expr attribute.
The xsl:with-param element must be a child of xsl:apply-templates or xsl:call-template.
You can specify the xsl:with-param instruction in xsl:call-template and xsl:apply-template instructions.
Suppose you specify the following parameter for a template:
You can pass another value for this variable as follows:
