From 39f2114f9797eb51994966c6bb8ff1814c9a4da8 Mon Sep 17 00:00:00 2001 From: Florian Merz Date: Thu, 11 Feb 2021 12:36:08 +0100 Subject: unslug fr: move --- files/fr/web/xpath/functions/position/index.html | 57 ++++++++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100644 files/fr/web/xpath/functions/position/index.html (limited to 'files/fr/web/xpath/functions/position') diff --git a/files/fr/web/xpath/functions/position/index.html b/files/fr/web/xpath/functions/position/index.html new file mode 100644 index 0000000000..fb746d8286 --- /dev/null +++ b/files/fr/web/xpath/functions/position/index.html @@ -0,0 +1,57 @@ +--- +title: position +slug: Web/XPath/Fonctions/position +tags: + - Référence_XSLT +translation_of: Web/XPath/Functions/position +--- +

{{ XsltRef() }}

+ +


+ La fonction position retourne un nombre égal à la position du contexte dans le contexte d'évaluation d'expression.

+ +

Syntaxe

+ +
position()
+
+ +

Retour

+ +

Un nombre entier égal à la position du contenu dans le contexte d'évaluation d'expression.

+ +

Notes

+ + + + + +
<xsl:template match="//a[position() = 5]">
+ <!-- cet exemple 'attrape' le cinquième élément "a"
+         n'importe où dans le document. -->
+</xsl:template>
+
+ +
<xsl:template match="//div[@class='foo']/bar[position() = 1]">
+ <!-- cet exemple 'attrape' le premier
+         élément "bar" enfant d'un élément "div"
+         avec un attribut "class" valant "foo" -->
+</xsl:template>
+
+ +

Définition

+ +

XPath 1.0, section 4.1.

+ +

Support Gecko

+ +

Supportée.

+ +

Interwiki Languages Links

+ +
 
+ +

{{ languages( { "en": "en/XPath/Functions/position", "ja": "ja/XPath/Functions/position", "pl": "pl/XPath/Funkcje/position" } ) }}

-- cgit v1.2.3-54-g00ecf