<html>
<head>
<title>true()-Funktion</title>
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div id="Beschreibung">
<table cellpadding="0" cellspacing="0" border="0" width="100%" class="main">
<tr>
<td valign="top" class="NAME">true()-Funktion</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">
Diese Funktion gibt immer den Booleschen Wert <span class="LITERAL">true</span> zur&uuml;ck.</td></tr>
<tr>
<td colspan="2" class="CLEARSEPARATION">&nbsp;</td>
</tr>
<tr>
<td colspan="2" class="TITLE">Eingaben</td>
</tr>
<tr>
<td colspan="2" class="description">
<p>Keine</p>
</td>
</tr>
<tr>
<td colspan="2" class="CLEARSEPARATION">&nbsp;</td>
</tr>
<tr>
<td colspan="2" class="TITLE">Ausgabe</td>
</tr>
<tr>
<td colspan="2" class="description">
<p>Der Boolesche Wert <span class="LITERAL">true</span>.</p>
</td>
</tr>
<tr>
<td colspan="2" class="CLEARSEPARATION">&nbsp;</td>
</tr>
<tr>
<td colspan="2" class="TITLE">Definition</td>
</tr>
<tr>
<td colspan="2" class="description">
<p>XPath-Abschnitt 4.3, Boolesche Funktionen.</p>
</td>
</tr>
<tr>
<td colspan="2" class="CLEARSEPARATION">&nbsp;</td>
</tr>
<tr>
<td colspan="2" class="TITLE">Beispiel</td>
</tr>
<tr>
<td colspan="2" class="description">
<p>Es folgt ein kurzes Beispiel, das die Funktion <span class="LITERAL">true()</span> verwendet:</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;A test of the true() function:&lt;/xsl:text&gt;

    &lt;xsl:value-of select="$newline"/&gt;
    &lt;xsl:value-of select="$newline"/&gt;
    &lt;xsl:choose&gt;
      &lt;xsl:when test="true()"&gt;
        &lt;xsl:text&gt;   "true()"   returned true!&lt;/xsl:text&gt;
      &lt;/xsl:when&gt;
      &lt;xsl:otherwise&gt;
        &lt;xsl:text&gt;   "true()"   returned false!&lt;/xsl:text&gt;
      &lt;/xsl:otherwise&gt;
    &lt;/xsl:choose&gt;
  &lt;/xsl:template&gt;
&lt;/xsl:stylesheet&gt;</pre></span> <!--<?troff .Nd 10?>-->
<p>Wenn Sie dieses Stylesheet auf ein beliebiges XML-Dokument anwenden, wird das folgende nicht sehr aufregende Ergebnis erzeugt:</p>
<span class="PROGRAMLISTING"><pre>

A test of the true() function:

   "true()"   returned true!
</pre></span>
</td>
</tr>
</table>
</div>
</body>
</html>
