<html>
<head>
<title>&lt;xsl:with-param&gt;</title>
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div id="">
<table cellpadding="0" cellspacing="0" border="0" width="100%" class="main">
<tr>
<td valign="top" class="NAME">&lt;xsl:with-param&gt;</td>
<td valign="top" class="COMPATIBILITY">&nbsp;</td>
</tr>
<tr>
<td colspan="2" class="divider"><img src="dwres:18084" width="100%" height="1"></td>
</tr>
<tr>
<td valign="top" colspan="2" class="description">
ev[gɓnp[^`܂Bev[gĂяoƁAp[^ƂĒln܂B</td></tr>
<tr>
<td colspan="2" class="CLEARSEPARATION">&nbsp;</td>
</tr>
<tr>
<td colspan="2" class="TITLE">JeS</td>
</tr>
<tr>
<td colspan="2" class="description">
<p>Tu (<span class="LITERAL">&lt;xsl:with-param&gt;</span>  <span class="LITERAL">&lt;xsl:apply-templates&gt;</span> vf܂ <span class="LITERAL">&lt;xsl:call-template&gt;</span> vfɎw肷Kv܂)</p>
</td>
</tr>
<tr>
<td colspan="2" class="CLEARSEPARATION">&nbsp;</td>
</tr>
<tr>
<td colspan="2" class="TITLE"></td>
</tr>
<tr>
<td colspan="2" class="description">
<p> <span class="LITERAL">&lt;xsl:with-param&gt;</span> ́Aev[gɓnp[^`܂Bev[gĂяoƁAp[^ƂĒln܂Bp[^̒ĺA 3 ̂ꂩ̕@Œ`ł܂B</p>
<ul>
<dd><span class="LITERAL">&lt;xsl:with-param&gt;</span> vfłA<span class="LITERAL">select</span> ܂܂ȂꍇAl̓ev[gɓn܂B</p>
        </li>
<dd><span class="LITERAL">&lt;xsl:with-param&gt;</span> vfłA<span class="LITERAL">select</span> ܂ޏꍇAp[^̒l <span class="LITERAL">select</span> ̒lɂȂ܂B</p>
        </li>
<dd><span class="LITERAL">&lt;xsl:with-param&gt;</span> vf XSLT ev[g܂܂ꍇ́Ap[^̒lev[g̏ʂɂȂ܂B</p>
        </li>
      </ul>
<p>lev[gɓnȂꍇ (<span class="LITERAL">&lt;xsl:with-param name="x"/&gt;</span>) ́Ap[^̏ݒl (ꍇ) Ɏgp܂Bp[^̏ݒĺA<span class="LITERAL">&lt;xsl:template&gt;</span>  <span class="LITERAL">&lt;xsl:param&gt;</span> vfŒ`܂BڍׂɂẮA<span class="LITERAL">&lt;xsl:param&gt;</span> vf̐QƂĂB</p>
</td>
</tr>
<tr>
<td colspan="2" class="CLEARSEPARATION">&nbsp;</td>
</tr>
<tr>
<td colspan="2" class="TITLE">K{̑</td>
</tr>
<tr>
<td colspan="2" class="description">
<dl>
<dt>
name
</dt>
<dd>
̃p[^̖Ow肵܂B
<P></p>
</dl>
</td>
</tr>
<tr>
<td colspan="2" class="CLEARSEPARATION">&nbsp;</td>
</tr>
<tr>
<td colspan="2" class="TITLE">ȗ\ȑ</td>
</tr>
<tr>
<td colspan="2" class="description">
<dl>
<dt>
select
</dt>
<dd>
̃p[^̒l` XPath B
<P></p>
</dl>
</td>
</tr>
<tr>
<td colspan="2" class="CLEARSEPARATION">&nbsp;</td>
</tr>
<tr>
<td colspan="2" class="TITLE">Rec</td>
</tr>
<tr>
<td colspan="2" class="description">
<p><span class="LITERAL">&lt;xsl:with-param&gt;</span> vfɂ͉w肵ȂA܂ XSLT ev[g܂߂邱Ƃł܂BXSLT ev[g܂߂ꍇA<span class="LITERAL">select</span>  (ꍇ) ͖܂B </p>
</td>
</tr>
<tr>
<td colspan="2" class="CLEARSEPARATION">&nbsp;</td>
</tr>
<tr>
<td colspan="2" class="TITLE">w</td>
</tr>
<tr>
<td colspan="2" class="description">
<p>
<span class="LITERAL">&lt;xsl:apply-templates&gt;</span>  <span class="LITERAL">&lt;xsl:call-template&gt;</span>B</p>
</td>
</tr>
<tr>
<td colspan="2" class="CLEARSEPARATION">&nbsp;</td>
</tr>
<tr>
<td colspan="2" class="TITLE">`</td>
</tr>
<tr>
<td colspan="2" class="description">
<p>XSLT 11.6 ߁uev[gɃp[^nv </p>
</td>
</tr>
<tr>
<td colspan="2" class="CLEARSEPARATION">&nbsp;</td>
</tr>
<tr>
<td colspan="2" class="TITLE"></td>
</tr>
<tr>
<td colspan="2" class="description">
<p>̃p[^gpX^CV[gɎ܂Bꕔ̃p[^̓O[op[^łAX^CV[g̊OŒ`Ă܂B</p>
<span class="PROGRAMLISTING"><pre>
&lt;?xml version="1.0"?&gt;
&lt;xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"&gt;

  &lt;xsl:output method="text"/&gt;

  &lt;xsl:variable name="newline"&gt;
&lt;xsl:text&gt;
&lt;/xsl:text&gt;
  &lt;/xsl:variable&gt;

  &lt;xsl:param name="favoriteNumber" select="23"/&gt;
  &lt;xsl:param name="favoriteColor"/&gt;

  &lt;xsl:template match="/"&gt;
    &lt;xsl:value-of select="$newline"/&gt;
    &lt;xsl:value-of select="list/title"/&gt;
    &lt;xsl:value-of select="$newline"/&gt;
    &lt;xsl:variable name="listitems" select="list/listitem"/&gt;
    &lt;xsl:call-template name="processListitems"&gt;
      &lt;xsl:with-param name="items" select="$listitems"/&gt;
      &lt;xsl:with-param name="color" select="'yellow'"/&gt;
      &lt;xsl:with-param name="number" select="$favoriteNumber"/&gt;
    &lt;/xsl:call-template&gt;
  &lt;/xsl:template&gt;

  &lt;xsl:template name="processListitems"&gt;
    &lt;xsl:param name="items"/&gt;
    &lt;xsl:param name="color" select="'blue'"/&gt;

    &lt;xsl:for-each select="$items"&gt;
      &lt;xsl:value-of select="position()"/&gt;
      &lt;xsl:text&gt;.  &lt;/xsl:text&gt;
      &lt;xsl:value-of select="."/&gt;
      &lt;xsl:value-of select="$newline"/&gt;
    &lt;/xsl:for-each&gt;

    &lt;xsl:value-of select="$newline"/&gt;
    
    &lt;xsl:text&gt;Your favorite color is &lt;/xsl:text&gt;
    &lt;xsl:value-of select="$favoriteColor"/&gt;
    &lt;xsl:text&gt;.&lt;/xsl:text&gt;
    &lt;xsl:value-of select="$newline"/&gt;
    &lt;xsl:text&gt;The color passed to this template is &lt;/xsl:text&gt;
    &lt;xsl:value-of select="$color"/&gt;
    &lt;xsl:text&gt;.&lt;/xsl:text&gt;
    &lt;xsl:value-of select="$newline"/&gt;
  &lt;/xsl:template&gt;

&lt;/xsl:stylesheet&gt;</pre></span>
<p>̃X^CV[ggpāÃhLgϊ܂B</p>
<span class="PROGRAMLISTING"><pre>
&lt;?xml version="1.0"?&gt;
&lt;list xml:lang="en"&gt;
  &lt;title&gt;Albums I've bought recently:&lt;/title&gt;
  &lt;listitem&gt;The Sacred Art of Dub&lt;/listitem&gt;
  &lt;listitem&gt;Only the Poor Man Feel It&lt;/listitem&gt;
  &lt;listitem&gt;Excitable Boy&lt;/listitem&gt;
  &lt;listitem xml:lang="sw"&gt;Aki Special&lt;/listitem&gt;
  &lt;listitem xml:lang="en-gb"&gt;Combat Rock&lt;/listitem&gt;
  &lt;listitem xml:lang="zu"&gt;Talking Timbuktu&lt;/listitem&gt;
  &lt;listitem xml:lang="jz"&gt;The Birth of the Cool&lt;/listitem&gt;
&lt;/list&gt;</pre></span>
<p>̃X^CV[ǵA<span class="LITERAL">favoriteNumber</span>  <span class="LITERAL">favoriteColor</span>  2 ̃O[op[^܂݁A<span class="LITERAL">favoriteNumber</span> ̏ݒl`܂B܂ÃX^CV[gɂA<span class="LITERAL">match="/"</span> ev[g <span class="LITERAL">name="processListitems"</span> ev[gɃp[^n܂B̃p[^ɂ̓m[hZbg܂܂܂Bϊ̌ʂ͎̂ƂłB</p>
<span class="PROGRAMLISTING"><pre>

Albums I've bought recently:
1.  The Sacred Art of Dub
2.  Only the Poor Man Feel It
3.  Excitable Boy
4.  Aki Special
5.  Combat Rock
6.  Talking Timbuktu
7.  The Birth of the Cool

Your favorite color is orange.
The color passed to this template is yellow.</pre></span>
<p>Xalan ł̌ʂ𐶐ɂ́ÃR}hgp܂B</p>
<span class="PROGRAMLISTING"><pre>
java org.apache.xalan.xslt.Process -in test4.xml -xsl with-param.xsl 
  -param favoriteColor orange</pre></span>
<p>R}h 1 sŎw肵܂BO[op[^̏ڍׁAт܂܂ XSLT vZbTł̃O[op[^̒`@ɂẮA<link linkend="xslt-CHP-4"> 4 </link> <link linkend="xslt-CHP-4-SECT-4.3">4.4.3 </link>QƂĂB





</p>
</td>
</tr>
</table>
</div>
</body>
</html>
