diff options
Diffstat (limited to 'files/fr/web/xslt/if/index.html')
-rw-r--r-- | files/fr/web/xslt/if/index.html | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/files/fr/web/xslt/if/index.html b/files/fr/web/xslt/if/index.html new file mode 100644 index 0000000000..dd6c6f83bc --- /dev/null +++ b/files/fr/web/xslt/if/index.html @@ -0,0 +1,32 @@ +--- +title: if +slug: Web/XSLT/if +tags: + - Référence_XSLT +translation_of: Web/XSLT/Element/if +--- +<p> +{{ XsltRef() }} +</p><p>L'élément <code><xsl:if></code> regroupe un attribut test et un modèle. Si le test renvoie <code>true</code>, le modèle est appliqué. En cela, il est très semblable à l'instruction <code>if</code> d'autres langages. Cependant, pour simuler un <tt>if-then-else</tt>, vous devrez utilisez l'élément <code><xsl:choose></code> avec un descendant <code><xsl:when></code> et un <code><xsl:otherwise></code>. +</p> +<h3 id="Syntaxe" name="Syntaxe"> Syntaxe </h3> +<pre><xsl:if test=EXPRESSION> + MODÈLE +</xsl:if></pre> +<h3 id="Attribut_obligatoire" name="Attribut_obligatoire"> Attribut obligatoire </h3> +<dl><dt><code>test</code> +</dt><dd>Contient une expression XPath qui peut être évaluée (en utilisant les règles définies pour <code>boolean( )</code> si nécessaire) en une valeur booléenne. Si la valeur est <code>true</code>, le modèle est appliqué ; dans le cas contraire, aucune action n'est exécutée. +</dd></dl> +<h3 id="Attributs_optionnels" name="Attributs_optionnels"> Attributs optionnels </h3> +<p>Aucun. +</p> +<h3 id="Type" name="Type"> Type </h3> +<p>Instruction, apparaît dans un modèle. +</p> +<h3 id="D.C3.A9finition" name="D.C3.A9finition"> Définition </h3> +<p><a class="external" href="http://www.w3.org/TR/xslt#section-Conditional-Processing-with-xsl:if">XSLT 1.0 section 9.1</a>. +</p> +<h3 id="Support_Gecko" name="Support_Gecko"> Support Gecko </h3> +<p>Supporté. +</p><p><span class="comment">Interwiki Languages Links</span> +</p>{{ languages( { "en": "en/XSLT/if", "es": "es/XSLT/if", "pl": "pl/XSLT/if" } ) }} |