From 33058f2b292b3a581333bdfb21b8f671898c5060 Mon Sep 17 00:00:00 2001 From: Peter Bengtsson Date: Tue, 8 Dec 2020 14:40:17 -0500 Subject: initial commit --- files/ja/web/xpath/functions/translate/index.html | 93 +++++++++++++++++++++++ 1 file changed, 93 insertions(+) create mode 100644 files/ja/web/xpath/functions/translate/index.html (limited to 'files/ja/web/xpath/functions/translate') diff --git a/files/ja/web/xpath/functions/translate/index.html b/files/ja/web/xpath/functions/translate/index.html new file mode 100644 index 0000000000..2fb9f19df0 --- /dev/null +++ b/files/ja/web/xpath/functions/translate/index.html @@ -0,0 +1,93 @@ +--- +title: translate +slug: Web/XPath/Functions/translate +tags: + - XSLT + - XSLT_Reference +translation_of: Web/XPath/Functions/translate +--- +

{{ XsltRef() }}

+ +

translate 関数は、文字列と、その文字列を変換するための文字の集合を評価し、変換された文字列を返します。

+ +

{{ 英語版章題("Syntax") }}

+ +

構文

+ +
translate(string ,abc ,XYZ )
+
+ +

{{ 英語版章題("Arguments") }}

+ +

引数

+ +
+
string
+
評価する文字列。
+
+ +
+
abc
+
置換の対象となる文字を格納した文字列。
+
+ +
+
XYZ
+
置換に使用する文字を格納した文字列。 例えばstring の中にabc の 1 文字目が見つかると、それらはすべてXYZ の 1 文字目に置き換えられる。
+
+ +

{{ 英語版章題("Returns") }}

+ +

戻り値

+ +

変換された文字列。

+ +

{{ 英語版章題("Notes") }}

+ +

注記

+ +

XPath では、大文字と小文字の変換に使用するための解決策としては、translate 関数はすべての言語において十分なものであるとは言えないと注記されています。 XPath の将来のバージョンでは、大文字と小文字の変換のための関数が追加されるかもしれません。

+ +

ですが、現在のところはこの関数が文字列を大文字や小文字に変換するのには最も適しています。

+ +

+ +
<xsl:value-of select="translate('The quick brown fox.', 'abcdefghijklmnopqrstuvwxyz', 'ABCDEFGHIJKLMNOPQRSTUVWXYZ')" />
+
+ +

出力

+ +
THE QUICK BROWN FOX.
+
+ + + +

+ +
<xsl:value-of select="translate('The quick brown fox.', 'brown', 'red'" />
+
+ +

出力

+ +
The quick red fdx.
+
+ + + +

{{ 英語版章題("Defined") }}

+ +

定義

+ +

XPath 1.0 4.2

+ +

{{ 英語版章題("Gecko support") }}

+ +

Gecko でのサポート

+ +

サポート済み。

+ +
{{ languages( { "en": "en/XPath/Functions/translate", "fr": "fr/XPath/Fonctions/translate", "pl": "pl/XPath/Funkcje/translate" } ) }}
-- cgit v1.2.3-54-g00ecf