RFC 3987//2

RFC 3987//2

[1] RFC 3987IETF の手続き上は現行の提案標準ですが、 事実上 URL Standard により廃止されています。

2. IRI Syntax

This section defines the syntax of Internationalized Resource Identifiers (IRIs).

この章は国際化資源識別子 (IRI) の構文を定義します。

As with URIs, an IRI is defined as a sequence of characters, not as a sequence of octets. This definition accommodates the fact that IRIs may be written on paper or read over the radio as well as stored or transmitted digitally. The same IRI may be represented as different sequences of octets in different protocols or documents if these protocols or documents use different character encodings (and/or transfer encodings). Using the same character encoding as the containing protocol or document ensures that the characters in the IRI can be handled (e.g., searched, converted, displayed) in the same way as the rest of the protocol or document.

URI 同様 IRI はオクテット列ではなく文字列として定義します。 この定義は IRI が紙に書かれたりラジオで読まれたりデジタル的に蓄積されたり転送されたりするという事実に基づいています。 同じ IRI がプロトコルや文書によって別々の文字符号化 (や転送符号化) を使っていれば別々のオクテット列として表現され得ます。 周りのプロトコルや文書と同じ文字符号化を用いることによって IRI の文字をプロトコルや文書の残りの部分と同じように取扱い (例えば検索、変換、表示) できます。

2.1. Summary of IRI Syntax

IRIs are defined similarly to URIs in [RFC3986], but the class of unreserved characters is extended by adding the characters of the UCS (Universal Character Set, [ISO10646]) beyond U+007F, subject to the limitations given in the syntax rules below and in section 6.1.

IRI は RFC 3986 の URI と同じように定義しますが、 非予約文字の級を拡張して UCS (普遍文字集合, ISO/IEC 10646) の U+007F より先の文字を次の構文規則と 6.1節の制限の元に追加します。

Otherwise, the syntax and use of components and reserved characters is the same as that in [RFC3986]. All the operations defined in [RFC3986], such as the resolution of relative references, can be applied to IRIs by IRI-processing software in exactly the same way as they are for URIs by URI-processing software.

その他は構文と部品や予約文字の用法は RFC 3986 と同じです。 RFC 3986 のすべての操作、例えば相対参照の解決も URI 処理ソフトウェアが URI に対して行うのとまったく同じように IRI 処理ソフトウェアが IRI に対して適用できます。

Characters outside the US-ASCII repertoire are not reserved and therefore MUST NOT be used for syntactical purposes, such as to delimit components in newly defined schemes. For example, U+00A2, CENT SIGN, is not allowed as a delimiter in IRIs, because it is in the 'iunreserved' category. This is similar to the fact that it is not possible to use '-' as a delimiter in URIs, because it is in the 'unreserved' category.

US-ASCII レパートリの範囲外の文字は予約されておらず、 従って新しく定義する scheme の部品の区切りなどの構文的な目的で使ってはなりません。 例えば、 U+00A2 CENT SIGNiunreserved に分類されていますから、 IRI で区切子として使うことはできません。これは URI で unreserved に分類されている - を区切子として使うことができないのと同じです。

2.2. ABNF for IRI References and IRIs

Although it might be possible to define IRI references and IRIs merely by their transformation to URI references and URIs, they can also be accepted and processed directly. Therefore, an ABNF definition for IRI references (which are the most general concept and the start of the grammar) and IRIs is given here. The syntax of this ABNF is described in [RFC2234]. Character numbers are taken from the UCS, without implying any actual binary encoding. Terminals in the ABNF are characters, not bytes.

IRI 参照と IRI を単に URI 参照と URI の変形として定義することもできますが、 直接受入れて処理することもできます。従って IRI 参照 (もっとも一般的な概念であり、文法の開始点) と IRI の ABNF 定義をここに示します。この ABNF の構文は RFC 2234 で説明されています。文字番号は UCS から採っていますが、 実際の二進符号化とは関係ありません。 ABNF の終端は文字であり、 バイトではありません。

