<?xml version="1.0" encoding="iso-8859-1"?>
<?xml-stylesheet href="../make-menu.xsl" type="text/xsl"?><html>
   <head>
      <this-is section="xsl-elements" page="with-param" subpage=""/>
      <!--
           Generated at 2010-10-29T18:20:48.427+01:00--><title>Saxonica: XSLT and XQuery Processing: xsl:with-param</title>
      <meta name="coverage" content="Worldwide"/>
      <meta name="copyright" content="Copyright Saxonica Ltd"/>
      <meta name="title" content="Saxonica: XSLT and XQuery Processing: xsl:with-param"/>
      <meta name="robots" content="noindex,nofollow"/>
      <link rel="stylesheet" href="../saxondocs.css" type="text/css"/>
   </head>
   <body class="main">
      <h1>xsl:with-param</h1>
      <p>The <code>xsl:with-param</code> element is used to define an actual parameter to a template. It may be used
within an <code>xsl:call-template</code> or an <code>xsl:apply-templates</code> or an <code>xsl:apply-imports</code> element.
For an example, see the <a class="bodylink" href="../xsl-elements/template.xml">xsl:template</a> section.</p>
      <p>There is a mandatory attribute, <code>name</code>, to define the name
of the parameter. The value of the parameter may be defined either by a select attribute, or by the
contents of the <code>xsl:param</code> element, in the same way as for <code>xsl:variable</code>.</p>
      <p><i>The parameter has no effect unless the called template includes a matching
<code>xsl:param</code> element. But when using xsl:call-template, it is an error to specify 
a parameter that isn't declared in the target template, or to omit a parameter that's described
in the target template with <code>required="yes"</code>.</i></p>
      <p>The attribute <code>tunnel="yes"</code> creates a tunnel parameter which is accessible to called
templates at any depth, whether or not they are declared in intermediate templates. However, the value
is only accessible if <code>tunnel="yes"</code> is also specified on the corresponding 
<code>xsl:param</code> element.</p>
      <table width="100%">
         <tr>
            <td>
               <p align="right"><a class="nav" href="lre.xml">Next</a></p>
            </td>
         </tr>
      </table>
   </body>
</html>