diff options
author | Peter Bengtsson <mail@peterbe.com> | 2020-12-08 14:40:17 -0500 |
---|---|---|
committer | Peter Bengtsson <mail@peterbe.com> | 2020-12-08 14:40:17 -0500 |
commit | 33058f2b292b3a581333bdfb21b8f671898c5060 (patch) | |
tree | 51c3e392513ec574331b2d3f85c394445ea803c6 /files/ja/web/xpath/functions/position/index.html | |
parent | 8b66d724f7caf0157093fb09cfec8fbd0c6ad50a (diff) | |
download | translated-content-33058f2b292b3a581333bdfb21b8f671898c5060.tar.gz translated-content-33058f2b292b3a581333bdfb21b8f671898c5060.tar.bz2 translated-content-33058f2b292b3a581333bdfb21b8f671898c5060.zip |
initial commit
Diffstat (limited to 'files/ja/web/xpath/functions/position/index.html')
-rw-r--r-- | files/ja/web/xpath/functions/position/index.html | 62 |
1 files changed, 62 insertions, 0 deletions
diff --git a/files/ja/web/xpath/functions/position/index.html b/files/ja/web/xpath/functions/position/index.html new file mode 100644 index 0000000000..80d3c2ed60 --- /dev/null +++ b/files/ja/web/xpath/functions/position/index.html @@ -0,0 +1,62 @@ +--- +title: position +slug: Web/XPath/Functions/position +tags: + - XSLT + - XSLT_Reference +translation_of: Web/XPath/Functions/position +--- +<p>{{ XsltRef() }}</p> + +<p><code>position</code> 関数は、式評価コンテキストのコンテキスト位置に等しい数値を返します。</p> + +<p>{{ 英語版章題("Syntax") }}</p> + +<h3 id=".E6.A7.8B.E6.96.87" name=".E6.A7.8B.E6.96.87">構文</h3> + +<pre class="eval">position() +</pre> + +<p>{{ 英語版章題("Returns") }}</p> + +<h3 id=".E6.88.BB.E3.82.8A.E5.80.A4" name=".E6.88.BB.E3.82.8A.E5.80.A4">戻り値</h3> + +<p>式評価コンテキストのコンテキスト位置に等しい整数。</p> + +<p>{{ 英語版章題("Notes") }}</p> + +<h3 id=".E6.B3.A8.E8.A8.98" name=".E6.B3.A8.E8.A8.98">注記</h3> + +<ul> + <li>コンテキストにおけるノードの位置はゼロ始まりではないことに注意してください。 最初のノードの位置は 1 です。</li> +</ul> + +<ul> + <li>コンテキストはパスのほかの部分によって決定します。</li> +</ul> + +<pre class="eval"><xsl:template match="//a[position() = 5]"> + <!-- このテンプレートは文書内のあらゆる位置にある + 5 番目の a 要素にマッチする --> +</xsl:template> +</pre> + +<pre class="eval"><xsl:template match="//div[@class='foo']/bar[position() = 1]"> + <!-- このテンプレートは class 属性が "foo" に等しい div 要素の子である + 1 番目の bar 要素にマッチする --> +</xsl:template> +</pre> + +<p>{{ 英語版章題("Defined") }}</p> + +<h3 id=".E5.AE.9A.E7.BE.A9" name=".E5.AE.9A.E7.BE.A9">定義</h3> + +<p><a class="external" href="http://www.w3.org/TR/xpath#function-position">XPath 1.0 4.1</a></p> + +<p>{{ 英語版章題("Gecko support") }}</p> + +<h3 id="Gecko_.E3.81.A7.E3.81.AE.E3.82.B5.E3.83.9D.E3.83.BC.E3.83.88" name="Gecko_.E3.81.A7.E3.81.AE.E3.82.B5.E3.83.9D.E3.83.BC.E3.83.88">Gecko でのサポート</h3> + +<p>サポート済み。</p> + +<div class="noinclude">{{ languages( { "en": "en/XPath/Functions/position", "fr": "fr/XPath/Fonctions/position", "pl": "pl/XPath/Funkcje/position" } ) }}</div> |