コンテンツにスキップ

「メディアタイプ」の版間の差分

出典: フリー百科事典『ウィキペディア(Wikipedia)』
削除された内容 追加された内容
m 外部リンクの修正 RFC -> {{IETF RFC}} (Botによる編集)
m 外部リンクの修正 RFC -> {{IETF RFC}} (Botによる編集)
3行目: 3行目:

'''メディアタイプ'''({{lang-ja-short|'''メディア型'''}}<ref name="jisx58102">{{cite jis|X|5810-2|2008|name=多目的インターネットメール拡張 (MIME) ―第2部: メディア型}}</ref>,{{lang-en-short|Media Type(s)}})は、ファイルや[[インターネット]]上で転送されるコンテンツの形式を表現する識別子である。'''MIMEタイプ'''や'''要素タイプ''' ('''Content type''')とも表記される。'''text/plain'''のように、スラッシュで区切る表記が特徴的である。

'''メディアタイプ'''({{lang-ja-short|'''メディア型'''}}<ref name="jisx58102">{{cite jis|X|5810-2|2008|name=多目的インターネットメール拡張 (MIME) ―第2部: メディア型}}</ref>,{{lang-en-short|Media Type(s)}})は、ファイルや[[インターネット]]上で転送されるコンテンツの形式を表現する識別子である。'''MIMEタイプ'''や'''要素タイプ''' ('''Content type''')とも表記される。'''text/plain'''のように、スラッシュで区切る表記が特徴的である。




