From 651ec72d5f391987b970601ab532a2d303b44916 Mon Sep 17 00:00:00 2001 From: julieng Date: Thu, 11 Nov 2021 09:00:03 +0100 Subject: move *.html to *.md --- files/fr/web/xpath/functions/lang/index.html | 53 ---------------------------- files/fr/web/xpath/functions/lang/index.md | 53 ++++++++++++++++++++++++++++ 2 files changed, 53 insertions(+), 53 deletions(-) delete mode 100644 files/fr/web/xpath/functions/lang/index.html create mode 100644 files/fr/web/xpath/functions/lang/index.md (limited to 'files/fr/web/xpath/functions/lang') diff --git a/files/fr/web/xpath/functions/lang/index.html b/files/fr/web/xpath/functions/lang/index.html deleted file mode 100644 index 56b56c7fb9..0000000000 --- a/files/fr/web/xpath/functions/lang/index.html +++ /dev/null @@ -1,53 +0,0 @@ ---- -title: lang -slug: Web/XPath/Functions/lang -tags: - - Référence_XSLT -translation_of: Web/XPath/Functions/lang -original_slug: Web/XPath/Fonctions/lang ---- -

-{{ XsltRef() }} -


-La fonction lang détermine si le nœud de contexte correspond à la langue indiquée et retourne le booléen true ou false. -

-

Syntaxe

-
lang( chaîne )
-
-

Arguments

-
chaîne -
Le code de langue ou de localisation (langue et pays) à vérifier. -
-

Retour

-

true si le noeud de contexte est dans la langue donnée, false autrement. -

-

Notes

- - -

Regardons le code XML suivant : -

-
<p xml:lang="en">I went up a floor.</p>
-<p xml:lang="en-GB">I took the lift.</p>
-<p xsl:lang="en-US">I rode the elevator.</p>
-

et ce modèle XSL : -

-
<xsl:value-of select="count(//p[lang('en')])" />
-<xsl:value-of select="count(//p[lang('en-GB')])" />
-<xsl:value-of select="count(//p[lang('en-US')])" />
-<xsl:value-of select="count(//p[lang('de')])" />
-
-

La sortie sera : -

-
3
-1
-1
-0
-
-

Définition

-

XPath 1.0, section 4.3. -

-

Support Gecko

-

Supporté. -

\ No newline at end of file diff --git a/files/fr/web/xpath/functions/lang/index.md b/files/fr/web/xpath/functions/lang/index.md new file mode 100644 index 0000000000..56b56c7fb9 --- /dev/null +++ b/files/fr/web/xpath/functions/lang/index.md @@ -0,0 +1,53 @@ +--- +title: lang +slug: Web/XPath/Functions/lang +tags: + - Référence_XSLT +translation_of: Web/XPath/Functions/lang +original_slug: Web/XPath/Fonctions/lang +--- +

+{{ XsltRef() }} +


+La fonction lang détermine si le nœud de contexte correspond à la langue indiquée et retourne le booléen true ou false. +

+

Syntaxe

+
lang( chaîne )
+
+

Arguments

+
chaîne +
Le code de langue ou de localisation (langue et pays) à vérifier. +
+

Retour

+

true si le noeud de contexte est dans la langue donnée, false autrement. +

+

Notes

+ + +

Regardons le code XML suivant : +

+
<p xml:lang="en">I went up a floor.</p>
+<p xml:lang="en-GB">I took the lift.</p>
+<p xsl:lang="en-US">I rode the elevator.</p>
+

et ce modèle XSL : +

+
<xsl:value-of select="count(//p[lang('en')])" />
+<xsl:value-of select="count(//p[lang('en-GB')])" />
+<xsl:value-of select="count(//p[lang('en-US')])" />
+<xsl:value-of select="count(//p[lang('de')])" />
+
+

La sortie sera : +

+
3
+1
+1
+0
+
+

Définition

+

XPath 1.0, section 4.3. +

+

Support Gecko

+

Supporté. +

\ No newline at end of file -- cgit v1.2.3-54-g00ecf