<html>
<head>
<title>normalize-space() ֐</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">normalize-space() ֐</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[^񂩂]ȋ󔒃Xy[X폜܂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>ȗ\ȕBp[^ȗƁA<span class="LITERAL">normalize-space()</span> ֐̓ReLXgm[h̕lgp܂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>̂悤ɋ󔒃Xy[X폜p[^B</p>
<ul>
<dd>擪ׂ̂Ă̋󔒃Xy[X폜܂B</p>
        </li>
<dd>ׂ̂Ă̋󔒃Xy[X폜܂B</p>
        </li>
<dd>ŋ󔒃Xy[XAĂꍇ́A1 ̋󔒃Xy[Xɒu܂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">normalize-space()</span> ̓ZɎ܂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;

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


a string
with lots of


whitespace.

&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 normalize-space() function:&lt;/xsl:text&gt;

    &lt;xsl:value-of select="$newline"/&gt;
    &lt;xsl:value-of select="$newline"/&gt;
    &lt;xsl:text&gt;   normalize-space('       Hello,            World!')="&lt;/xsl:text&gt;
    &lt;xsl:value-of select="normalize-space('       Hello,            World!')"/&gt;
    &lt;xsl:text&gt;"&lt;/xsl:text&gt;
    &lt;xsl:value-of select="$newline"/&gt;
    &lt;xsl:text&gt;   normalize-space($newline)="&lt;/xsl:text&gt;
    &lt;xsl:value-of select="normalize-space($newline)"/&gt;
    &lt;xsl:text&gt;"&lt;/xsl:text&gt;
    &lt;xsl:value-of select="$newline"/&gt;
    &lt;xsl:text&gt;   normalize-space($testString)="&lt;/xsl:text&gt;
    &lt;xsl:value-of select="normalize-space($testString)"/&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[ǵÂ悤ȏo͂܂B</p>
<span class="PROGRAMLISTING"><pre>

Tests of the normalize-space() function:

   normalize-space('       Hello,            World!')="Hello, World!"
   normalize-space($newline)="
   normalize-space($testString)="This is a string with lots of whitespace."
</pre></span>
</td>
</tr>
</table>
</div>
</body>
</html>
