5. 新たに定義された X.400 ボディパート
本節では、MIME との相互接続を目的として新しい X.400 ボディパートを定義します。ここで定義される新しい X.400 ボディパートはすべて、CCITT 勧告 X.420 [2] で定義されている拡張ボディパート (Extended Body Parts) となります。
5.1. OBJECT IDENTIFIER と ASN.1 MACRO の使用
X.420 は、拡張ボディパートが次のことを行うよう規定しています。
(1) use OBJECT IDENTIFIERs (OIDs) to uniquely identify
the contents, and
(2) be defined by using the ASN.1 Macro:
EXTENDED-BODY-PART-TYPE MACRO::=
BEGIN
TYPE NOTATION ::= Parameters Data
VALUE NOTATION ::= value (VALUE OBJECT IDENTIFIER)
Parameters ::= "PARAMETERS" type "IDENTIFIED"
"BY" value(OBJECT IDENTIFIER)
| empty;
Data ::= "DATA" type
END
これらの要件を満たすため、本文档では [1] で定義されている OID
mime-mhs-bodies
を、MIME 相互接続のために定義される X.400 拡張ボディパートのルート OID として使用します。各拡張ボディパートにはデータ (Data) とオプションのパラメータ (Parameters) が含まれ、それぞれが OID によって命名されます。この目的のために、mime-mhs-bodies の下に 2 つの OID サブツリーが定義されています。1 つはデータ用、もう 1 つはパラメータ用です。
mime-mhs-bp-data OBJECT IDENTIFIER ::=
{ mime-mhs-bodies 1 }
mime-mhs-bp-parameter OBJECT IDENTIFIER ::=
{ mime-mhs-bodies 2 }
IANA に登録のために提出される X.400 ボディパートの定義はすべて、定義に拡張ボディパートタイプマクロを使用しなければなりません。例については次の節を参照してください。
最後に、IANA は等価テーブルに登録されていない新しい MIME コンテンツタイプやサブタイプに対して、mime-mhs-bp-data と mime-mhs-bp-parameter の OID をルート OID として使用します。
5.2. 汎用 MIME 拡張ボディパート
次の X.400 ボディパートは、IANA に明示的に登録されたマッピングが存在しない任意の MIME コンテンツタイプを運ぶために定義されています。
mime-body-part EXTENDED-BODY-PART-TYPE
PARAMETERS MimeParameters
IDENTIFIED BY mime-generic-parameters
DATA OCTET STRING
::= mime-generic-data
MimeParameters ::=
SEQUENCE {
content-type IA5String,
content-parameters SEQUENCE OF
SEQUENCE {
parameter IA5String,
parameter-value IA5String
}
-- from RFC-1327, sec. 5.1.12
other-header-fields RFC822FieldList
}
mime-generic-parameters OBJECT IDENTIFIER ::=
{ mime-mhs-bp-parameter 1 }
mime-generic-data OBJECT IDENTIFIER ::=
{ mime-mhs-bp-data 1 }
MIME コンテンツタイプを X.400 の mime-body-part に変換するには、次のようにします。
(1) Copy the "type/subtype" string from the MIME
Content-Type: header field into
MimeParameters.content-type
(2) For each "parameter=value" string in the MIME
Content-Type header field, create a
MimeParameters.content-parameters structure, and copy
the "parameter" string into MimeParameters.content-
parameters.parameter field and the "value" string
into the paired MimeParameters.content-
parameters.parameter-value field.
(3) Convert the MIME body part into its canonical form.
(See appendix H of RFC 1341 [3] for a discussion
of canonical in this context.) Said another way,
reverse the transfer encoding to recover the original
byte stream.
(4) Copy the canonical byte stream into the mime-body-
part.data octet string.
(5) Remove the Content-type and the Content-transfer-
encoding header fields from the MIME body part's
RFC822 header.
(6) Any header fields starting with "Content-" in the
MIME body part is placed in the optional other-
header-fields structure. Note that this can only
occur when the MIME content-type occurs as part of a
"multipart" content-type.
X.400 の mime-body-part から MIME コンテンツタイプへのマッピングは、上記の手順の逆です。
5.3. PostScript ボディパート
次の拡張ボディパートは PostScript データストリーム用に定義されています。パラメータはありません。
postscript-body-part EXTENDED-BODY-PART-TYPE
DATA OCTET STRING
::= mime-postscript-body
mime-postscript-body OBJECT IDENTIFIER ::=
{ mime-mhs-bp-data 2 }
5.4. JPEG ボディパート
次の拡張ボディパートは JPEG データストリーム用に定義されています。パラメータはありません。
jpeg-body-part EXTENDED-BODY-PART-TYPE
DATA OCTET STRING
::= mime-jpeg-body
mime-jpeg-body OBJECT IDENTIFIER ::=
{ mime-mhs-bp-data 3 }
5.5. GIF ボディパート
次の拡張ボディパートは GIF データストリーム用に定義されています。パラメータはありません。
gif-body-part EXTENDED-BODY-PART-TYPE
DATA OCTET STRING
::= mime-gif-body
mime-gif-body OBJECT IDENTIFIER ::=
{ mime-mhs-bp-data 4 }