The template is the basic module or building block of
the XSLT stylesheet. The <xsl:param> element allows you
to write a template that can take argument (parameter)
values.
Each parameter to a template must have a unique name,
supplied via the name attribute.
When a template is applied, the values of its parameters are determined by this process:
If the calling template supplies a value for the
parameter by using an <xsl:with-param>, the
parameter will be set to that value.
If the calling template does not supply a value,
but the <xsl:param>
element defines a default value, the parameter is set
to that default value.
If the <xsl:param> element of the
template doesn't supply a default value, the
parameter is set to an empty string.
There are two ways to specify the default value of
a parameter. You can supply the value as a select attribute, or you can
put the value inside the content of the <xsl:param> element. So these
two constructs work the same:
<xsl:param name="color" select="'green'"/>
<xsl:param name="color">green</xsl:param>Attributes:
name (required)The name of this parameter.
selectThe default value for this parameter, if any.