<html>
<head>
<title>lang() ֐</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">lang() ֐</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">
w肳ꂽ̕񂪁A<span class="LITERAL">xml:lang</span> ɂĒ`ReLXgm[ȟƓł邩A܂͂̃Tuł邩ǂ𒲂ׂ܂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>R[h\BReLXgm[hɌ <span class="LITERAL">xml:lang="en-us"</span> ꍇA<span class="LITERAL">en</span>A<span class="LITERAL">EN</span>A <span class="LITERAL">en-us</span> ̔Cӂ̒lgp <span class="LITERAL">lang()</span> ֐ĂяoƁAu[l <span class="LITERAL">true</span> Ԃ܂Bl <span class="LITERAL">en-gb</span> gp <span class="LITERAL">lang()</span> ĂяoƁAu[l <span class="LITERAL">false</span> Ԃ܂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>p[^񂪁AReLXgm[ȟƓł邩̃TułꍇA<span class="LITERAL">lang()</span> ̓u[l <span class="LITERAL">true</span> Ԃ܂BReLXgm[h <span class="LITERAL">xml:lang</span> ȂꍇAł߂ʂ <span class="LITERAL">xml:lang</span> ̒lɎgp܂B̂悤ȑȂꍇA<span class="LITERAL">lang()</span> ֐̓u[l <span class="LITERAL">false</span> Ԃ܂Bp[^ŃReLXgm[ȟR[hrꍇA<span class="LITERAL">lang()</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>XPath 4.3 ߁uBoolean Functionsv</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>R[hgp XML 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><span class="LITERAL">lang()</span> ֐gpX^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="text"/&gt;

<!--<?troff .Nd 10?>-->
  &lt;xsl:variable name="newline"&gt;
&lt;xsl:text&gt;
&lt;/xsl:text&gt;
  &lt;/xsl:variable&gt;

  &lt;xsl:template match="/"&gt;
    &lt;xsl:value-of select="$newline"/&gt;
    &lt;xsl:for-each select="list/listitem"&gt;
      &lt;xsl:choose&gt;
        &lt;xsl:when test="lang('EN')"&gt;
          &lt;xsl:text&gt;Here's an English-language album: &lt;/xsl:text&gt;
        &lt;/xsl:when&gt;
        &lt;xsl:otherwise&gt;
          &lt;xsl:text&gt;-------&gt; Here's some World music: &lt;/xsl:text&gt;
        &lt;/xsl:otherwise&gt;
      &lt;/xsl:choose&gt;
      &lt;xsl:value-of select="."/&gt;
      &lt;xsl:value-of select="$newline"/&gt;
    &lt;/xsl:for-each&gt;
  &lt;/xsl:template&gt;

&lt;/xsl:stylesheet&gt;</pre></span>
<p>ŌɁǍʂ͎̂ƂłB</p>
<span class="PROGRAMLISTING"><pre>

Here's an English-language album: The Sacred Art of Dub
Here's an English-language album: Only the Poor Man Feel It
Here's an English-language album: Excitable Boy
-------&gt; Here's some World music: Aki Special
Here's an English-language album: Combat Rock
-------&gt; Here's some World music: Talking Timbuktu
-------&gt; Here's some World music: The Birth of the Cool
</pre></span>
</td>
</tr>
</table>
</div>
</body>
</html>
