<html>
<head>
<title>&lt;xsl:apply-templates&gt;</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">&lt;xsl:apply-templates&gt;</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 Anweisung weist den XSLT-Prozessor an, die entsprechenden Vorlagen (Templates) auf eine Knotenmenge anzuwenden.  </td></tr>
<tr>
<td colspan="2" class="CLEARSEPARATION">&nbsp;</td>
</tr>
<tr>
<td colspan="2" class="TITLE">Kategorie</td>
</tr>
<tr>
<td colspan="2" class="description">
<p>Anweisung</p>
</td>
</tr>
<tr>
<td colspan="2" class="CLEARSEPARATION">&nbsp;</td>
</tr>
<tr>
<td colspan="2" class="TITLE">Obligatorische Attribute</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">Optionale Attribute</td>
</tr>
<tr>
<td colspan="2" class="description">
<dl>
<dt>
select
</dt>
<dd>
Dieses Attribut enth&auml;lt einen XPath-Ausdruck, der die Knoten ausw&auml;hlt, auf die Vorlagen angewendet werden sollen. Ein zul&auml;ssiger Wert ist <span class="LITERAL">
*
</span>, wodurch die gesamte Knotenmenge ausgew&auml;hlt wird. Ohne dieses Attribut werden alle Elemente ausgew&auml;hlt, die dem aktuellen Knoten untergeordnet sind.
<P></p>
<dt>
mode
</dt>
<dd>
Dieses Attribut definiert einen Verarbeitungsmodus, eine praktische Syntax, die das Erstellen spezifischer Vorlagen f&uuml;r spezifische Zwecke erlaubt. Sie k&ouml;nnten etwa eine <span class="LITERAL">
&lt;
xsl:template
&gt;
</span>-Vorlage mit <span class="LITERAL">
mode=
"
toc
"
</span> erstellen, um einen Knoten f&uuml;r das Inhaltsverzeichnis eines Dokuments zu verarbeiten sowie weitere <span class="LITERAL">
&lt;
xsl:template
&gt;
</span>-Vorlagen mit <span class="LITERAL">
mode=
"
print
"
</span>, <span class="LITERAL">
mode=
"
online
"
</span>, <span class="LITERAL">
mode=
"
index
"
</span> usw., um dieselbe Information f&uuml;r verschiedene Zwecke zu verarbeiten.
<P></p>
</dl>
</td>
</tr>
<tr>
<td colspan="2" class="CLEARSEPARATION">&nbsp;</td>
</tr>
<tr>
<td colspan="2" class="TITLE">Inhalt</td>
</tr>
<tr>
<td colspan="2" class="description">
<p>Das Element <span class="LITERAL">&lt;xsl:apply-templates&gt;</span> kann eine beliebige Anzahl optionaler <span class="LITERAL">&lt;xsl:sort&gt;</span>- und <span class="LITERAL">&lt;xsl:with-param&gt;</span>-Elemente enthalten.  In den meisten F&auml;llen ist <span class="LITERAL">&lt;xsl:apply-templates&gt;</span> leer. </p>
</td>
</tr>
<tr>
<td colspan="2" class="CLEARSEPARATION">&nbsp;</td>
</tr>
<tr>
<td colspan="2" class="TITLE">&Uuml;bergeordnetes Element</td>
</tr>
<tr>
<td colspan="2" class="description">
<p>
<span class="LITERAL">&lt;xsl:apply-templates&gt;</span> erscheint innerhalb einer Vorlage.</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>XSLT-Abschnitt 5.4, Anwendung von Template-Regeln </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>In der Fallstudie mussten mehrere Ausgaben derselben Daten erstellt werden.  Dieser Anforderung konnte durch das Attribut <span class="LITERAL">mode</span> des Elements <span class="LITERAL">&lt;xsl:apply-templates&gt;</span> entsprochen werden.  Hier die Hauptvorlage (<span class="LITERAL">match="/"</span>):</p>
<span class="PROGRAMLISTING"><pre>
&lt;xsl:template match="/"&gt;
  &lt;xsl:apply-templates select="tutorial" mode="build-main-index"/&gt;
  &lt;redirect:write select="concat($curDir, $fileSep, 'index.html')"&gt; 
    &lt;xsl:apply-templates select="tutorial" mode="build-main-index"/&gt;
  &lt;/redirect:write&gt;
  &lt;xsl:apply-templates select="tutorial" mode="build-section-indexes"/&gt;
  &lt;xsl:apply-templates select="tutorial" mode="build-individual-panels"/&gt;
  &lt;xsl:apply-templates select="tutorial" mode="generate-graphics"/&gt;
  &lt;xsl:apply-templates select="tutorial" mode="generate-pdf-file"&gt;
    &lt;xsl:with-param name="page-size" select="'ltr'"/&gt;
  &lt;/xsl:apply-templates&gt;
<!--<?troff .Nd 10?>-->
  &lt;xsl:apply-templates select="tutorial" mode="generate-pdf-file"&gt;
    &lt;xsl:with-param name="page-size" select="'a4'"/&gt;
  &lt;/xsl:apply-templates&gt;
  &lt;xsl:apply-templates select="tutorial" mode="generate-zip-file"/&gt;
&lt;/xsl:template&gt;</pre></span>
<p>Beachten Sie, dass dieses Beispiel das Element <span class="LITERAL">&lt;tutorial&gt;</span> acht mal ausw&auml;hlt, aber Vorlagen mit einem anderen Modus anwendet (bzw. mit anderen Parametern f&uuml;r denselben Modus). </p>
</td>
</tr>
</table>
</div>
</body>
</html>
