Name

xsl:with-param

Synopsis

<xsl:with-param 
  name   = "QualifiedName"
  select = "expression"> 
 <! --  template  -- >
</xsl:with-param>

The xsl:with-param element passes a named parameter to a template that expects it. This can either be a child of xsl:apply-templates or xsl:call-template. An xsl:template element receives the parameter via an xsl:param element with the same name. If a template expects to receive a particular parameter and doesn’t get it, then it can take the default from the xsl:param element instead.

Attributes

name, required

The name of the parameter.

select, optional

An XPath expression evaluated to form the value of the parameter. If xsl:with-param has a select attribute, then it must be an empty element. If xsl:with-param does not have a select attribute, then the value is taken from the element’s contents.

Contents

A template that is instantiated and passed as the parameter’s value. If xsl:with-param is not an empty element, it must not have a select attribute. If xsl:with-param is empty and does not have a select attribute, then its value is the empty string.

Get XML in a Nutshell, 3rd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.