1 |
wakaba |
1.1 |
#?SuikaWiki/0.9 import="XML訳語集,メッセージ訳語集,RFC訳語集,その他の訳語集"
|
2 |
|
|
[1] [[RFC3023]] と [[RFC2679]] の差分, そしてその和訳。
|
3 |
|
|
詳しくは [[..//]] 参照。
|
4 |
|
|
*1[INS[.]] Introduction [INS[初めに]]
|
5 |
|
|
>The World Wide Web Consortium [DEL[(W3C)]] has issued [DEK[a Recommendation [REC-XML] which defines the]] Extensible Markup Language
|
6 |
|
|
(XML)[DEL[, version 1]] [INS[1.0 (Second Edition)[XML] ]]. To enable the exchange of XML
|
7 |
|
|
network entities, this document [DEL[proposes two]] [INS[standardizes five]] new media types[DEL[,]] [INS[--]]
|
8 |
|
|
text/xml[INS[,]] [DEL[and]] application/xml[INS[, text/xml-external-parsed-entity, application/xml-external-parsed-entity, and application/xml-dtd -- as well as a naming convention for identifying XML-based MIME media types]].
|
9 |
|
|
>XML entities are currently exchanged on the World Wide Web, and XML
|
10 |
|
|
is also used for property values and parameter marshalling by the
|
11 |
|
|
WebDAV[INS[[RFC2518] ]] protocol for remote web authoring. Thus, there is a
|
12 |
|
|
need for a media type to properly label the exchange of XML network
|
13 |
|
|
entities. [DEL[(Note that, as sometimes happens between two communities, both MIME and XML have defined the term entity, with different meanings.)]]
|
14 |
|
|
>Although XML is a subset of the Standard Generalized Markup Language
|
15 |
|
|
(SGML) [DEL[[ISO-8897], and currently is]] [INS[ISO 8879[SGML], which has been]] assigned the media types
|
16 |
|
|
text/sgml and application/sgml, there are several reasons why use of
|
17 |
|
|
text/sgml or application/sgml to label XML is inappropriate. First,
|
18 |
|
|
there exist many applications [DEL[which]] [INS[that]] can process XML, but [DEK[which]] [INS[that]] cannot
|
19 |
|
|
process SGML, due to SGML's larger feature set. Second, SGML
|
20 |
|
|
applications cannot always process XML entities, because XML uses
|
21 |
|
|
features of recent technical corrigenda to SGML. Third, the
|
22 |
|
|
definition of text/sgml and application/sgml [INS[in]] [RFC[DEL[-]]1874] includes
|
23 |
|
|
parameters for SGML bit combination transformation format (SGML-
|
24 |
|
|
bctf), and SGML boot attribute (SGML-boot). Since XML does not use
|
25 |
|
|
these parameters, it would be ambiguous if such parameters were given
|
26 |
|
|
for an XML [INS[MIME]] entity. For these reasons, the best approach for
|
27 |
|
|
labeling XML network entities is to provide new media types for XML.
|
28 |
|
|
>Since XML is an integral part of the WebDAV Distributed Authoring
|
29 |
|
|
Protocol, and since World Wide Web Consortium Recommendations have
|
30 |
|
|
conventionally been assigned IETF tree media types, and since similar
|
31 |
|
|
media types (HTML, SGML) have been assigned IETF tree media types,
|
32 |
|
|
the XML media types also belong in the IETF media types tree.
|
33 |
|
|
|
34 |
|
|
[INS[
|
35 |
|
|
>Similarly, XML will be used as a foundation for other media types,
|
36 |
|
|
including types in every branch of the IETF media types tree. To
|
37 |
|
|
facilitate the processing of such types, media types based on XML,
|
38 |
|
|
but that are not identified using text/xml or application/xml, SHOULD
|
39 |
|
|
be named using a suffix of '+xml' as described in Section 7. This
|
40 |
|
|
will allow XML-based tools -- browsers, editors, search engines, and
|
41 |
|
|
other processors -- to work with all XML-based media types.
|
42 |
|
|
]INS]
|
43 |
|
|
|
44 |
|
|
[INS[
|
45 |
|
|
*2. Notational Conventions
|
46 |
|
|
]INS]
|
47 |
|
|
>The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
|
48 |
|
|
"SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
|
49 |
|
|
document are to be interpreted as described in [RFC[DEL[-]]2119].
|
50 |
|
|
|
51 |
|
|
[INS[
|
52 |
|
|
>As defined in [RFC2781], the three charsets "utf-16", "utf-16le", and
|
53 |
|
|
"utf-16be" are used to label UTF-16 text. In this document, "the
|
54 |
|
|
UTF-16 family" refers to those three charsets. By contrast, the
|
55 |
|
|
phrases "utf-16" or UTF-16 in this document refer specifically to the
|
56 |
|
|
single charset "utf-16".
|
57 |
|
|
>As sometimes happens between two communities, both MIME and XML have
|
58 |
|
|
defined the term entity, with different meanings. Section 2.4 of
|
59 |
|
|
[RFC2045] says:
|
60 |
|
|
>>"The term 'entity' refers specifically to the MIME-defined header
|
61 |
|
|
fields and contents of either a message or one of the parts in the
|
62 |
|
|
body of a multipart entity."
|
63 |
|
|
>Section 4 of [XML] says:
|
64 |
|
|
>>"An XML document may consist of one or many storage units" called
|
65 |
|
|
entities that "have content" and are normally "identified by
|
66 |
|
|
name".
|
67 |
|
|
>In this document, "XML MIME entity" is defined as the latter (an XML
|
68 |
|
|
entity) encapsulated in the former (a MIME entity).
|
69 |
|
|
]INS]
|
70 |
|
|
|
71 |
|
|
*3[INS[.]] XML Media Types
|
72 |
|
|
>This document [DEL[introduces two new]] [INS[standardizes five]] media types [DEL[for]] [INS[related to]] XML [DEL[MIME]]
|
73 |
|
|
entities[DEL[,]][INS[:]] text/xml[INS[,]] [DEL[and]] application/xml[INS[, text/xml-external-parsed-entity, application/xml-external-parsed-entity, and application/xml-dtd]].
|
74 |
|
|
Registration information for these media types [DEL[are]] [INS[is]] described in the
|
75 |
|
|
sections below.
|
76 |
|
|
|
77 |
|
|
[DEL[
|
78 |
|
|
>Every XML entity is suitable for use with the application/xml media
|
79 |
|
|
type without modification. But this does not exploit the fact that
|
80 |
|
|
XML can be treated as plain text in many cases. MIME user agents
|
81 |
|
|
(and web user agents) that do not have explicit support for
|
82 |
|
|
application/xml will treat it as application/octet-stream, for
|
83 |
|
|
example, by offering to save it to a file.
|
84 |
|
|
>To indicate that an XML entity should be treated as plain text by
|
85 |
|
|
default, use the text/xml media type. This restricts the encoding
|
86 |
|
|
used in the XML entity to those that are compatible with the
|
87 |
|
|
requirements for text media types as described in [RFC-2045] and
|
88 |
|
|
[RFC-2046], e.g., UTF-8, but not UTF-16 (except for HTTP).
|
89 |
|
|
]DEL]
|
90 |
|
|
|
91 |
|
|
[INS[
|
92 |
|
|
>Within the XML specification, XML MIME entities can be classified
|
93 |
|
|
into four types. In the XML terminology, they are called "document
|
94 |
|
|
entities", "external DTD subsets", "external parsed entities", and
|
95 |
|
|
"external parameter entities". The media types text/xml and
|
96 |
|
|
application/xml MAY be used for "document entities", while text/xml-external-parsed-entity or application/xml-external-parsed-entity
|
97 |
|
|
SHOULD be used for "external parsed entities". The media type
|
98 |
|
|
application/xml-dtd SHOULD be used for "external DTD subsets" or
|
99 |
|
|
"external parameter entities". application/xml and text/xml MUST NOT
|
100 |
|
|
be used for "external parameter entities" or "external DTD subsets",
|
101 |
|
|
and MUST NOT be used for "external parsed entities" unless they are
|
102 |
|
|
also well-formed "document entities" and are referenced as such.
|
103 |
|
|
Note that [RFC2376] (which this document obsoletes) allowed such
|
104 |
|
|
usage, although in practice it is likely to have been rare.
|
105 |
|
|
|
106 |
|
|
XML 仕様書のによれば、 XML MIME 実体は4種類に分類できます。
|
107 |
|
|
XML の用語では、[CODE[[[文書実体]]]], [CODE[[[外部解析実体]]]],
|
108 |
|
|
[CODE[[[外部DTD部分集合]]]], [CODE[[[外部引数集合]]]]と呼びます。
|
109 |
|
|
媒体型 [CODE[[[text/xml]]]] 及び
|
110 |
|
|
[CODE[[[application/xml]]]] を、
|
111 |
|
|
[CODE[文書実体]]に使っても'''構いません'''。
|
112 |
|
|
[CODE[[[text/xml-external-parsed-entity]]]]
|
113 |
|
|
又は [CODE[[[application/xml-external-parsed-entity]]]]
|
114 |
|
|
を[CODE[外部解析実体]]に使う'''べきです'''。
|
115 |
|
|
[CODE[[[application/xml-dtd]]]]
|
116 |
|
|
を[CODE[外部 DTD 部分集合]]及び[CODE[外部引数実体]]に使う'''べきです'''。
|
117 |
|
|
[CODE[application/xml]] 及び [CODE[text/xml]]
|
118 |
|
|
は、[CODE[外部引数実体]]や[CODE[外部 DTD 部分集合]]には使っては'''ならず'''、
|
119 |
|
|
[CODE[外部解析実体]]には、これが[CODE[文書実体]]として[[整形式]]であって、そう参照される場合を除いて使っては'''なりません'''。
|
120 |
|
|
(この文書が廃止する) [[RFC2376]] はそのような使い方を認めていますが、
|
121 |
|
|
実際のところこれは稀でしょう。
|
122 |
|
|
|
123 |
|
|
>Neither external DTD subsets nor external parameter entities parse as
|
124 |
|
|
XML documents, and while some XML document entities may be used as
|
125 |
|
|
external parsed entities and vice versa, there are many cases where
|
126 |
|
|
the two are not interchangeable. XML also has unparsed entities,
|
127 |
|
|
internal parsed entities, and internal parameter entities, but they
|
128 |
|
|
are not XML MIME entities.
|
129 |
|
|
>If an XML document -- that is, the unprocessed, source XML document
|
130 |
|
|
-- is readable by casual users, text/xml is preferable to
|
131 |
|
|
application/xml. MIME user agents (and web user agents) that do not
|
132 |
|
|
have explicit support for text/xml will treat it as text/plain, for
|
133 |
|
|
example, by displaying the XML MIME entity as plain text.
|
134 |
|
|
Application/xml is preferable when the XML MIME entity is unreadable
|
135 |
|
|
by casual users. Similarly, text/xml-external-parsed-entity is
|
136 |
|
|
preferable when an external parsed entity is readable by casual
|
137 |
|
|
users, but application/xml-external-parsed-entity is preferable when
|
138 |
|
|
a plain text display is inappropriate.
|
139 |
|
|
|
140 |
|
|
>NOTE: Users are in general not used to text containing tags such
|
141 |
|
|
as <price>, and often find such tags quite disorienting or
|
142 |
|
|
annoying. If one is not sure, the conservative principle would
|
143 |
|
|
suggest using application/* instead of text/* so as not to put
|
144 |
|
|
information in front of users that they will quite likely not
|
145 |
|
|
understand.
|
146 |
|
|
|
147 |
|
|
>The top-level media type "text" has some restrictions on MIME
|
148 |
|
|
entities and they are described in [RFC2045] and [RFC2046]. In
|
149 |
|
|
particular, the UTF-16 family, UCS-4, and UTF-32 are not allowed
|
150 |
|
|
(except over HTTP[RFC2616], which uses a MIME-like mechanism). Thus,
|
151 |
|
|
if an XML document or external parsed entity is encoded in such
|
152 |
|
|
character encoding schemes, it cannot be labeled as text/xml or
|
153 |
|
|
text/xml-external-parsed-entity (except for HTTP).
|
154 |
|
|
>Text/xml and application/xml behave differently when the charset
|
155 |
|
|
parameter is not explicitly specified. If the default charset (i.e.,
|
156 |
|
|
US-ASCII) for text/xml is inconvenient for some reason (e.g., bad web
|
157 |
|
|
servers), application/xml provides an alternative (see "Optional
|
158 |
|
|
parameters" of application/xml registration in Section 3.2). The
|
159 |
|
|
same rules apply to the distinction between text/xml-external-
|
160 |
|
|
parsed-entity and application/xml-external-parsed-entity.
|
161 |
|
|
]INS]
|
162 |
|
|
|
163 |
|
|
>XML provides a general framework for defining sequences of structured
|
164 |
|
|
data. In some cases, it may be desirable to define new media
|
165 |
|
|
types [DEL[which]] [INS[that]] use XML but define a specific application of XML, perhaps due to
|
166 |
|
|
domain-specific security considerations or runtime information. [INS[Furthermore, such media types may allow UTF-8 or UTF-16 only and prohibit other charsets.]] This document does not prohibit [DEL[future]] [INS[such]] media
|
167 |
|
|
types [DEL[dedicated to such XML applications]] [INS[and in fact expects them to proliferate]]. However, developers
|
168 |
|
|
of such media types are [DEL[recommended]] [INS[STRONGLY RECOMMENDED]] to use this document as
|
169 |
|
|
a basis [INS[for their registration]]. In particular, the charset
|
170 |
|
|
parameter [DEL[should]] [INS[SHOULD]] be used in the same manner[INS[, as described in Section 7.1, in order to enhance interoperability]].
|
171 |
|
|
|
172 |
|
|
[INS[
|
173 |
|
|
>An XML document labeled as text/xml or application/xml might contain
|
174 |
|
|
namespace declarations, stylesheet-linking processing instructions
|
175 |
|
|
(PIs), schema information, or other declarations that might be used
|
176 |
|
|
to suggest how the document is to be processed. For example, a
|
177 |
|
|
document might have the XHTML namespace and a reference to a CSS
|
178 |
|
|
stylesheet. Such a document might be handled by applications that
|
179 |
|
|
would use this information to dispatch the document for appropriate
|
180 |
|
|
processing.
|
181 |
|
|
]INS]
|
182 |
|
|
[DEL[
|
183 |
|
|
>Within the XML specification, XML entities can be classified into
|
184 |
|
|
four types. In the XML terminology, they are called "document
|
185 |
|
|
entities", "external DTD subsets", "external parsed entities", and
|
186 |
|
|
"external parameter entities". The media types text/xml and
|
187 |
|
|
application/xml can be used for any of these four types.
|
188 |
|
|
]DEL]
|
189 |
|
|
|
190 |
|
|
**3.1 Text/xml Registration
|
191 |
|
|
:MIME media type name: text
|
192 |
|
|
:MIME subtype name: xml
|
193 |
|
|
:Mandatory parameters: none
|
194 |
|
|
:Optional parameters: charset
|
195 |
|
|
|
196 |
|
|
Although listed as an optional parameter, the use of the charset
|
197 |
|
|
parameter is STRONGLY RECOMMENDED, since this information can be
|
198 |
|
|
used by XML processors to determine authoritatively the character
|
199 |
|
|
encoding of the XML [INS[MIME]] entity. The charset parameter can also
|
200 |
|
|
be used to provide protocol-specific operations, such as charset-based content negotiation in HTTP. "utf-8" [RFC[DEL[-]]2279] is the
|
201 |
|
|
recommended value, representing the UTF-8 charset. UTF-8 is
|
202 |
|
|
supported by all conforming [DEL[XML]] processors [DEL[[REC-XML] ]] [INS[of [XML] ]].
|
203 |
|
|
|
204 |
|
|
If the XML [INS[MIME]] entity is transmitted via HTTP, which uses a
|
205 |
|
|
MIME-like mechanism that is exempt from the restrictions on the
|
206 |
|
|
text top-level type (see section 19.4.1 of [DEL[HTTP 1.1]] [RFC2616]), [DEL["UTF-16"]] [INS["utf-16"]] [DEL[(Appendix C.3 of [UNICODE] and Amendment 1 of [ISO-10646])]]
|
207 |
|
|
[INS[[RFC2781])]] [INS[(訳注: ママ)]] is also recommended. UTF-16 is supported by all
|
208 |
|
|
conforming [DEL[XML]] processors [DEL[[REC-XML] ]] [INS[of [XML] ]]. Since the handling of CR, LF and
|
209 |
|
|
NUL for text types in most MIME applications would cause undesired
|
210 |
|
|
transformations of individual octets in UTF-16 multi-octet
|
211 |
|
|
characters, gateways from HTTP to these MIME applications MUST
|
212 |
|
|
transform the XML MIME entity from [DEL[a]] text/xml; charset="utf-16" to
|
213 |
|
|
application/xml; charset="utf-16".
|
214 |
|
|
|
215 |
|
|
Conformant with [RFC[DEL[-]]2046], if a text/xml entity is received with
|
216 |
|
|
the charset parameter omitted, MIME processors and XML processors
|
217 |
|
|
MUST use the default charset value of "us-ascii"[INS[[ASCII] ]]. In cases
|
218 |
|
|
where the XML [INS[MIME]] entity is transmitted via HTTP, the default
|
219 |
|
|
charset value is still "us-ascii". [INS[(Note: There is an inconsistency between this specification and HTTP/1.1, which uses ISO-8859-1[ISO8859] as the default for a historical reason. Since XML is a new format, a new default should be chosen for better I18N. US-ASCII was chosen, since it is the intersection of UTF-8 and ISO-8859-1 and since it is already used by MIME.)]]
|
220 |
|
|
|
221 |
|
|
[INS[
|
222 |
|
|
>There are several reasons that the charset parameter is
|
223 |
|
|
authoritative. First, some MIME processing engines do transcoding
|
224 |
|
|
of MIME bodies of the top-level media type "text" without
|
225 |
|
|
reference to any of the internal content. Thus, it is possible
|
226 |
|
|
that some agent might change text/xml; charset="iso-2022-jp" to
|
227 |
|
|
text/xml; charset="utf-8" without modifying the encoding
|
228 |
|
|
declaration of an XML document. Second, text/xml must be
|
229 |
|
|
compatible with text/plain, since MIME agents that do not
|
230 |
|
|
understand text/xml will fallback to handling it as text/plain.
|
231 |
|
|
If the charset parameter for text/xml were not authoritative, such
|
232 |
|
|
fallback would cause data corruption. Third, recent web servers
|
233 |
|
|
have been improved so that users can specify the charset
|
234 |
|
|
parameter. Fourth, [RFC2130] specifies that the recommended
|
235 |
|
|
specification scheme is the "charset" parameter.
|
236 |
|
|
]INS]
|
237 |
|
|
|
238 |
|
|
>Since the charset parameter is authoritative, the charset is not
|
239 |
|
|
always declared within an XML encoding declaration. Thus, special
|
240 |
|
|
care is needed when the recipient strips the MIME header and
|
241 |
|
|
provides persistent storage of the received XML [INS[MIME]] entity (e.g.,
|
242 |
|
|
in a file system). Unless the charset is UTF-8 or UTF-16, the
|
243 |
|
|
recipient SHOULD also persistently store information about the
|
244 |
|
|
charset, perhaps by embedding a correct XML encoding declaration
|
245 |
|
|
within the XML [INS[MIME]] entity.
|
246 |
|
|
|
247 |
|
|
Encoding considerations: This media type MAY be encoded as
|
248 |
|
|
appropriate for the charset and the capabilities of the underlying
|
249 |
|
|
MIME transport. For 7-bit transports, data in [DEL[both]] UTF-8 [DEL[and UTF-16 is]] [INS[MUST be]]
|
250 |
|
|
encoded in quoted-printable or base64. For 8-bit clean transport
|
251 |
|
|
(e.g., [DEL[ESMTP,]] 8BITMIME[INS[[RFC1652] ESMTP]][DEL[,]] or NNTP[INS[[RFC0977] ]]), UTF-8 [DEL[is]] [INS[does]] not
|
252 |
|
|
[INS[need to be]] encoded. [DEL[For binary clean transports (e.g., HTTP)]] [INS[Over HTTP[RFC2616] ]], no content-transfer-encoding is necessary [INS[and UTF-16 may also be used]].
|
253 |
|
|
|
254 |
|
|
:Security considerations: See [DEL[4 below]] [INS[Section 10]].
|
255 |
|
|
|
256 |
|
|
Interoperability considerations: XML has proven to be interoperable
|
257 |
|
|
across WebDAV clients and servers, and for import and export from
|
258 |
|
|
multiple XML authoring tools. [INS[For maximum interoperability, validating processors are recommended. Although non-validating processors may be more efficient, they are not required to handle all features of XML. For further information, see sub-section 2.9 "Standalone Document Declaration" and section 5 "Conformance" of [XML].]]
|
259 |
|
|
|
260 |
|
|
:Published specification: [DEL[see [REC-XML] ]] [INS[Extensible Markup Language (XML) 1.0 (Second Edition)[XML].]]
|
261 |
|
|
|
262 |
|
|
Applications which use this media type: XML is device-, platform-,
|
263 |
|
|
and vendor-neutral and is supported by a wide range of Web user
|
264 |
|
|
agents, WebDAV[RFC2518] clients and servers, as well as XML
|
265 |
|
|
authoring tools.
|
266 |
|
|
|
267 |
|
|
Additional information:
|
268 |
|
|
|
269 |
|
|
Magic number(s): None.
|
270 |
|
|
|
271 |
|
|
Although no byte sequences can be counted on to always be
|
272 |
|
|
present, XML [INS[MIME]] entities in ASCII-compatible charsets
|
273 |
|
|
(including UTF-8) often begin with hexadecimal 3C 3F 78 6D 6C
|
274 |
|
|
("<?xml")[INS[, and those in UTF-16 often begin with hexadecimal FE FF 00 3C 00 3F 00 78 00 6D 00 6C or FF FE 3C 00 3F 00 78 00 6D 00 6C 00 (the Byte Order Mark (BOM) followed by "<?xml")]]. For
|
275 |
|
|
more information, see Appendix F of [[DEL[REC-]]XML].
|
276 |
|
|
|
277 |
|
|
File extension(s): .xml[DEL[, .dtd]]
|
278 |
|
|
|
279 |
|
|
Macintosh File Type Code(s): "TEXT"
|
280 |
|
|
|
281 |
|
|
Person [DEL[&]] [INS[and]] email address for further information:
|
282 |
|
|
|
283 |
|
|
[DEL[
|
284 |
|
|
- Dan Connolly <connolly@w3.org>
|
285 |
|
|
- Murata Makoto (Family Given) <murata@fxis.fujixerox.co.jp>
|
286 |
|
|
]DEL]
|
287 |
|
|
[INS[
|
288 |
|
|
- MURATA Makoto (FAMILY Given) <mmurata@trl.ibm.co.jp>
|
289 |
|
|
- Simon St.Laurent <simonstl@simonstl.com>
|
290 |
|
|
- Daniel Kohn <dan@dankohn.com>
|
291 |
|
|
]INS]
|
292 |
|
|
Intended usage: COMMON
|
293 |
|
|
|
294 |
|
|
Author/Change controller: The XML specification is a work product of
|
295 |
|
|
the World Wide Web Consortium's XML Working Group, and was edited
|
296 |
|
|
by:
|
297 |
|
|
|
298 |
|
|
- Tim Bray <tbray@textuality.com>
|
299 |
|
|
- Jean Paoli <jeanpa@microsoft.com>
|
300 |
|
|
- C. M. Sperberg-McQueen <cmsmcq@uic.edu>
|
301 |
|
|
- Eve Maler <eve.maler@east.sun.com>
|
302 |
|
|
|
303 |
|
|
>The W3C, and the W3C XML [INS[Core]] [DEL[w]][INS[W]]orking [DEL[g]][INS[G]]roup, have change control
|
304 |
|
|
over the XML specification.
|
305 |
|
|
|
306 |
|
|
**3.2 Application/xml Registration
|
307 |
|
|
:MIME media type name: application
|
308 |
|
|
:MIME subtype name: xml
|
309 |
|
|
:Mandatory parameters: none
|
310 |
|
|
:Optional parameters: charset
|
311 |
|
|
|
312 |
|
|
Although listed as an optional parameter, the use of the charset
|
313 |
|
|
parameter is STRONGLY RECOMMENDED, since this information can be
|
314 |
|
|
used by XML processors to determine authoritatively the charset of
|
315 |
|
|
the XML [INS[MIME]] entity. The charset parameter can also be used to
|
316 |
|
|
provide protocol-specific operations, such as charset-based
|
317 |
|
|
content negotiation in HTTP.
|
318 |
|
|
|
319 |
|
|
[DEL["UTF-8" [RFC-2279] and "UTF-16" (Appendix C.3 of [UNICODE] and Amendment 1 of [ISO-10646])]] [INS["utf-8" [RFC2279] and "utf-16" [RFC2781] ]] are the recommended
|
320 |
|
|
values, representing the UTF-8 and UTF-16 charsets, respectively.
|
321 |
|
|
These charsets are preferred since they are supported by all
|
322 |
|
|
conforming [DEL[XML]] processors [INS[of]] [[DEL[REC-]]XML].
|
323 |
|
|
|
324 |
|
|
If an application/xml entity is received where the charset
|
325 |
|
|
parameter is omitted, no information is being provided about the
|
326 |
|
|
charset by the MIME Content-Type header. Conforming XML
|
327 |
|
|
processors MUST follow the requirements in section 4.3.3 of [[DEL[REC-]]XML]
|
328 |
|
|
[DEL[which]] [INS[that]] directly address this contingency. However, MIME processors
|
329 |
|
|
[DEL[which]] [INS[that]] are not XML processors [DEL[should not]] [INS[SHOULD NOT]] assume a default charset if
|
330 |
|
|
the charset parameter is omitted from an application/xml entity.
|
331 |
|
|
|
332 |
|
|
[INS[
|
333 |
|
|
>There are several reasons that the charset parameter is
|
334 |
|
|
authoritative. First, recent web servers have been improved so
|
335 |
|
|
that users can specify the charset parameter. Second, [RFC2130]
|
336 |
|
|
specifies that the recommended specification scheme is the
|
337 |
|
|
"charset" parameter.
|
338 |
|
|
>On the other hand, it has been argued that the charset parameter
|
339 |
|
|
should be omitted and the mechanism described in Appendix F of
|
340 |
|
|
[XML] (which is non-normative) should be solely relied on. This
|
341 |
|
|
approach would allow users to avoid configuration of the charset
|
342 |
|
|
parameter; an XML document stored in a file is likely to contain a
|
343 |
|
|
correct encoding declaration or BOM (if necessary), since the
|
344 |
|
|
operating system does not typically provide charset information
|
345 |
|
|
for files. If users would like to rely on the encoding
|
346 |
|
|
declaration or BOM and to hide charset information from protocols,
|
347 |
|
|
they may determine not to use the parameter.
|
348 |
|
|
]INS]
|
349 |
|
|
>Since the charset parameter is authoritative, the charset is not
|
350 |
|
|
always declared within an XML encoding declaration. Thus, special
|
351 |
|
|
care is needed when the recipient strips the MIME header and
|
352 |
|
|
provides persistent storage of the received XML [INS[MIME]] entity (e.g.,
|
353 |
|
|
in a file system). Unless the charset is UTF-8 or UTF-16, the
|
354 |
|
|
recipient SHOULD also persistently store information about the
|
355 |
|
|
charset, perhaps by embedding a correct XML encoding declaration
|
356 |
|
|
within the XML [INS[MIME]] entity.
|
357 |
|
|
|
358 |
|
|
Encoding considerations: This media type MAY be encoded as
|
359 |
|
|
appropriate for the charset and the capabilities of the underlying
|
360 |
|
|
MIME transport. For 7-bit transports, data in [DEL[both]] [INS[either]] UTF-8 [DEL[and]] [INS[or]]
|
361 |
|
|
UTF-16 [DEL[is]] [INS[MUST be]] encoded in quoted-printable or base64. For 8-bit
|
362 |
|
|
clean transport (e.g., [DEL[ESMTP, 8BITMIME]] [INS[8BITMIME[RFC1652] ESMTP]] or NNTP[INS[[RFC0977] ]]),
|
363 |
|
|
UTF-8 is not encoded, but the UTF-16 [DEL[is base64]] [INS[family MUST be]] encoded [INS[in base64]]. For binary clean transport[INS[s]] (e.g., HTTP[INS[[RFC2616] ]]), no
|
364 |
|
|
content-transfer-encoding is necessary.
|
365 |
|
|
|
366 |
|
|
Security considerations: [DEL[See section 4 below.]] [INS[See Section 10.]]
|
367 |
|
|
|
368 |
|
|
Interoperability considerations: [INS[Same as Section 3.1.]]
|
369 |
|
|
|
370 |
|
|
[DEL[
|
371 |
|
|
>XML has proven to be interoperable for import and export from
|
372 |
|
|
multiple XML authoring tools.
|
373 |
|
|
]DEL]
|
374 |
|
|
: Published specification: [DEL[see [REC-XML] ]] [INS[Same as Section 3.1.]]
|
375 |
|
|
:Applications which use this media type: [INS[Same as Section 3.1.]]
|
376 |
|
|
[DEL[
|
377 |
|
|
>XML is device-, platform-, and vendor-neutral and is supported by
|
378 |
|
|
a wide range of Web user agents and XML authoring tools.
|
379 |
|
|
]DEL]
|
380 |
|
|
:Additional information: Same as Section 3.1.
|
381 |
|
|
|
382 |
|
|
[DEL[
|
383 |
|
|
:Magic number(s): none
|
384 |
|
|
>Although no byte sequences can be counted on to always be present,
|
385 |
|
|
XML entities in ASCII-compatible charsets (including UTF-8) often
|
386 |
|
|
begin with hexadecimal 3C 3F 78 6D 6C ("<?xml"), and those in
|
387 |
|
|
UTF-16 often begin with hexadecimal FE FF 00 3C 00 3F 00 78 00 6D
|
388 |
|
|
or FF FE 3C 00 3F 00 78 00 6D 00 (the Byte Order Mark (BOM)
|
389 |
|
|
followed by "<?xml"). For more information, see Annex F of [REC-XML].
|
390 |
|
|
:File extension(s): .xml, .dtd
|
391 |
|
|
|
392 |
|
|
]DEL]
|
393 |
|
|
|
394 |
|
|
:Person and email address for further information: [INS[Same as Section 3.1.]]
|
395 |
|
|
[DEL[
|
396 |
|
|
- Dan Connolly <connolly@w3.org>
|
397 |
|
|
- Murata Makoto (Family Given) <murata@fxis.fujixerox.co.jp>
|
398 |
|
|
]DEL]
|
399 |
|
|
:Intended usage: COMMON
|
400 |
|
|
:Author/Change controller: [INS[Same as Section 3.1.]]
|
401 |
|
|
[DEL[
|
402 |
|
|
>The XML specification is a work product of the World Wide Web
|
403 |
|
|
Consortium's XML Working Group, and was edited by:
|
404 |
|
|
]DEL]
|
405 |
|
|
[INS[
|
406 |
|
|
**3.3 Text/xml-external-parsed-entity Registration
|
407 |
|
|
:MIME media type name: text
|
408 |
|
|
:MIME subtype name: xml-external-parsed-entity
|
409 |
|
|
:Mandatory parameters: none
|
410 |
|
|
:Optional parameters: charset
|
411 |
|
|
|
412 |
|
|
The charset parameter of text/xml-external-parsed-entity is
|
413 |
|
|
handled the same as that of text/xml as described in Section 3.1.
|
414 |
|
|
|
415 |
|
|
:Encoding considerations: Same as Section 3.1.
|
416 |
|
|
:Security considerations: See Section 10.
|
417 |
|
|
|
418 |
|
|
Interoperability considerations: XML external parsed entities are as
|
419 |
|
|
interoperable as XML documents, though they have a less tightly
|
420 |
|
|
constrained structure and therefore need to be referenced by XML
|
421 |
|
|
documents for proper handling by XML processors. Similarly, XML
|
422 |
|
|
documents cannot be reliably used as external parsed entities
|
423 |
|
|
because external parsed entities are prohibited from having
|
424 |
|
|
standalone document declarations or DTDs. Identifying XML
|
425 |
|
|
external parsed entities with their own content type should
|
426 |
|
|
enhance interoperability of both XML documents and XML external
|
427 |
|
|
parsed entities.
|
428 |
|
|
|
429 |
|
|
:Published specification: Same as Section 3.1.
|
430 |
|
|
:Applications which use this media type: Same as Section 3.1.
|
431 |
|
|
:Additional information:
|
432 |
|
|
|
433 |
|
|
Magic number(s): Same as Section 3.1.
|
434 |
|
|
|
435 |
|
|
File extension(s): .xml or .ent
|
436 |
|
|
|
437 |
|
|
Macintosh File Type Code(s): "TEXT"
|
438 |
|
|
|
439 |
|
|
:Person and email address for further information: Same as Section 3.1.
|
440 |
|
|
:Intended usage: COMMON
|
441 |
|
|
:Author/Change controller: Same as Section 3.1.
|
442 |
|
|
|
443 |
|
|
**3.4 Application/xml-external-parsed-entity Registration
|
444 |
|
|
:MIME media type name: application
|
445 |
|
|
:MIME subtype name: xml-external-parsed-entity
|
446 |
|
|
:Mandatory parameters: none
|
447 |
|
|
:Optional parameters: charset
|
448 |
|
|
|
449 |
|
|
The charset parameter of application/xml-external-parsed-entity is
|
450 |
|
|
handled the same as that of application/xml as described in
|
451 |
|
|
Section 3.2.
|
452 |
|
|
|
453 |
|
|
:Encoding considerations: Same as Section 3.2.
|
454 |
|
|
:Security considerations: See Section 10.
|
455 |
|
|
:Interoperability considerations: Same as those for text/xml-external-parsed-entity as described in Section 3.3.
|
456 |
|
|
:Published specification: Same as text/xml as described in Section 3.1.
|
457 |
|
|
:Applications which use this media type: Same as Section 3.1.
|
458 |
|
|
:Additional information:
|
459 |
|
|
|
460 |
|
|
Magic number(s): Same as Section 3.1.
|
461 |
|
|
|
462 |
|
|
File extension(s): .xml or .ent
|
463 |
|
|
|
464 |
|
|
Macintosh File Type Code(s): "TEXT"
|
465 |
|
|
|
466 |
|
|
:Person and email address for further information: Same as Section 3.1.
|
467 |
|
|
:Intended usage: COMMON
|
468 |
|
|
:Author/Change controller: Same as Section 3.1.
|
469 |
|
|
|
470 |
|
|
**3.5 Application/xml-dtd Registration
|
471 |
|
|
:MIME media type name: application
|
472 |
|
|
:MIME subtype name: xml-dtd
|
473 |
|
|
:Mandatory parameters: none
|
474 |
|
|
:Optional parameters: charset
|
475 |
|
|
|
476 |
|
|
The charset parameter of application/xml-dtd is handled the same
|
477 |
|
|
as that of application/xml as described in Section 3.2.
|
478 |
|
|
|
479 |
|
|
:Encoding considerations: Same as Section 3.2.
|
480 |
|
|
:Security considerations: See Section 10.
|
481 |
|
|
|
482 |
|
|
Interoperability considerations: XML DTDs have proven to be
|
483 |
|
|
interoperable by DTD authoring tools and XML browsers, among
|
484 |
|
|
others.
|
485 |
|
|
|
486 |
|
|
:Published specification: Same as text/xml as described in Section 3.1.
|
487 |
|
|
|
488 |
|
|
Applications which use this media type: DTD authoring tools handle
|
489 |
|
|
external DTD subsets as well as external parameter entities. XML
|
490 |
|
|
browsers may also access external DTD subsets and external
|
491 |
|
|
parameter entities.
|
492 |
|
|
|
493 |
|
|
:Additional information:
|
494 |
|
|
|
495 |
|
|
Magic number(s): Same as Section 3.1.
|
496 |
|
|
|
497 |
|
|
File extension(s): .dtd or .mod
|
498 |
|
|
|
499 |
|
|
Macintosh File Type Code(s): "TEXT"
|
500 |
|
|
|
501 |
|
|
:Person and email address for further information: Same as Section 3.1.
|
502 |
|
|
:Intended usage: COMMON
|
503 |
|
|
:Author/Change controller: Same as Section 3.1.
|
504 |
|
|
|
505 |
|
|
**3.6 Summary
|
506 |
|
|
>The following list applies to text/xml, text/xml-external-parsed-
|
507 |
|
|
entity, and XML-based media types under the top-level type "text"
|
508 |
|
|
that define the charset parameter according to this specification:
|
509 |
|
|
|
510 |
|
|
o Charset parameter is strongly recommended.
|
511 |
|
|
|
512 |
|
|
o If the charset parameter is not specified, the default is "us-
|
513 |
|
|
ascii". The default of "iso-8859-1" in HTTP is explicitly
|
514 |
|
|
overridden.
|
515 |
|
|
|
516 |
|
|
o No error handling provisions.
|
517 |
|
|
|
518 |
|
|
o An encoding declaration, if present, is irrelevant, but when
|
519 |
|
|
saving a received resource as a file, the correct encoding
|
520 |
|
|
declaration SHOULD be inserted.
|
521 |
|
|
|
522 |
|
|
>The next list applies to application/xml, application/xml-external-
|
523 |
|
|
parsed-entity, application/xml-dtd, and XML-based media types under
|
524 |
|
|
top-level types other than "text" that define the charset parameter
|
525 |
|
|
according to this specification:
|
526 |
|
|
|
527 |
|
|
- Charset parameter is strongly recommended, and if present, it
|
528 |
|
|
takes precedence.
|
529 |
|
|
- If the charset parameter is omitted, conforming XML processors
|
530 |
|
|
MUST follow the requirements in section 4.3.3 of [XML].
|
531 |
|
|
]INS]
|
532 |
|
|
*License
|
533 |
|
|
[[RFCのライセンス]]
|
534 |
|
|
* メモ
|
535 |
|
|
- [[..//]] 参照。
|