[[Internet Assigned Numbers Authority|IANA]]RFC 1341<nowiki></nowiki>[[Multipurpose Internet Mail Extensions|MIME]]RFC 1341<nowiki></nowiki>[[]][[Hypertext Transfer Protocol|HTTP]]<ref>{{Cite IETF |rfc=1945 |title=Hypertext Transfer Protocol -- HTTP/1.0|date=May 1996 |section=3.6 |sectionname=Media Types}}</ref>[[HyperText Markup Language|HTML]]<ref>{{cite web |url=https://www.w3.org/TR/html401/types.html#type-content-type|title=HTML 4.01 Specification|date=1999-12-24|accessdate=2017-02-02}}</ref>使

[[Internet Assigned Numbers Authority|IANA]]{{IETF RFC|1341}}<nowiki></nowiki>[[Multipurpose Internet Mail Extensions|MIME]]{{IETF RFC|1341}}<nowiki></nowiki>[[]][[Hypertext Transfer Protocol|HTTP]]<ref>{{Cite IETF |rfc=1945 |title=Hypertext Transfer Protocol -- HTTP/1.0|date=May 1996 |section=3.6 |sectionname=Media Types}}</ref>[[HyperText Markup Language|HTML]]<ref>{{cite web |url=https://www.w3.org/TR/html401/types.html#type-content-type|title=HTML 4.01 Specification|date=1999-12-24|accessdate=2017-02-02}}</ref>使


RFC 2046<nowiki></nowiki>や<nowiki></nowiki>RFC 6838<nowiki></nowiki>など、メディア型に関する[[Request for Comments|RFC]]が複数存在するほか、[[WHATWG]]の[https://mimesniff.spec.whatwg.org/ MIME Sniffing Standard]の4 MIME typesにもメディア型(MIMEタイプ)に関する規定が存在する。

{{IETF RFC|2046}}<nowiki></nowiki>や<nowiki></nowiki>{{IETF RFC|6838}}<nowiki></nowiki>など、メディア型に関する[[Request for Comments|RFC]]が複数存在するほか、[[WHATWG]]の[https://mimesniff.spec.whatwg.org/ MIME Sniffing Standard]の4 MIME typesにもメディア型(MIMEタイプ)に関する規定が存在する。



RFC 2046<nowiki/>の技術的内容及び構成を変更しない日本語訳が,[[日本産業規格]]JIS X 5810-2:2008「多目的インターネットメール拡張 (MIME) ―第2部: メディア型」として発行されている<ref name="jisx58102"/>。

{{IETF RFC|2046}}<nowiki/>の技術的内容及び構成を変更しない日本語訳が,[[日本産業規格]]JIS X 5810-2:2008「多目的インターネットメール拡張 (MIME) ―第2部: メディア型」として発行されている<ref name="jisx58102"/>。



==名称について==

==名称について==


RFC 1341<nowiki></nowiki>Content-Type (Content-Type Values)MIME (MIME type)RFC 1590<nowiki></nowiki><ref>{{Cite IETF|rfc=1590 |title=Media Type Registration Procedure |date=March 1994 |page=1 |quote=These types, previously called "MIME Types", are now called "Media Types".}}</ref>RFC (Internet Media Type)

{{IETF RFC|1341}}<nowiki></nowiki>Content-Type (Content-Type Values)MIME (MIME type){{IETF RFC|1590}}<nowiki></nowiki><ref>{{Cite IETF|rfc=1590 |title=Media Type Registration Procedure |date=March 1994 |page=1 |quote=These types, previously called "MIME Types", are now called "Media Types".}}</ref>RFC (Internet Media Type)



HTMLMIME(MIME type)CSS(media type)<ref>{{Cite web|url=https://mimesniff.spec.whatwg.org/#understanding-mime-types|title=MIME Sniffing Standard|accessdate=2017-03-26|work=[[WHATWG]]|quote=A MIME type is sometimes called an Internet media type in protocol literature, but consistently using the term MIME type avoids confusion with the use of "media type" as described in the Media Queries CSS specification.|language=}}</ref>

HTMLMIME(MIME type)CSS(media type)<ref>{{Cite web|url=https://mimesniff.spec.whatwg.org/#understanding-mime-types|title=MIME Sniffing Standard|accessdate=2017-03-26|work=[[WHATWG]]|quote=A MIME type is sometimes called an Internet media type in protocol literature, but consistently using the term MIME type avoids confusion with the use of "media type" as described in the Media Queries CSS specification.|language=}}</ref>
45行目: 45行目:

:典型的には、専用のアプリケーションを用いて処理される情報。

:典型的には、専用のアプリケーションを用いて処理される情報。

;model

;model

:[[3次元コンピュータグラフィックス]]などのモデルデータ。RFC 2011<nowiki></nowiki>で新設。

:[[3次元コンピュータグラフィックス]]などのモデルデータ。{{IETF RFC|2011}}<nowiki></nowiki>で新設。

;font

;font

:[[フォント]]。RFC 8081<nowiki></nowiki>で新設。

:[[フォント]]。{{IETF RFC|8081}}<nowiki></nowiki>で新設。



==== 複合最上位メディア型 ====

==== 複合最上位メディア型 ====

59行目: 59行目:


==== 例示用最上位メディア型 ====

==== 例示用最上位メディア型 ====

例示用の最上位メディア型として'''example'''が<nowiki></nowiki>RFC 4735<nowiki></nowiki>で規定されている。

例示用の最上位メディア型として'''example'''が<nowiki></nowiki>{{IETF RFC|4735}}<nowiki></nowiki>で規定されている。



====非公式な最上位メディア型 ====

====非公式な最上位メディア型 ====

90行目: 90行目:


===登録ツリー===

===登録ツリー===


IANA"."{{efn|<nowiki>RFC 6838</nowiki> 3. Registration Trees and Subtype Names{{lang|en|<q>The following subsections define registration "trees" that are distinguished by the use of faceted names, e.g., subtype names that begin with a "tree." prefix.</q>}}<ref name="RFC6838">{{Cite IETF |rfc=6838 |title=Media Type Specifications and Registration Procedures |date=January 2013}}</ref>}}: 199611<nowiki></nowiki>RFC 2048<nowiki></nowiki><nowiki></nowiki>RFC 6838<nowiki></nowiki>

IANA"."{{efn|<nowiki>{{IETF RFC|6838}}</nowiki> 3. Registration Trees and Subtype Names{{lang|en|<q>The following subsections define registration "trees" that are distinguished by the use of faceted names, e.g., subtype names that begin with a "tree." prefix.</q>}}<ref name="RFC6838">{{Cite IETF |rfc=6838 |title=Media Type Specifications and Registration Procedures |date=January 2013}}</ref>}}: 199611<nowiki></nowiki>{{IETF RFC|2048}}<nowiki></nowiki><nowiki></nowiki>{{IETF RFC|6838}}<nowiki></nowiki>


登録ツリーそのものの追加が必要な場合、[[Internet Engineering Task Force|IETF]]の標準化作業によって決定される (<nowiki>RFC 6838</nowiki> 3.5. Additional Registration Trees<ref name="RFC6838"/>)。

登録ツリーそのものの追加が必要な場合、[[Internet Engineering Task Force|IETF]]の標準化作業によって決定される (<nowiki>{{IETF RFC|6838}}</nowiki> 3.5. Additional Registration Trees<ref name="RFC6838"/>)。



====標準ツリー====

====標準ツリー====

104行目: 104行目:


====ベンダーツリー====

====ベンダーツリー====

ベンダーツリーは、公開されている製品に関連するメディア型で用いられる。vnd.ファセットが用いられる (<nowiki>RFC 6838</nowiki> 3.2. Vendor Tree<ref name="RFC6838"/>)。

ベンダーツリーは、公開されている製品に関連するメディア型で用いられる。vnd.ファセットが用いられる (<nowiki>{{IETF RFC|6838}}</nowiki> 3.2. Vendor Tree<ref name="RFC6838"/>)。







124行目: 124行目:


未登録で使用できるメディア型の命名規則は以下のように変遷している。

未登録で使用できるメディア型の命名規則は以下のように変遷している。

* 当初、RFC 1590<nowiki></nowiki>と<nowiki></nowiki>RFC 1521<nowiki></nowiki>では、"x-"で始まるサブタイプを登録不要・私的利用としていた。


* {{IETF RFC|1590}}<nowiki></nowiki><nowiki></nowiki>{{IETF RFC|1521}}<nowiki></nowiki>"x-"

* RFC 2048<nowiki></nowiki>では、極めて稀な場合として、必要に応じて、私的利用・実験的な用途で"x-"と"."で始まる名前を使用して良いが、なるべく避けるべきとしていた。

* {{IETF RFC|2048}}<nowiki></nowiki>では、極めて稀な場合として、必要に応じて、私的利用・実験的な用途で"x-"と"."で始まる名前を使用して良いが、なるべく避けるべきとしていた。

** 文字“x-”で始まるメディア下位型は実験メディア型と呼ばれる<ref name="jisx58102"/>。

** 文字“x-”で始まるメディア下位型は実験メディア型と呼ばれる<ref name="jisx58102"/>。


* RFC 6838<nowiki></nowiki>"x."使"x-"

* {{IETF RFC|6838}}<nowiki></nowiki>"x."使"x-"



使{{efn|<nowiki>RFC 6838</nowiki> 3.4. Unregistered x. Tree{{lang|en|<q>However, with the simplified registration procedures described above for vendor and personal trees, it should rarely, if ever, be necessary to use unregistered types. Therefore, use of types in the "x." tree is strongly discouraged.</q>}}<ref name="RFC6838"/>}}

使{{efn|<nowiki>RFC 6838</nowiki> 3.4. Unregistered x. Tree{{lang|en|<q>However, with the simplified registration procedures described above for vendor and personal trees, it should rarely, if ever, be necessary to use unregistered types. Therefore, use of types in the "x." tree is strongly discouraged.</q>}}<ref name="RFC6838"/>}}


広く運用されているメディア型("x-"接頭辞を持つファセットのないサブタイプ)で未登録のものについては、可能な限り適切なファセット付きの下位型名で登録し直すべきとされている。それが困難な場合、メディア型のレビューアとIESGの承認の後、ファセットのない名称のままの登録も可能である (<nowiki>RFC 6838</nowiki> Appendix A. Grandfathered Media Types<ref name="RFC6838"/>)。

広く運用されているメディア型("x-"接頭辞を持つファセットのないサブタイプ)で未登録のものについては、可能な限り適切なファセット付きの下位型名で登録し直すべきとされている。それが困難な場合、メディア型のレビューアとIESGの承認の後、ファセットのない名称のままの登録も可能である (<nowiki>{{IETF RFC|6838}}</nowiki> Appendix A. Grandfathered Media Types<ref name="RFC6838"/>)。



* ファセット付きで登録し直された例: <code>image/x-icon</code> → <code>image/vnd.microsoft.icon</code>

* ファセット付きで登録し直された例: <code>image/x-icon</code> → <code>image/vnd.microsoft.icon</code>

140行目: 140行目:


===接尾辞===

===接尾辞===


IANA"+suffix"使<nowiki>RFC 6838</nowiki> (<nowiki>RFC 6838</nowiki> 6. Structured Syntax Suffix Registration Procedures<ref name="RFC6838"/>)

IANA"+suffix"使<nowiki>{{IETF RFC|6838}}</nowiki> (<nowiki>{{IETF RFC|6838}}</nowiki> 6. Structured Syntax Suffix Registration Procedures<ref name="RFC6838"/>)


RFC 6838<nowiki></nowiki>の当初時点の接尾辞は、次のとおりである。現在登録されている接尾辞の一覧は[https://www.iana.org/assignments/media-type-structured-suffix/media-type-structured-suffix.xhtml Structured Syntax Suffix Registry]を参照。

{{IETF RFC|6838}}<nowiki></nowiki>の当初時点の接尾辞は、次のとおりである。現在登録されている接尾辞の一覧は[https://www.iana.org/assignments/media-type-structured-suffix/media-type-structured-suffix.xhtml Structured Syntax Suffix Registry]を参照。



* +xml

* +xml

152行目: 152行目:

* +zip

* +zip



ただし、<code>+xml</code>の接尾辞は、サフィックスがIANAで管理されるようになる前、2001年1月の<nowiki></nowiki>RFC 3023<nowiki></nowiki>から定義されている。


<code>+xml</code>IANA20011<nowiki></nowiki>{{IETF RFC|3023}}<nowiki></nowiki>


==脚注==

==脚注==


2023年11月6日 (月) 18:01時点における版


: [1]: Media Type(s)MIME (Content type)text/plain

IANARFC 1341MIMERFC 1341HTTP[2]HTML[3]使

RFC 2046RFC 6838RFCWHATWGMIME Sniffing Standard4 MIME typesMIME

RFC 2046JIS X 5810-2:2008 (MIME) 2: [1]


RFC 1341Content-Type (Content-Type Values)MIME (MIME type)RFC 1590[4]RFC (Internet Media Type)

HTMLMIME(MIME type)CSS(media type)[5]


[1] (: top level media type) (: sub-type)[1]

HTMLtext/html; charset=UTF-8texthtmlcharset=UTF-8



: 

 /  [ ;  ]

 / [ . ]  [ + ] [ ;  ]

: text/plain; charset=iso-2022-jp; format=flowed; delsp=yes




text  text/plainapplication/octet-streammultipart  multipart/mixed applicationimageaudiovideosubtypeapplication/octet-stream


[1]

text

plain

image



audio



video



application



model

3RFC 2011

font

RFC 8081


[1]2

multipart

message


exampleRFC 4735


chemical[6][7][8]

主な例

  • application/octet-stream(任意のバイナリデータ
  • application/javascript
  • application/json
  • application/x-www-form-urlencoded
  • application/xml
  • application/zip
  • application/pdfPDF文書)
  • application/xhtml+xmlXHTMLテキスト)
  • audio/mpeg
  • audio/vorbis
  • text/css
  • text/htmlHTMLテキスト)
  • text/plainプレーンテキスト
  • image/pngPNG画像)
  • image/jpegJPEG画像)
  • image/gifGIF画像)
  • video/mpegMPEG動画)
  • message/rfc822Eml形式
  • multipart/alternativeHTMLメールにおいて、HTMLによるメッセージと同等のプレーンテキストによるメッセージを用意する場合のように、同じ情報を異なる形式で表したマルチパート)
  • application/x-www-form-urlencodedHTTPのPOSTメソッドによるフォームデータの送信)
  • multipart/form-data(同上、主にファイルアップロードを伴う場合)

登録ツリー


IANA"."[ 1]: 199611RFC 2048RFC 6838

IETF ({{IETF RFC|6838}} 3.5. Additional Registration Trees[9])


[ 2]

IESGIETFIANA

: type /  [+]

: application/xhtml+xmlimage/png


vnd. ({{IETF RFC|6838}} 3.2. Vendor Tree[9])





:

type / vnd.  [+] - 

type / vnd.  .  [+] - IANA

type / vnd.  .  .  [+] - IANA


prs.

: type / prs.  [+]

x.


"x."

使

RFC 1590RFC 1521"x-"

RFC 2048"x-""."使
x-[1]

RFC 6838"x."使"x-"

使[ 3]

"x-"IESG ({{IETF RFC|6838}} Appendix A. Grandfathered Media Types[9])

: image/x-icon  image/vnd.microsoft.icon

: application/x-gzip  application/gzip

x-: application/x-www-form-urlencoded[10]

: type / x.  [+]


IANA"+suffix"使{{IETF RFC|6838}} ({{IETF RFC|6838}} 6. Structured Syntax Suffix Registration Procedures[9])

RFC 6838Structured Syntax Suffix Registry

+xml

+json

+ber

+der

+fastinfoset

+wbxml

+zip

+xmlIANA20011RFC 3023

脚注

注釈

  1. ^ {{IETF RFC|6838}} 3. Registration Trees and Subtype NamesよりThe following subsections define registration "trees" that are distinguished by the use of faceted names, e.g., subtype names that begin with a "tree." prefix.[9]
  2. ^ RFC 6838 3.1. Standards TreeよりMedia types in the standards tree MUST NOT have faceted names, unless they are grandfathered in using the process described in Appendix A.[9]
  3. ^ RFC 6838 3.4. Unregistered x. TreeよりHowever, with the simplified registration procedures described above for vendor and personal trees, it should rarely, if ever, be necessary to use unregistered types. Therefore, use of types in the "x." tree is strongly discouraged.[9]

出典



(一)^ abcdefgJIS X 5810-2:2008 (MIME) 2: 調

(二)^ "Media Types". Hypertext Transfer Protocol -- HTTP/1.0 (). May 1996. sec. 3.6. doi:10.17487/RFC1945. RFC 1945

(三)^ HTML 4.01 Specification (19991224). 201722

(四)^ Media Type Registration Procedure (). March 1994. p. 1. doi:10.17487/RFC1590. RFC 1590. These types, previously called "MIME Types", are now called "Media Types".

(五)^ MIME Sniffing Standard (). WHATWG. 2017326 A MIME type is sometimes called an Internet media type in protocol literature, but consistently using the term MIME type avoids confusion with the use of "media type" as described in the Media Queries CSS specification.

(六)^ Daniel Leidert, Egon Willighagen (2007). The chemical-mime-data project. 20161082016428

(七)^ Chemical MIME Home page. 2019511

(八)^ S. Rzepa, Henry; Murray-Rust, Peter; J. Whitaker, Benjamin (1998-08-14). The Application of Chemical Multipurpose Internet Mail Extensions (Chemical MIME) Internet Standards to Electronic Mail and World Wide Web Information Exchange. Journal of Chemical Information and Modeling (American Chemical Society). doi:10.1021/ci9803233. https://pubs.acs.org/doi/10.1021/ci9803233. 

(九)^ abcdefgMedia Type Specifications and Registration Procedures (). January 2013. doi:10.17487/RFC6838. RFC 6838

(十)^ Berjon, Robin (2014514). application/x-www-form-urlencoded ().  IANA. 2017326

関連項目

外部リンク

データベース

これらには、IANAに登録されていないメディア型も収録されている。