xsl:with-param Element

Passes a parameter to a template.

<xsl:with-param
  name = QName
  select = expression>
</xsl:with-param>

Attributes

  • name
    [required] Specifies the name of the parameter.
  • select
    An expression to be matched against the current context. There is no default value. An empty string is generated if there is no content.

Element Information

Number of occurrences Unlimited
Parent elements xsl:call-template, xsl:apply-templates
Child elements xsl:apply-templates, xsl:attribute, xsl:call-template, xsl:choose, xsl:comment, xsl:copy, xsl:copy-of, xsl:element, xsl:for-each, xsl:if, xsl:processing-instruction, xsl:text, xsl:value-of, xsl:variable

Remarks

The required name attribute specifies the name of the parameter (the variable, the value of whose binding is to be replaced). The <xsl:with-param> element is allowed within both <xsl:call-template> and <xsl:apply-templates>. The value of the parameter is specified in the same way as for <xsl:variable> and <xsl:param>. The current node and current node-list used for computing the value specified by the <xsl:with-param> element is the same as that used for the <xsl:apply-templates> or <xsl:call-template> element within which it occurs. It is not an error to pass a parameter x to a template that does not have an <xsl:param> element for x; the parameter is simply ignored.

See Also

XSLT Elements | xsl:call-template Element | xsl:template Element | xsl:param Element | xsl:variable Element

 Last updated on Saturday, April 10, 2004

© 1992-2003 Microsoft Corporation. All rights reserved.