<html>
<head>
<title>last() ֐</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">last() ֐</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">
݂̃ReLXg̍Ō̃m[ḧʒuԂ܂B̊֐́Aw肳ꂽvfŌɌꂽev[g`邩Aw肳ꂽm[hAꂪm[hZbg̍Ō̃m[hł邩ǂeXgƂɖ𗧂܂B</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>ȂB</p>
</td>
</tr>
<tr>
<td colspan="2" class="CLEARSEPARATION">&nbsp;</td>
</tr>
<tr>
<td colspan="2" class="TITLE">o</td>
</tr>
<tr>
<td colspan="2" class="description">
<p>݂̃ReLXg̃m[hɓlBƂ΁Ã݂ReLXg 12  <span class="LITERAL">&lt;li&gt;</span> m[h܂܂ĂꍇA<span class="LITERAL">last()</span> ֐ 12 Ԃ܂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>XPath 4.1 ߁um[hZbg֐v </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">last()</span> ֐gpāAXg̍Ō̍ڂʂȕ@ŏ܂Bgp XML hLĝ͎ƂłB</p>
<span class="PROGRAMLISTING"><pre>
&lt;?xml version="1.0"?&gt;
&lt;list&gt;
  &lt;title&gt;A few of my favorite albums&lt;/title&gt;
  &lt;listitem&gt;A Love Supreme&lt;/listitem&gt;
  &lt;listitem&gt;Beat Crazy&lt;/listitem&gt;
  &lt;listitem&gt;Here Come the Warm Jets&lt;/listitem&gt;
  &lt;listitem&gt;Kind of Blue&lt;/listitem&gt;
  &lt;listitem&gt;London Calling&lt;/listitem&gt;
  &lt;listitem&gt;Remain in Light&lt;/listitem&gt;
  &lt;listitem&gt;The Joshua Tree&lt;/listitem&gt;
  &lt;listitem&gt;The Indestructible Beat of Soweto&lt;/listitem&gt;
&lt;/list&gt;</pre></span>
<p>Xg̍Ō <span class="LITERAL">&lt;listitem&gt;</span> قȂ@ŏX^CV[gɎ܂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="html"/&gt;

  &lt;xsl:template match="/"&gt;
    &lt;html&gt;
      &lt;head&gt;
        &lt;title&gt;
          &lt;xsl:value-of select="/list/title"/&gt;
        &lt;/title&gt;
      &lt;/head&gt;
      &lt;body&gt;
        &lt;h1&gt;
          &lt;xsl:value-of select="/list/title"/&gt;
        &lt;/h1&gt;
        &lt;ul&gt;
          &lt;xsl:for-each select="/list/listitem"&gt;
            &lt;xsl:choose&gt;
              &lt;xsl:when test="position()=last()"&gt;
                &lt;li&gt;&lt;b&gt;Last, but not least: &lt;/b&gt;&lt;xsl:value-of select="."/&gt;&lt;/li&gt;
              &lt;/xsl:when&gt;
              &lt;xsl:otherwise&gt;
                &lt;li&gt;&lt;xsl:value-of select="."/&gt;&lt;/li&gt;
              &lt;/xsl:otherwise&gt;
            &lt;/xsl:choose&gt;
          &lt;/xsl:for-each&gt;
        &lt;/ul&gt;
      &lt;/body&gt;
    &lt;/html&gt;
  &lt;/xsl:template&gt;

&lt;/xsl:stylesheet&gt;</pre></span>
<p>̃X^CV[ggp XML hLgϊʂ͎̂ƂłB</p>
<span class="PROGRAMLISTING"><pre>
&lt;html&gt;
&lt;head&gt;
&lt;META http-equiv="Content-Type" content="text/html; charset=UTF-8"&gt;
&lt;title&gt;A few of my favorite albums&lt;/title&gt;
&lt;/head&gt;
&lt;body&gt;
&lt;h1&gt;A few of my favorite albums&lt;/h1&gt;
&lt;ul&gt;
&lt;li&gt;A Love Supreme&lt;/li&gt;
&lt;li&gt;Beat Crazy&lt;/li&gt;
&lt;li&gt;Here Come the Warm Jets&lt;/li&gt;
&lt;li&gt;Kind of Blue&lt;/li&gt;
&lt;li&gt;London Calling&lt;/li&gt;
&lt;li&gt;Remain in Light&lt;/li&gt;
&lt;li&gt;The Joshua Tree&lt;/li&gt;
&lt;li&gt;
&lt;b&gt;Last, but not least: &lt;/b&gt;The Indestructible Beat of Soweto&lt;/li&gt;
&lt;/ul&gt;
&lt;/body&gt;
&lt;/html&gt;</pre></span>
<p> HTML t@C̕\<link linkend="xslt-appc-c7">} C-7</link> Ɏ܂B</p>
<figure id="xslt-appc-c7" label="C-7">
<p class="TITLE">ꂽ HTML hLg</p>
        <graphic depth="252" width="396" fileref="figs/xslt.ac07.gif"/>
      </figure>
</td>
</tr>
</table>
</div>
</body>
</html>
