rfc2854J 魔術幻燈版 原典 RFC2854 http://ring.etl.go.jp/pub/doc/RFC/rfc2854.txt 2000.7.1 翻訳開始 2000.7.24 翻訳終了 http://hp.vector.co.jp/authors/VA014833/rfc2854J.html (翻訳に関する)Copyleft: 2000, 魔術幻燈 poetlabo@cap.bekkoame.ne.jp 引用・転載・複写・盗作その他の活用を歓迎します ---------------------------------------------------------------------- Network Working Group Request for Comments: 2854 Obsoletes: 2070, 1980, 1942, 1867, 1866 Category: Informational D. Connolly World Wide Web Consortium (W3C) L. Masinter AT&T June 2000 媒体種別『text/html』 The 'text/html' Media Type この書きつけの位置付け Status of this Memo この書きつけは、インターネット社会のための情報を与えます。これはいかなる種 類にせよ、インターネット標準を定めるものではありません。この書きつけの配布は 無制限です。 This memo provides information for the Internet community. It does not specify an Internet standard of any kind. Distribution of this memo is unlimited. 著作権表示 Copyright Notice Copyright (C) The Internet Society (2000). All Rights Reserved. 要旨 Abstract この文書は、HTML開発史を辿るものであるとともに、W3C の然るべき勧告を示すこ とにより、 "text/html" MIME type を定義するものです。これは RFC 1866, RFC 1867, RFC 1980, RFC1942, RFC 2070 など、以前の HTML に関する IETF 文書を置き 換え、HTML を IETF 標準軌道から除くことを意図しています。 This document summarizes the history of HTML development, and defines the "text/html" MIME type by pointing to the relevant W3C recommendations; it is intended to obsolete the previous IETF documents defining HTML, including RFC 1866, RFC 1867, RFC 1980, RFC 1942 and RFC 2070, and to remove HTML from IETF Standards Track. この文書は、 W3C HTML 作業班の要求の許に用意されました。全集を公開しているメ ーリングリスト www-html@w3.org 宛にご意見ください。 This document was prepared at the request of the W3C HTML working group. Please send comments to www-html@w3.org, a public mailing list with archive at "http://lists.w3.org/Archives/Public/www-html/". 1. 始まりと背景 Introduction and background 2. MIME 媒体種別 text/html の登録 Registration of MIME media type text/html 3. 断片識別子 Fragment Identifiers 4. 符号化の判定 Encoding considerations 5. HTMLファイルの認識 Recognizing HTML files 6. 既定文字集合規則 Charset default rules 7. 安全上の配慮 Security Considerations 8. 著者の連絡先 Authors' Addresses 9. 参考文献 References 10. 著作権主張全文 Full Copyright Statement 1. 始まりと背景 Introduction and background HTML は1990年以来、 World Wide Web 情報資産で使われ、種々様々の非公式な文 書で定められてきました。text/html 媒体種別が公式に定義された最初のものは、 IETF HTML 作業班による HTML 2.0 で、1995年のことでした。HTML の拡張として は、HTML 3.0, UPLOAD, TABLES, CLIMAPS, I18N が提案されました。 HTML has been in use in the World Wide Web information infrastructure since 1990, and specified in various informal documents. The text/html media type was first officially defined by the IETF HTML working group in 1995 in [HTML20]. Extensions to HTML were proposed in [HTML30], [UPLOAD], [TABLES], [CLIMAPS], and [I18N]. IETF HTML 作業班は1996年7月に解散し、HTML を定義する仕事は World Wide Web Consortium (W3C) へ移りました。提案された拡張の少々は HTML32 に、より大幅な 拡張は HTML40 に組み込まれました。UPLOAD からの multipart/form-data 定義は、 FORMDATA に記されています。さらに、HTML 4.0 を XML 1.0 で作り直した [XHTML1] も開発されました。 The IETF HTML working group closed Sep 1996, and work on defining HTML moved to the World Wide Web Consortium (W3C). The proposed extensions were incorporated to some extent in [HTML32], and to a larger extent in [HTML40]. The definition of multipart/form-data from [UPLOAD] was described in [FORMDATA]. In addition, a reformulation of HTML 4.0 in XML 1.0[XHTML1] was developed. HTML32 では「この仕様書はHTML第3.2版を定義します。HTML3.2は、96年当初の勧告 済みの実験や HTML 2.0 (RFC 1866)を置き換えるものとして使われてきたようなもの に取って代わることを狙いとします」としていました。続いてHTMLの仕様には、各版 の違いを記してあります。 [HTML32] notes "This specification defines HTML version 3.2. HTML 3.2 aims to capture recommended practice as of early '96 and as such to be used as a replacement for HTML 2.0 (RFC 1866)." Subsequent specifications for HTML describe the differences in each version. HTMLには標準の発展に加え、当初NCSAのMosaicにより、後にはNetscape Navigator とMicrosoft Internet Explorerとの競争的な実装により広められた、広範で多岐に 渡る追加拡張や制限や変更がありました。これらの拡張は、数多くの本やオンライン ガイドで文書化されています。 In addition to the development of standards, a wide variety of additional extensions, restrictions, and modifications to HTML were popularized by NCSA's Mosaic system and subsequently by the competitive implementations of Netscape Navigator and Microsoft Internet Explorer; these extensions are documented in numerous books and online guides. 2. MIME 媒体種別 text/html の登録 Registration of MIME media type text/html MIME 媒体種別名 MIME media type name: text MIME 副種別名 MIME subtype name: html 必須変数 Required parameters: none 追加変数 Optional parameters: charset 追加変数 "charset" は、HTML文書を表示するのに使われている文字符号 化方式を、バイト単位で参照します。 IANA に登録されている文字集合な ら何でも使えますが、どちらかというと UTF-8 がいいでしょう。この変 数は必須ではないけれども、常に置いておくことを強く勧めます。既定文 字集合の規則については、下記第6項で論じています。 The optional parameter "charset" refers to the character encoding used to represent the HTML document as a sequence of bytes. Any registered IANA charset may be used, but UTF-8 is preferred. Although this parameter is optional, it is strongly recommended that it always be present. See Section 6 below for a discussion of charset default rules. HTML2.0には、追加変数 "level" が入っていました。実際には、これは全 く使われなかったので、この仕様書からは除かれています。HTML3.0でも 同様に "version" 変数を考えていましたが、実際には、この変数も全く 使われなかったので、この仕様書からは除かれています。 Note that [HTML20] included an optional "level" parameter; in practice, this parameter was never used and has been removed from this specification. [HTML30] also suggested a "version" parameter; in practice, this parameter also was never used and has been removed from this specification. 符号化への配慮 Encoding considerations: 第4項を見てください。 See Section 4 of this document. 安全上の配慮 Security considerations: 第7項を見てください。 See Section 7 of this document. 共用性への配慮 Interoperability considerations: HTMLは、可能な限り広範な機器や装置で共用可能なように設計されています。 しかしながら、(機器の表示能力の限界など)HTMLの全ての定義を生かし切る ことのできない場合もあります。HTMLの細分化と、制約あるいは拡張された能 力を識別し交渉するための能力描写集合の両方を開発する作業が進行中です。 HTML is designed to be interoperable across the widest possible range of platforms and devices of varying capabilities. However, there are contexts (platforms of limited display capability, for example) where not all of the capabilities of the full HTML definition are feasible. There is ongoing work to develop both a modularization of HTML and a set of profiling capabilities to identify and negotiate restricted (and extended) capabilities. HTMLの発展がもたらされたために、インターネット上には現在、実に種々さま ざまなHTMLの変種が存在します。 text/html 解釈装置の設計者は、多くのHTML 文書をインターネットで利用できるようにするために、主流のブラウザとの 『バグ互換性』を用意しなければなりません。 Due to the long and distributed development of HTML, current practice on the Internet includes a wide variety of HTML variants. Implementors of text/html interpreters must be prepared to be "bug-compatible" with popular browsers in order to work with many HTML documents available the Internet. 典型的には、版の違いは含まれるDOCTYPE宣言により認識されるものなのに、 DOCTYPE宣言自体が省略されたり正しくなかったりします。 Typically, different versions are distinguishable by the DOCTYPE declaration contained within them, although the DOCTYPE declaration itself is sometimes omitted or incorrect. 公表された仕様 Published specification: text/html 媒体種別は現在、W3C の勧告によって定義されており、公表された 最新の版は[HTML401]です。さらに、[XHTML1]は XHTML 利用の profile を定義 しており、これはHTML 4.01 と互換性があり、同様に text/html としてかまわ ないものです。 The text/html media type is now defined by W3C Recommendations; the latest published version is [HTML401]. In addition, [XHTML1] defines a profile of use of XHTML which is compatible with HTML 4.01 and which may also be labeled as text/html. この媒体種別の応用 Applications which use this media type: HTMLの最初の、そして最も普遍的な応用は World Wide Web です。HTML文書は 普通、 HTTP 作法 [HTTP] を用いて取ってくる他の文書や媒体への URI 参照 [URI] を含みます。多くの gateway 応用 は他の複合サービスに、HTMLに基く インターフェイスをもたらします。今ではその他数多くの応用においても、プ ラットホームに依存しない便利な複合媒体文書表現として、HTMLを利用するよ うになっています。 The first and most common application of HTML is the World Wide Web; commonly, HTML documents contain URI references [URI] to other documents and media to be retrieved using the HTTP protocol [HTTP]. Many gateway applications provide HTML-based interfaces to other underlying complex services. Numerous other applications now also use HTML as a convenient platform-independent multimedia document representation. 追加情報 Additional information: 魔法数 Magic number: 常にHTMLファイルを表す単一の初期文字列はありません。しかしながら、 下記第5項ではHTMLファイルを認識するためのいくつかのガイドラインを 与えます。 There is no single initial string that is always present for HTML files. However, Section 5 below gives some guidelines for recognizing HTML files. ファイル拡張子 File extension: ファイル拡張子には普通「html」あるいは「htm」が使われますが、前処 理のためのファイル形式を記している他の拡張子もよく使われています。 The file extensions 'html' or 'htm' are commonly used, but other extensions denoting file formats for preprocessing are also common. Macintosh File Type code: TEXT Person & email address to contact for further information: Dan Connolly Larry Masinter Intended usage: COMMON 作者/変更管理者 Author/Change controller: HTML仕様書は、World Wide Web Consortium の HTML 作業班の手になる作品で す。 W3C がHTML仕様書の変更管理権を持ちます。 The HTML specification is a work product of the World Wide Web Consortium's HTML Working Group. The W3C has change control over the HTML specification. 予告 Further information: HTMLはURIを用いた参照により、追加素材(画像・動画・小さなプログラム)を 基の文書に入れ込む機能を備えています。完全なHTML物体と挿入素材を単一の MIME物体として転送するために、 [MHTML] 機構を利用することが考えられま す。 HTML has a means of including, by reference via URI, additional resources (image, video clip, applet) within the base document. In order to transfer a complete HTML object and the included resources in a single MIME object, the mechanisms of [MHTML] may be used. 3. 断片識別子 Fragment Identifiers URI 仕様書 [URI] は、断片識別子(URI の「#」より後の部分)の意味合いが、検索 結果となるデータの特性であること、そしてその形式及び断片識別子の解釈が検索結 果の媒体種別に依存することを記しています。 The URI specification [URI] notes that the semantics of a fragment identifier (part of a URI after a "#") is a property of the data resulting from a retrieval action, and that the format and interpretation of fragment identifiers is dependent on the media type of the retrieval result. text/html とされた文書では、断片識別子は対応する名前のついた要素を指示しま す。どの要素にも id 属性で名前を付けられるほか、 A, APPLET, FRAME, IFRAME, IMG, MAP 各要素には name 属性で名前を付けられます。この件については、 [HTML40] 第12項に詳しく説明してあります。 For documents labeled as text/html, the fragment identifier designates the correspondingly named element; any element may be named with the "id" attribute, and A, APPLET, FRAME, IFRAME, IMG and MAP elements may be named with a "name" attribute. This is described in detail in [HTML40] section 12. 4. 符号化の判定 Encoding considerations HTMLにおける文字実体参照利用の威力により、幅広い文字レパートリーを使う文書で すら US-ASCII 文字集合を使って表示され、符号化せずに搬送されることもありま す。しかしながら、 US-ASCII 以外の文字集合を使った text/html の搬送には、 base64 あるいは 7-bit チャンネル用 quoted-printable 符号化を必要とすることが あります。 Because of the availability within HTML itself for using character entity references, documents that use a wide repertoire of characters may still be represented using the US-ASCII charset and transported without encoding. However, transport of text/html using a charset other than US-ASCII may require base64 or quoted-printable encoding for 7-bit channels. 副種別を持つMIME 文に共通することとして、『text/html』の有るべき姿としては、 常に改行をCR (0x0D)バイト値とそれに続く LF (0x0A) バイト値との組み合わせとし て表示しなければなりません。同様に、そのような CRLF 単位が『text/html』にあ ったら、それは改行として表示されなければなりません。改行単位より外側での CR バイト値と LF バイト値の使用も、禁止されています。この規則は、文字符号化方式 には関係なく適用されます。 As with all MIME text subtypes, the canonical form of "text/html" must always represent a line break as a sequence of a CR byte value (0x0D) followed by an LF (0x0A) byte value. Similarly, any occurrence of such a CRLF sequence in "text/html" must represent a line break. Use of CR byte values and LF byte values outside of line break sequences is also forbidden. This rule applies regardless of the character encoding ('charset') involved. しかしながら、HTTP作法が教科書的でない形、特に他の行末を持つもののデータ搬送 を許すことに注意してください。 [HTTP] 第3.7.1項を参照のこと。この例外は、 HTMLではよく使われます。 Note, however, that the HTTP protocol allows the transport of data not in canonical form, and, in particular, with other end-of-line conventions; see [HTTP] section 3.7.1. This exception is commonly used for HTML. 電子メイルで送られたHTMLは、未だMIME規制の課題となっています。これは、 [MHTML] 第10項で、全体が論じられています。 HTML sent via email is still subject to the MIME restrictions; this is discussed fully in [MHTML] Section 10. 5. HTMLファイルの認識 Recognizing HTML files 大半のHTMLファイルには、ファイルの開始位置近くに文字列「