The following grammar closely follows the URI grammar in [RFC3986], except that the range of unreserved characters is expanded to include UCS characters, with the restriction that private UCS characters can occur only in query parts. The grammar is split into two parts: Rules that differ from [RFC3986] because of the above-mentioned expansion, and rules that are the same as those in [RFC3986]. For rules that are different than those in [RFC3986], the names of the non-terminals have been changed as follows. If the non-terminal contains 'URI', this has been changed to 'IRI'. Otherwise, an 'i' has been prefixed.

次の文法は RFC 3986 の URI の文法とよく合わせてありますが、 非予約文字の範囲を UCS の文字にまで拡大しています。ただし UCS の私用文字は照会部でのみ使えます。文法はこの文字の範囲の拡大によって RFC 3986 から変更された部分と、 RFC 3986 と同じ部分の2部に分かれます。 RFC 3986 の規則と違うものは、非終端の名前を次のように変えています。 非終端が URI を含んでいれば、これを IRI に変えます。 そうでなければ、 i を頭に付けます。

The following rules are different from those in [RFC3986]:

次の規則は RFC 3986 と異なるものです。

   IRI            = scheme ":" ihier-part [ "?" iquery ]
                         [ "#" ifragment ]
   ihier-part     = "//" iauthority ipath-abempty
                  / ipath-absolute
                  / ipath-rootless
                  / ipath-empty
   irelative-part = "//" iauthority ipath-abempty
                       / ipath-absolute
                  / ipath-noscheme
                  / ipath-empty
   ipath          = ipath-abempty   ; begins with "/" or is empty
                  / ipath-absolute  ; begins with "/" but not "//"
                  / ipath-noscheme  ; begins with a non-colon segment
                  / ipath-rootless  ; begins with a segment
                  / ipath-empty     ; zero characters
  •    ipchar         = iunreserved / pct-encoded / sub-delims / ":"
                      / "@"
  •    ucschar        = %xA0-D7FF / %xF900-FDCF / %xFDF0-FFEF
                      / %x10000-1FFFD / %x20000-2FFFD / %x30000-3FFFD
                      / %x40000-4FFFD / %x50000-5FFFD / %x60000-6FFFD
                      / %x70000-7FFFD / %x80000-8FFFD / %x90000-9FFFD
                      / %xA0000-AFFFD / %xB0000-BFFFD / %xC0000-CFFFD
                      / %xD0000-DFFFD / %xE1000-EFFFD

Some productions are ambiguous. The "first-match-wins" (a.k.a. "greedy") algorithm applies. For details, see [RFC3986].

いくつかの生成規則は曖昧です。早い者勝ち (別称貪欲) 法が適用されます。詳しくは RFC 3986 をご覧下さい。

The following rules are the same as those in [RFC3986]:

次の規則は RFC 3986 と同じです。

  •    IPv6address    =                            6( h16 ":" ) ls32
                      /                       "::" 5( h16 ":" ) ls32
                      / [               h16 ] "::" 4( h16 ":" ) ls32
                      / [ *1( h16 ":" ) h16 ] "::" 3( h16 ":" ) ls32
                      / [ *2( h16 ":" ) h16 ] "::" 2( h16 ":" ) ls32
                      / [ *3( h16 ":" ) h16 ] "::"    h16 ":"   ls32
                      / [ *4( h16 ":" ) h16 ] "::"              ls32
                      / [ *5( h16 ":" ) h16 ] "::"              h16
                      / [ *6( h16 ":" ) h16 ] "::"
  •    dec-octet      = DIGIT                 ; 0-9
                      / %x31-39 DIGIT         ; 10-99
                      / "1" 2DIGIT            ; 100-199
                      / "2" %x30-34 DIGIT     ; 200-249
                      / "25" %x30-35          ; 250-255

This syntax does not support IPv6 scoped addressing zone identifiers.

この構文は IPv6 範囲指定番地付け領域識別子に対応していません。

License

RFCのライセンス

メモ