<html>
<head>
<title>string() ֐</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">string() ֐</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">
p[^̕lԂ܂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>IuWFNgBIuWFNǵÃTuZNVŐ悤ɕɕϊ܂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>B̓p[^͎̂悤ɕɕϊ܂B</p>
<ul>
<dd>p[^m[hZbg̏ꍇAm[hZbg̍ŏ̃m[h͕ɕϊ܂Bm[hZbg̍ŏ̃m[h́AhLgōŏɔm[hłB</p>
        </li>
<dd>p[^l̏ꍇ́Â悤ɕɕϊ܂B</p>
          <ul>
<dd>l <span class="LITERAL">NaN</span> ͕ "NaN" ɕϊ܂B</p>
            </li>
<dd> 0 ͕ "0" ɕϊ܂B</p>
            </li>
<dd> 0 ͕ "0" ɕϊ܂B</p>
            </li>
<dd>̖͕ "Infinity" ɕϊ܂B</p>
            </li>
<dd>̖͕ "-Infinity" ɕϊ܂B</p>
            </li>
<dd>́A̐\ɕϊ܂B_ѐ擪 0 ͎gp܂B̏ꍇA擪Ƀ}CiXL (<span class="LITERAL">-</span>) t܂B</p>
            </li>
<dd>̑̐ĺA_܂ޕɕϊ܂BȂƂA_ 1 O̐lƁA1 ̐lϊ܂Bl̏ꍇA擪Ƀ}CiXL (<span class="LITERAL">-</span>) t܂B_Oɂ͐擪 0 ͕t܂񂪁A_OɂAK{ 1 ̌͗OƂȂ邱Ƃ܂B_ɂ́AKvɉĂłtāAIEEE 754 WŒ`Ă邻ׂ̑Ă̐l炱̐lʂł܂BIEEE 754 ́AJava  <span class="LITERAL">float</span>  <span class="LITERAL">double</span> f[^^CvŎgpĂ̂ƓWłB</p>
            </li>
          </ul>
        </li>
<dd>p[^u[^̏ꍇAl <span class="LITERAL">true</span> ͕ "true" ŕ\Al <span class="LITERAL">false</span> ͕ "false" ŕ\܂B</p>
        </li>
<dd>p[^̃^Cvłꍇ́Ã^Cvɉ@ŕɕϊ܂BT|[g鑼̃^CvƁA炪ɕϊ@ɂẮAXSLT vZbT̃}jAQƂĂB</p>
        </li>
      </ul>
</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.2 ߁u֐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">string()</span> ֐eXg邽߂Ɏgp XML hLgɎ܂B</p>
<span class="PROGRAMLISTING"><pre>
&lt;?xml version="1.0"?&gt;
&lt;test&gt;
  &lt;p&gt;This is a test XML document used by several 
  of our sample stylesheets.&lt;/p&gt;
  &lt;question&gt;
    &lt;text&gt;When completed, the Eiffel Tower was the 
    tallest building in the world.&lt;/text&gt;
    &lt;true&gt;You're correct!  The Eiffel Tower was the 
    world's tallest building until 1930.&lt;/true&gt;
    &lt;false&gt;No, the Eiffel Tower was the world's 
    tallest building for over 30 years.&lt;/false&gt;
  &lt;/question&gt;
  &lt;question&gt;
    &lt;text&gt;New York's Empire State Building knocked 
    the Eiffel Tower from its pedestal.&lt;/text&gt;
    &lt;true&gt;No, that's not correct.&lt;/true&gt;
    &lt;false&gt;Correct!  New York's Chrysler Building, 
    completed in 1930, became the world's tallest.&lt;/false&gt;
  &lt;/question&gt;
&lt;/test&gt;</pre></span>
<p>܂܂ȃp[^gp <span class="LITERAL">string()</span> ֐eXg܂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:template match="/"&gt;
    &lt;xsl:value-of select="$newline"/&gt;
    &lt;xsl:text&gt;Tests of the string() function:&lt;/xsl:text&gt;

<!--<?troff .Nd 10?>-->
    &lt;xsl:value-of select="$newline"/&gt;
    &lt;xsl:value-of select="$newline"/&gt;
    &lt;xsl:text&gt;   string(count(/test))=&lt;/xsl:text&gt;
    &lt;xsl:value-of select="string(count(/test))"/&gt;
    &lt;xsl:value-of select="$newline"/&gt;
    &lt;xsl:text&gt;   string(count(/test/question))=&lt;/xsl:text&gt;
    &lt;xsl:value-of select="string(count(/test/question))"/&gt;
    &lt;xsl:value-of select="$newline"/&gt;
    &lt;xsl:text&gt;   string('4')=&lt;/xsl:text&gt;
    &lt;xsl:value-of select="string('4')"/&gt;
    &lt;xsl:value-of select="$newline"/&gt;
    &lt;xsl:text&gt;   string(true())=&lt;/xsl:text&gt;
    &lt;xsl:value-of select="string(true())"/&gt;
    &lt;xsl:value-of select="$newline"/&gt;
    &lt;xsl:text&gt;   string(false())=&lt;/xsl:text&gt;
    &lt;xsl:value-of select="string(false())"/&gt;
    &lt;xsl:value-of select="$newline"/&gt;
    &lt;xsl:text&gt;   string(count(/test/question) &gt; 5)=&lt;/xsl:text&gt;
    &lt;xsl:value-of select="string(count(/test/question) &gt; 5)"/&gt;
    &lt;xsl:value-of select="$newline"/&gt;
    &lt;xsl:value-of select="$newline"/&gt;
    &lt;xsl:text&gt;Here are the string values of some &lt;text&gt; elements:&lt;/xsl:text&gt;
    &lt;xsl:value-of select="$newline"/&gt;
    &lt;xsl:for-each select="/test/question/text"&gt;
      &lt;xsl:text&gt;   &lt;/xsl:text&gt;
      &lt;xsl:value-of select="string(.)"/&gt;
      &lt;xsl:value-of select="$newline"/&gt;
    &lt;/xsl:for-each&gt;
  &lt;/xsl:template&gt;

&lt;/xsl:stylesheet&gt;</pre></span>
<p>̃X^CV[ǧʂ͎̂ƂłB</p>
<span class="PROGRAMLISTING"><pre>

Tests of the string() function:

   string(count(/test))=1
   string(count(/test/question))=2
   string('4')=4
   string(true())=true
   string(false())=false
   string(count(/test/question) &gt; 5)=false

Here are the string values of some &lt;text&gt; elements:
   When completed, the Eiffel Tower was the tallest building in the world.
   New York's Empire State Building knocked the Eiffel Tower from its pedestal.
</pre></span>
</td>
</tr>
</table>
</div>
</body>
</html>
