draft-ietf-appsawg-xml-mediatypes-10.txt   rfc7303.txt 
Network Working Group H. Thompson Internet Engineering Task Force (IETF) H. Thompson
Internet-Draft University of Edinburgh Request for Comments: 7303 University of Edinburgh
Obsoletes: 3023 (if approved) C. Lilley Obsoletes: 3023 C. Lilley
Updates: 6839 (if approved) W3C Updates: 6839 W3C
Intended status: Standards Track April 07, 2014 Category: Standards Track July 2014
Expires: October 9, 2014 ISSN: 2070-1721
XML Media Types XML Media Types
draft-ietf-appsawg-xml-mediatypes-10
Abstract Abstract
This specification standardizes three media types -- application/xml, This specification standardizes three media types -- application/xml,
application/xml-external-parsed-entity, and application/xml-dtd -- application/xml-external-parsed-entity, and application/xml-dtd --
for use in exchanging network entities that are related to the for use in exchanging network entities that are related to the
Extensible Markup Language (XML) while defining text/xml and text/ Extensible Markup Language (XML) while defining text/xml and text/
xml-external-parsed-entity as aliases for the respective application/ xml-external-parsed-entity as aliases for the respective application/
types. This specification also standardizes the '+xml' suffix for types. This specification also standardizes the '+xml' suffix for
naming media types outside of these five types when those media types naming media types outside of these five types when those media types
represent XML MIME entities. represent XML MIME entities.
Status of This Memo Status of This Memo
This Internet-Draft is submitted in full conformance with the This is an Internet Standards Track document.
provisions of BCP 78 and BCP 79.
Internet-Drafts are working documents of the Internet Engineering
Task Force (IETF). Note that other groups may also distribute
working documents as Internet-Drafts. The list of current Internet-
Drafts is at http://datatracker.ietf.org/drafts/current/.
Internet-Drafts are draft documents valid for a maximum of six months This document is a product of the Internet Engineering Task Force
and may be updated, replaced, or obsoleted by other documents at any (IETF). It represents the consensus of the IETF community. It has
time. It is inappropriate to use Internet-Drafts as reference received public review and has been approved for publication by the
material or to cite them other than as "work in progress." Internet Engineering Steering Group (IESG). Further information on
Internet Standards is available in Section 2 of RFC 5741.
This Internet-Draft will expire on October 9, 2014. Information about the current status of this document, any errata,
and how to provide feedback on it may be obtained at
http://www.rfc-editor.org/info/rfc7303.
Copyright Notice Copyright Notice
Copyright (c) 2014 IETF Trust and the persons identified as the Copyright (c) 2014 IETF Trust and the persons identified as the
document authors. All rights reserved. document authors. All rights reserved.
This document is subject to BCP 78 and the IETF Trust's Legal This document is subject to BCP 78 and the IETF Trust's Legal
Provisions Relating to IETF Documents Provisions Relating to IETF Documents
(http://trustee.ietf.org/license-info) in effect on the date of (http://trustee.ietf.org/license-info) in effect on the date of
publication of this document. Please review these documents publication of this document. Please review these documents
skipping to change at page 2, line 24 skipping to change at page 2, line 34
modifications of such material outside the IETF Standards Process. modifications of such material outside the IETF Standards Process.
Without obtaining an adequate license from the person(s) controlling Without obtaining an adequate license from the person(s) controlling
the copyright in such materials, this document may not be modified the copyright in such materials, this document may not be modified
outside the IETF Standards Process, and derivative works of it may outside the IETF Standards Process, and derivative works of it may
not be created outside the IETF Standards Process, except to format not be created outside the IETF Standards Process, except to format
it for publication as an RFC or to translate it into languages other it for publication as an RFC or to translate it into languages other
than English. than English.
Table of Contents Table of Contents
1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 3 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 4
2. Notational Conventions . . . . . . . . . . . . . . . . . . . 4 2. Notational Conventions . . . . . . . . . . . . . . . . . . . 4
2.1. Conformance Keywords . . . . . . . . . . . . . . . . . . 4 2.1. Requirements Language . . . . . . . . . . . . . . . . . . 4
2.2. Characters, Encodings, Charsets . . . . . . . . . . . . . 4 2.2. Characters, Encodings, Charsets . . . . . . . . . . . . . 4
2.3. MIME Entities, XML Entities . . . . . . . . . . . . . . . 4 2.3. MIME Entities, XML Entities . . . . . . . . . . . . . . . 5
3. Encoding Considerations . . . . . . . . . . . . . . . . . . . 5 3. Encoding Considerations . . . . . . . . . . . . . . . . . . . 6
3.1. XML MIME producers . . . . . . . . . . . . . . . . . . . 6 3.1. XML MIME Producers . . . . . . . . . . . . . . . . . . . 6
3.2. XML MIME consumers . . . . . . . . . . . . . . . . . . . 6 3.2. XML MIME Consumers . . . . . . . . . . . . . . . . . . . 7
3.3. The Byte Order Mark (BOM) and Encoding Conversions . . . 7 3.3. The BOM and Encoding Conversions . . . . . . . . . . . . 8
4. XML Media Types . . . . . . . . . . . . . . . . . . . . . . . 8 4. XML Media Types . . . . . . . . . . . . . . . . . . . . . . . 9
4.1. XML MIME Entities . . . . . . . . . . . . . . . . . . . . 9 4.1. XML MIME Entities . . . . . . . . . . . . . . . . . . . . 9
4.2. Using '+xml' when Registering XML-based Media Types . . . 10 4.2. Using '+xml' when Registering XML-Based Media Types . . . 11
4.3. Registration Guidelines for XML-based Media Types Not 4.3. Registration Guidelines for XML-Based Media Types Not
Using '+xml' . . . . . . . . . . . . . . . . . . . . . . 12 Using '+xml' . . . . . . . . . . . . . . . . . . . . . 12
5. Fragment Identifiers . . . . . . . . . . . . . . . . . . . . 12 5. Fragment Identifiers . . . . . . . . . . . . . . . . . . . . 13
6. The Base URI . . . . . . . . . . . . . . . . . . . . . . . . 13 6. The Base URI . . . . . . . . . . . . . . . . . . . . . . . . 14
7. XML Versions . . . . . . . . . . . . . . . . . . . . . . . . 13 7. XML Versions . . . . . . . . . . . . . . . . . . . . . . . . 14
8. Examples . . . . . . . . . . . . . . . . . . . . . . . . . . 14 8. Examples . . . . . . . . . . . . . . . . . . . . . . . . . . 14
8.1. UTF-8 Charset . . . . . . . . . . . . . . . . . . . . . . 14 8.1. UTF-8 Charset . . . . . . . . . . . . . . . . . . . . . . 15
8.2. UTF-16 Charset . . . . . . . . . . . . . . . . . . . . . 15 8.2. UTF-16 Charset . . . . . . . . . . . . . . . . . . . . . 16
8.3. Omitted Charset and 8-bit MIME Entity . . . . . . . . . . 15 8.3. Omitted Charset and 8-Bit MIME Entity . . . . . . . . . . 16
8.4. Omitted Charset and 16-bit MIME Entity . . . . . . . . . 16 8.4. Omitted Charset and 16-Bit MIME Entity . . . . . . . . . 16
8.5. Omitted Charset, no Internal Encoding Declaration . . . . 16 8.5. Omitted Charset, No Internal Encoding Declaration . . . . 17
8.6. UTF-16BE Charset . . . . . . . . . . . . . . . . . . . . 17 8.6. UTF-16BE Charset . . . . . . . . . . . . . . . . . . . . 17
8.7. Non-UTF Charset . . . . . . . . . . . . . . . . . . . . . 17 8.7. Non-UTF Charset . . . . . . . . . . . . . . . . . . . . . 18
8.8. INCONSISTENT EXAMPLE: Conflicting Charset and Internal 8.8. INCONSISTENT EXAMPLE: Conflicting Charset and Internal
Encoding Declaration . . . . . . . . . . . . . . . . . . 17 Encoding Declaration . . . . . . . . . . . . . . . . . . 18
8.9. INCONSISTENT EXAMPLE: Conflicting Charset and BOM . . . . 18 8.9. INCONSISTENT EXAMPLE: Conflicting Charset and BOM . . . . 18
9. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 19
9. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 18 9.1. application/xml Registration . . . . . . . . . . . . . . 19
9.1. Application/xml Registration . . . . . . . . . . . . . . 18 9.2. text/xml Registration . . . . . . . . . . . . . . . . . . 21
9.2. Text/xml Registration . . . . . . . . . . . . . . . . . . 20 9.3. application/xml-external-parsed-entity Registration . . . 21
9.3. Application/xml-external-parsed-entity Registration . . . 20 9.4. text/xml-external-parsed-entity Registration . . . . . . 22
9.4. Text/xml-external-parsed-entity Registration . . . . . . 21 9.5. application/xml-dtd Registration . . . . . . . . . . . . 22
9.5. Application/xml-dtd Registration . . . . . . . . . . . . 21 9.6. The '+xml' Naming Convention for XML-Based Media Types . 23
9.6. The '+xml' Naming Convention for XML-Based Media Types . 22 9.6.1. The '+xml' Structured Syntax Suffix Registration . . 23
9.6.1. +xml Structured Syntax Suffix Registration . . . . . 22 10. Security Considerations . . . . . . . . . . . . . . . . . . . 25
10. Security Considerations . . . . . . . . . . . . . . . . . . . 24 11. References . . . . . . . . . . . . . . . . . . . . . . . . . 27
11. References . . . . . . . . . . . . . . . . . . . . . . . . . 25 11.1. Normative References . . . . . . . . . . . . . . . . . . 27
11.1. Normative References . . . . . . . . . . . . . . . . . . 26 11.2. Informative References . . . . . . . . . . . . . . . . . 29
11.2. Informative References . . . . . . . . . . . . . . . . . 28 Appendix A. Why Use the '+xml' Suffix for XML-Based MIME Types? 32
Appendix A. Why Use the '+xml' Suffix for XML-Based MIME Types? 30 Appendix B. Core XML Specifications . . . . . . . . . . . . . . 32
Appendix B. Core XML specifications . . . . . . . . . . . . . . 30 Appendix C. Operational Considerations . . . . . . . . . . . . . 32
Appendix C. Operational considerations . . . . . . . . . . . . . 31 C.1. General Considerations . . . . . . . . . . . . . . . . . 33
C.1. General considerations . . . . . . . . . . . . . . . . . 31 C.2. Considerations for Producers . . . . . . . . . . . . . . 33
C.2. Considerations for producers . . . . . . . . . . . . . . 31 C.3. Considerations for Consumers . . . . . . . . . . . . . . 34
C.3. Considerations for consumers . . . . . . . . . . . . . . 32 Appendix D. Changes from RFC 3023 . . . . . . . . . . . . . . . 34
Appendix D. Changes from RFC 3023 . . . . . . . . . . . . . . . 32 Appendix E. Acknowledgements . . . . . . . . . . . . . . . . . . 35
Appendix E. Acknowledgements . . . . . . . . . . . . . . . . . . 33
Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 33
1. Introduction 1. Introduction
The World Wide Web Consortium has issued the Extensible Markup The World Wide Web Consortium has issued the Extensible Markup
Language (XML) 1.0 [XML] and Extensible Markup Language (XML) 1.1 Language (XML) 1.0 [XML] and Extensible Markup Language (XML) 1.1
[XML1.1] specifications. To enable the exchange of XML network [XML1.1] specifications. To enable the exchange of XML network
entities, this specification standardizes three media types -- entities, this specification standardizes three media types
application/xml, application/xml-external-parsed-entity, and (application/xml, application/xml-external-parsed-entity, and
application/xml-dtd and two aliases -- text/xml and text/xml- application/xml-dtd), two aliases (text/xml and text/xml-external-
external-parsed-entity, as well as a naming convention for parsed-entity), and a naming convention for identifying XML-based
identifying XML-based MIME media types (using '+xml'). MIME media types (using '+xml').
XML has been used as a foundation for other media types, including XML has been used as a foundation for other media types, including
types in every branch of the IETF media types tree. To facilitate types in every branch of the IETF media types tree. To facilitate
the processing of such types, and in line with the recognition in the processing of such types, and in line with the recognition in
[RFC6838] of structured syntax name suffixes, a suffix of '+xml' is [RFC6838] of structured syntax name suffixes, a suffix of '+xml' is
registered in Section 9.6. This will allow generic XML-based tools registered in Section 9.6. This will allow generic XML-based tools
-- browsers, editors, search engines, and other processors -- to work -- browsers, editors, search engines, and other processors -- to work
with all XML-based media types. with all XML-based media types.
This specification replaces [RFC3023]. Major differences are in the This specification replaces [RFC3023]. Major differences are in the
areas of alignment of text/xml and text/xml-external-parsed-entity areas of alignment of text/xml and text/xml-external-parsed-entity
with application/xml and application/xml-external-parsed-entity with application/xml and application/xml-external-parsed-entity
respectively, the addition of XPointer and XML Base as fragment respectively, the addition of XPointer and XML Base as fragment
identifiers and base URIs, respectively, integration of the XPointer identifiers and base URIs, respectively, integration of the XPointer
Registry and updating of many references. Registry and updating of many references.
2. Notational Conventions 2. Notational Conventions
2.1. Conformance Keywords 2.1. Requirements Language
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
"SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and
"OPTIONAL" in this specification are to be interpreted as described "OPTIONAL" in this specification are to be interpreted as described
in [RFC2119]. in [RFC2119].
2.2. Characters, Encodings, Charsets 2.2. Characters, Encodings, Charsets
Both XML (in an XML or Text declaration using the encoding pseudo- Both XML (in an XML or Text declaration using the encoding pseudo-
attribute) and MIME (in a Content-Type header field using the charset attribute) and MIME (in a Content-Type header field using the charset
parameter) use a common set of labels [IANA-charsets] to identify the parameter) use a common set of labels [IANA-CHARSETS] to identify the
MIME charset (mapping from byte stream to character sequence MIME charset (mapping from byte stream to character sequence
[RFC2978]). [RFC2978]).
In this specification we will use the phrases "charset parameter" and In this specification, we will use the phrases "charset parameter"
"encoding declaration" to refer to whatever MIME charset is specified and "encoding declaration" to refer to whatever MIME charset is
by a MIME charset parameter or XML encoding declaration respectively. specified by a MIME charset parameter or XML encoding declaration,
We reserve the phrase "character encoding" (or, when the context respectively. We reserve the phrase "character encoding" (or, when
makes the intention clear, simply "encoding") for the MIME charset the context makes the intention clear, simply "encoding") for the
actually used in a particular XML MIME entity. MIME charset actually used in a particular XML MIME entity.
[UNICODE] defines three "encoding forms", namely UTF-8, UTF-16, and [UNICODE] defines three "encoding forms", namely UTF-8, UTF-16, and
UTF-32. As UTF-8 can only be serialized in one way, the only UTF-32. As UTF-8 can only be serialized in one way, the only
possible label for UTF-8-encoded documents when serialised into MIME possible label for UTF-8-encoded documents when serialised into MIME
entities is "utf-8". UTF-16 XML documents, however, can be entities is "utf-8". UTF-16 XML documents, however, can be
serialised into MIME entities in one of two ways: either big- endian, serialised into MIME entities in one of two ways: either big-endian,
labelled (optionally) "utf-16" or "utf-16be", or little- endian, labelled (optionally) "utf-16" or "utf-16be", or little-endian,
labelled (optionally) "utf-16" or "utf-16le". See Section 3.3 below labelled (optionally) "utf-16" or "utf-16le". See Section 3.3 below
for how a Byte Order Mark (BOM) is required when the "utf-16" for how a Byte Order Mark (BOM) is required when the "utf-16"
serialization is used. serialization is used.
UTF-32 has four potential serializations, of which only two (UTF-32BE UTF-32 has four potential serializations, of which only two (UTF-32BE
and UTF-32LE) are given names in [UNICODE]. Support for the various and UTF-32LE) are given names in [UNICODE]. Support for the various
serializations varies widely, and security concerns about their use serializations varies widely, and security concerns about their use
have been raised (see for example [Sivonen]). The use of UTF-32 is have been raised (for example, see [Sivonen]). The use of UTF-32 is
NOT RECOMMENDED for XML MIME entities. NOT RECOMMENDED for XML MIME entities.
2.3. MIME Entities, XML Entities 2.3. MIME Entities, XML Entities
As sometimes happens between two communities, both MIME and XML have As sometimes happens between two communities, both MIME and XML have
defined the term entity, with different meanings. Section 2.4 of defined the term entity, with different meanings. Section 2.4 of
[RFC2045] says: [RFC2045] says:
"The term 'entity' refers specifically to the MIME-defined header The term "entity", refers specifically to the MIME-defined header
fields and contents of either a message or one of the parts in the fields and contents of either a message or one of the parts in the
body of a multipart entity." body of a multipart entity.
Section 4 of [XML] says: Section 4 of [XML] says:
"An XML document may consist of one or many storage units. These An XML document may consist of one or many storage units. These
are called entities; they all have content and are all (except for are called entities; they all have content and are all (except for
the document entity and the external DTD subset) identified by the document entity and the external DTD subset) identified by
entity name". entity name.
In this specification, "XML MIME entity" is defined as the latter (an In this specification, "XML MIME entity" is defined as the latter (an
XML entity) encapsulated in the former (a MIME entity). XML entity) encapsulated in the former (a MIME entity).
Furthermore, XML provides for the naming and referencing of entities Furthermore, XML provides for the naming and referencing of entities
for purposes of inclusion and/or substitution. In this specification for purposes of inclusion and/or substitution. In this
"XML-entity declaration/reference/..." is used to avoid confusion specification, "XML-entity declaration/reference/..." is used to
when referring to such cases. avoid confusion when referring to such cases.
3. Encoding Considerations 3. Encoding Considerations
The registrations below all address issues around character encoding The registrations below all address issues around character encoding
in the same way, by referencing this section. in the same way, by referencing this section.
As many as three distinct sources of information about character As many as three distinct sources of information about character
encoding may be present for an XML MIME entity: a charset parameter, encoding may be present for an XML MIME entity: a charset parameter,
a Byte Order Mark (BOM -- see Section 3.3 below) and an XML encoding a BOM (see Section 3.3 below), and an XML encoding declaration (see
declaration (see Section 4.3.3 of [XML]). Ensuring consistency among Section 4.3.3 of [XML]). Ensuring consistency among these sources
these sources requires coordination between entity authors and MIME requires coordination between entity authors and MIME agents (that
agents (that is, processes which package, transfer, deliver and/or is, processes that package, transfer, deliver, and/or receive MIME
receive MIME entities). entities).
The use of UTF-8, without a BOM, is RECOMMENDED for all XML MIME The use of UTF-8, without a BOM, is RECOMMENDED for all XML MIME
entities. entities.
Some MIME agents will be what we will call "XML-aware", that is, Some MIME agents will be what we will call "XML-aware", that is,
capable of processing XML MIME entities as XML and detecting the XML capable of processing XML MIME entities as XML and detecting the XML
encoding declaration (or its absence). All three sources of encoding declaration (or its absence). All three sources of
information about encoding are available to them, and they can be information about encoding are available to them, and they can be
expected to be aware of this spec. expected to be aware of this specification.
Other MIME agents will not be XML-aware, and thus cannot know Other MIME agents will not be XML-aware; thus, they cannot know
anything about the XML encoding declaration. Not only do they lack anything about the XML encoding declaration. Not only do they lack
one of the three sources of information about encoding, they are also one of the three sources of information about encoding, they are also
less likely to be aware of or responsive to this spec. less likely to be aware of or responsive to this specification.
Some MIME agents, such as proxies and transcoders, both consume and Some MIME agents, such as proxies and transcoders, both consume and
produce MIME entities. produce MIME entities.
This mixture of two kinds of agents handling XML MIME entities This mixture of two kinds of agents handling XML MIME entities
increases the complexity of the coordination task. The increases the complexity of the coordination task. The
recommendations given below are intended to maximise interoperability recommendations given below are intended to maximise interoperability
in the face of this, by on the one hand mandating consistent in the face of this: on the one hand, by mandating consistent
production and encouraging maximally robust forms of production, and production and encouraging maximally robust forms of production and,
on the other specifying recovery strategies to maximize the on the other, by specifying recovery strategies to maximize the
interoperability of consumers when the production rules are broken. interoperability of consumers when the production rules are broken.
3.1. XML MIME producers 3.1. XML MIME Producers
XML-aware MIME producers SHOULD supply a charset parameter and/or an XML-aware MIME producers SHOULD supply a charset parameter and/or an
appropriate BOM with non-UTF-8-encoded XML MIME entities which lack appropriate BOM with non-UTF-8-encoded XML MIME entities that lack an
an encoding declaration. Such producers SHOULD remove or correct an encoding declaration. Such producers SHOULD remove or correct an
encoding declaration which is known to be incorrect (for example, as encoding declaration that is known to be incorrect (for example, as a
a result of transcoding). result of transcoding).
XML-aware MIME producers MUST supply an XML text declaration at the XML-aware MIME producers MUST supply an XML text declaration at the
beginning of non-UNICODE XML external parsed entities which would beginning of non-UNICODE XML external parsed entities that would
otherwise begin with the hexadecimal octet sequences 0xFE 0xFF, 0xFF otherwise begin with the hexadecimal octet sequences 0xFE 0xFF, 0xFF
0xFE or 0xEF 0xBB 0xBF, in order to avoid the mistaken detection of a 0xFE or 0xEF 0xBB 0xBF, in order to avoid the mistaken detection of a
BOM. BOM.
XML-unaware MIME producers MUST NOT supply a charset parameter with XML-unaware MIME producers MUST NOT supply a charset parameter with
an XML MIME entity unless the entity's character encoding is reliably an XML MIME entity unless the entity's character encoding is reliably
known. Note that this is particularly relevant for central known. Note that this is particularly relevant for central
configuration of web servers, where configuring a default for the configuration of web servers, where configuring a default for the
charset parameter will almost certainly violate this requirement. charset parameter will almost certainly violate this requirement.
XML MIME producers are RECOMMENDED to provide means for users to XML MIME producers are RECOMMENDED to provide means for users to
control what value, if any, is given to charset parameters for XML control what value, if any, is given to charset parameters for XML
MIME entities, for example by giving users control of the MIME entities, for example, by giving users control of the
configuration of Web server filename-to-Content-Type-header mappings configuration of Web server filename-to-Content-Type-header mappings
on a file-by-file or suffix basis. on a file-by-file or suffix basis.
3.2. XML MIME consumers 3.2. XML MIME Consumers
For XML MIME consumers, the question of priority arises in cases when For XML MIME consumers, the question of priority arises in cases when
the available character encoding information is not consistent. the available character encoding information is not consistent.
Again, we must distinguish betweeen XML-aware and XML-unaware agents. Again, we must distinguish between XML-aware and XML-unaware agents.
When a charset parameter is specified for an XML MIME entity, the When a charset parameter is specified for an XML MIME entity, the
normative component of the [XML] specification leaves the question normative component of the [XML] specification leaves the question
open as to how to determine the encoding with which to attempt to open as to how to determine the encoding with which to attempt to
process the entity. This is true independently of whether or not the process the entity. This is true independently of whether or not the
entity contains in-band encoding information, that is, either a BOM entity contains in-band encoding information, that is, either a BOM
(Section 3.3) or an XML encoding declaration, or both, or neither. (Section 3.3) or an XML encoding declaration, both, or neither. In
In particular, in the case where there is in-band information and it particular, in the case where there is in-band information and it
conflicts with the charset parameter, the [XML] specification does conflicts with the charset parameter, the [XML] specification does
not specify which is authoritative. In its (non-normative) not specify which is authoritative. In its (non-normative)
Appendix F it defers to this specification: Appendix F, it defers to this specification:
[T]he preferred method of handling conflict should be specified as [T]he preferred method of handling conflict should be specified as
part of the higher-level protocol used to deliver XML. In part of the higher-level protocol used to deliver XML. In
particular, please refer to [IETF RFC 3023] or its successor... particular, please refer to [IETF RFC 3023] or its successor...
Accordingly, to conform with deployed processors and content and to Accordingly, to conform with deployed processors and content and to
avoid conflicting with this or other normative specifications, this avoid conflicting with this or other normative specifications, this
specification sets the priority as follows: specification sets the priority as follows:
A BOM (Section 3.3) is authoritative if it is present in an XML A BOM (Section 3.3) is authoritative if it is present in an XML
MIME entity; MIME entity;
In the absence of a BOM (Section 3.3), the charset parameter is In the absence of a BOM (Section 3.3), the charset parameter is
authoritative if it is present. authoritative if it is present.
Whenever the above determines a source of encoding information as Whenever the above determines a source of encoding information as
authoritative, consumers SHOULD process XML MIME entities based on authoritative, consumers SHOULD process XML MIME entities based on
that information. that information.
When MIME producers conform to the requirements stated above When MIME producers conform to the requirements stated above
(Section 3.1, Section 3) inconsistencies will not arise---the above (Section 3.1, Section 3) inconsistencies will not arise -- the above
statement of priorities only has practical impact in the case of non- statement of priorities only has practical impact in the case of non-
conforming XML MIME entities. In the face of inconsistencies, no conforming XML MIME entities. In the face of inconsistencies, no
uniform strategy can deliver the 'right' answer every time: the uniform strategy can deliver the 'right' answer every time: the
purpose of specifying one here is to encourage convergence over time, purpose of specifying one here is to encourage convergence over time,
first on the part of consumers, then on the part of producers. first on the part of consumers, then on the part of producers.
For XML-aware consumers, note that Section 4.3.3 of [XML] does _not_ For XML-aware consumers, note that Section 4.3.3 of [XML] does _not_
make it an error for the charset parameter and the XML encoding make it an error for the charset parameter and the XML encoding
declaration (or the UTF-8 default in the absence of encoding declaration (or the UTF-8 default in the absence of encoding
declaration and BOM) to be inconsistent, although such consumers declaration and BOM) to be inconsistent, although such consumers
might choose to issue a warning in this case. might choose to issue a warning in this case.
If an XML MIME entity is received where the charset parameter is If an XML MIME entity is received where the charset parameter is
omitted, no information is being provided about the character omitted, no information is being provided about the character
encoding by the MIME Content-Type header. XML-aware consumers MUST encoding by the MIME Content-Type header. XML-aware consumers MUST
follow the requirements in section 4.3.3 of [XML] that directly follow the requirements in section 4.3.3 of [XML] that directly
address this case. XML-unaware MIME consumers SHOULD NOT assume a address this case. XML-unaware MIME consumers SHOULD NOT assume a
default encoding in this case. default encoding in this case.
3.3. The Byte Order Mark (BOM) and Encoding Conversions 3.3. The BOM and Encoding Conversions
Section 4.3.3 of [XML] specifies that UTF-16 XML MIME entities not Section 4.3.3 of [XML] specifies that UTF-16 XML MIME entities not
labelled as "utf-16le" or "utf-16be" MUST begin with a byte order labelled as "utf-16le" or "utf-16be" MUST begin with a BOM, U+FEFF,
mark (BOM), U+FEFF, which appears as the hexadecimal octet sequence which appears as the hexadecimal octet sequence 0xFE 0xFF (big-
0xFE 0xFF (big-endian) or 0xFF 0xFE (little-endian). [XML] further endian) or 0xFF 0xFE (little-endian). [XML] further states that the
states that the BOM is an encoding signature, and is not part of BOM is an encoding signature and is not part of either the markup or
either the markup or the character data of the XML document. the character data of the XML document.
Due to the presence of the BOM, applications that convert XML from Due to the presence of the BOM, applications that convert XML from
UTF-16 to an encoding other than UTF-8 MUST strip the BOM before UTF-16 to an encoding other than UTF-8 MUST strip the BOM before
conversion. Similarly, when converting from another encoding into conversion. Similarly, when converting from another encoding into
UTF-16, either without a charset parameter, or labelled "utf-16", the UTF-16, either without a charset parameter or labelled "utf-16", the
BOM MUST be added unless the original encoding was UTF-8 and a BOM BOM MUST be added unless the original encoding was UTF-8 and a BOM
was already present, in which case it MUST be transcoded into the was already present, in which case it MUST be transcoded into the
appropriate UTF-16 BOM. appropriate UTF-16 BOM.
Section 4.3.3 of [XML] also allows for UTF-8 XML MIME entities to Section 4.3.3 of [XML] also allows for UTF-8 XML MIME entities to
begin with a BOM, which appears as the hexadecimal octet sequence begin with a BOM, which appears as the hexadecimal octet sequence
0xEF 0xBB 0xBF. This is likewise defined to be an encoding 0xEF 0xBB 0xBF. This is likewise defined to be an encoding
signature, and not part of either the markup or the character data of signature, and not part of either the markup or the character data of
the XML document. the XML document.
Applications that convert XML from UTF-8 to an encoding other than Applications that convert XML from UTF-8 to an encoding other than
UTF-16 MUST strip the BOM, if present, before conversion. UTF-16 MUST strip the BOM, if present, before conversion.
Applications which convert XML into UTF-8 MAY add a BOM. Applications that convert XML into UTF-8 MAY add a BOM.
In addition to the MIME charset "utf-16", [RFC2781] introduces "utf- In addition to the MIME charset "utf-16", [RFC2781] introduces
16le" (little endian) and "utf-16be" (big endian). When an XML MIME "utf-16le" (little-endian) and "utf-16be" (big-endian). When an XML
entity is encoded in "utf-16le" or "utf-16be", it MUST NOT begin with MIME entity is encoded in "utf-16le" or "utf-16be", it MUST NOT begin
the BOM but SHOULD contain an in-band XML encoding declaration. with the BOM but SHOULD contain an in-band XML encoding declaration.
Conversion from UTF-8 or UTF-16 (unlabelled, or labelled with Conversion from UTF-8 or UTF-16 (unlabelled, or labelled with
"utf-16") to "utf-16be" or "utf-16le" MUST strip a BOM if present. "utf-16") to "utf-16be" or "utf-16le" MUST strip a BOM if present.
Conversion from UTF-16 labelled "utf-16le" or "utf-16be" to UTF-16 Conversion from UTF-16 labelled "utf-16le" or "utf-16be" to UTF-16
without a label or labelled "utf-16" MUST add the appropriate BOM. without a label or labelled "utf-16" MUST add the appropriate BOM.
Conversion from UTF-16 labelled "utf-16le" or "utf-16be" to UTF-8 MAY Conversion from UTF-16 labelled "utf-16le" or "utf-16be" to UTF-8 MAY
add a UTF-8 BOM, but this is NOT RECOMMENDED. add a UTF-8 BOM, but this is NOT RECOMMENDED.
Appendix F of [XML] also implies the a UTF-32 BOM may be used in Appendix F of [XML] also implies that a UTF-32 BOM may be used in
conjunction with UTF-32-encoded documents. As noted above, this conjunction with UTF-32-encoded documents. As noted above, this
specification recommends against the use of UTF-32, but if it is specification recommends against the use of UTF-32. If it is used,
used, the same considerations apply with respect to its being a the same considerations as UTF-16 apply with respect to its being a
signature, not part of the document, with respect to transcoding into signature (not part of the document), transcoding into or out of it,
or out of it and with respect to the MIME charsets "utf-32le" and and transcoding into or out of the MIME charsets "utf-32le" and "utf-
"utf-32be", as for UTF-16. Consumers which do not support UTF-32 32be". Consumers that do not support UTF-32 SHOULD nonetheless
SHOULD none-the-less recognise UTF-32 signatures in order to give recognise UTF-32 signatures in order to give helpful error messages
helpful error messages (instead of treating them as invalid UTF-16). (instead of treating them as invalid UTF-16).
4. XML Media Types 4. XML Media Types
4.1. XML MIME Entities 4.1. XML MIME Entities
Within the XML specification, XML MIME entities can be classified Within the XML specification, XML MIME entities can be classified
into four types. In the XML terminology, they are called "document into four types. In the XML terminology, they are called "document
entities", "external DTD subsets", "external parsed entities", and entities", "external DTD subsets", "external parsed entities", and
"external parameter entities". Appropriate usage for the types "external parameter entities". Appropriate usage for the types
registered below is as follows: registered below is as follows:
document entities: The media types application/xml or text/xml, or a document entities: The media types application/xml or text/xml, or a
more specific media type (see Section 9.6), SHOULD be used. more specific media type (see Section 9.6), SHOULD be used.
skipping to change at page 9, line 32 skipping to change at page 10, line 12
unless the parsed entities are also well-formed "document unless the parsed entities are also well-formed "document
entities". entities".
external parameter entities: The media type application/xml-dtd external parameter entities: The media type application/xml-dtd
SHOULD be used. The media types application/xml and text/xml MUST SHOULD be used. The media types application/xml and text/xml MUST
NOT be used. NOT be used.
Note that [RFC3023] (which this specification obsoletes) recommended Note that [RFC3023] (which this specification obsoletes) recommended
the use of text/xml and text/xml-external-parsed-entity for document the use of text/xml and text/xml-external-parsed-entity for document
entities and external parsed entities, respectively, but described entities and external parsed entities, respectively, but described
handling of character encoding which differed from common handling of character encoding that differed from common
implementation practice. These media types are still commonly used, implementation practice. These media types are still commonly used,
and this specification aligns the handling of character encoding with and this specification aligns the handling of character encoding with
industry practice. industry practice.
Note that [RFC2376] (which is obsolete) allowed application/xml and Note that [RFC2376] (which is obsolete) allowed application/xml and
text/xml to be used for any of the four types, although in practice text/xml to be used for any of the four types, although in practice
it is likely to have been rare. it is likely to have been rare.
Neither external DTD subsets nor external parameter entities parse as Neither external DTD subsets nor external parameter entities parse as
XML documents, and while some XML document entities may be used as XML documents, and while some XML document entities may be used as
external parsed entities and vice versa, there are many cases where external parsed entities and vice versa, there are many cases where
the two are not interchangeable. XML also has unparsed entities, the two are not interchangeable. XML also has unparsed entities,
internal parsed entities, and internal parameter entities, but they internal parsed entities, and internal parameter entities, but they
are not XML MIME entities. are not XML MIME entities.
Compared to [RFC2376] or [RFC3023], this specification alters the Compared to [RFC2376] or [RFC3023], this specification alters the
handling of character encoding of text/xml and text/xml-external- handling of character encoding of text/xml and text/xml-external-
parsed-entity, treating them no differently from the respective parsed-entity, treating them no differently from the respective
application/ types. However application/xml and application/xml- application/ types. However, application/xml and application/xml-
external-parsed-entity are still RECOMMENDED, to avoid possible external-parsed-entity are still RECOMMENDED, to avoid possible
confusion based on the earlier distinction. The former confusion confusion based on the earlier distinction. The former confusion
around the question of default character sets for the two text/ types around the question of default character sets for the two text/ types
no longer arises because no longer arises because
[HTTPbis] changes [RFC2616] by removing the ISO-8859-1 default and [RFC7231] changes [RFC2616] by removing the ISO-8859-1 default and
not defining any default at all; not defining any default at all;
[RFC6657] updates [RFC2046] to remove the US-ASCII default. [RFC6657] updates [RFC2046] to remove the US-ASCII [ASCII]
default.
See Section 3 for the now-unified approach to the charset parameter See Section 3 for the now-unified approach to the charset parameter
which results. that results.
XML provides a general framework for defining sequences of structured XML provides a general framework for defining sequences of structured
data. It is often appropriate to define new media types that use XML data. It is often appropriate to define new media types that use XML
but define a specific application of XML, due to domain-specific but define a specific application of XML, due to domain-specific
display, editing, security considerations or runtime information. display, editing, security considerations, or runtime information.
Furthermore, such media types may allow only UTF-8 and/or UTF-16 and Furthermore, such media types may allow only UTF-8 and/or UTF-16 and
prohibit other character sets. This specification does not prohibit prohibit other character sets. This specification does not prohibit
such media types and in fact expects them to proliferate. However, such media types; in fact, they are expected to proliferate.
developers of such media types are RECOMMENDED to use this
However, developers of such media types are RECOMMENDED to use this
specification as a basis for their registration. See Section 4.2 for specification as a basis for their registration. See Section 4.2 for
more detailed recommendations on using the '+xml' suffix for more detailed recommendations on using the '+xml' suffix for
registration of such media types. registration of such media types.
An XML document labeled as application/xml or text/xml, or with a An XML document labeled as application/xml or text/xml, or with a
'+xml' media type, might contain namespace declarations, stylesheet- '+xml' media type, might contain namespace declarations, stylesheet-
linking processing instructions (PIs), schema information, or other linking processing instructions (PIs), schema information, or other
declarations that might be used to suggest how the document is to be declarations that might be used to suggest how the document is to be
processed. For example, a document might have the XHTML namespace processed. For example, a document might have the XHTML namespace
and a reference to a CSS stylesheet. Such a document might be and a reference to a Cascading Style Sheets (CSS) stylesheet. Such a
handled by applications that would use this information to dispatch document might be handled by applications that would use this
the document for appropriate processing. Appendix B lists the core information to dispatch the document for appropriate processing.
XML specifications which, taken together with [XML] itself, show how Appendix B lists the core XML specifications that, taken together
to determine an XML document's language-level semantics and suggest with [XML] itself, show how to determine an XML document's language-
how information about its application-level semantics may be level semantics and suggest how information about its application-
locatable. level semantics may be locatable.
4.2. Using '+xml' when Registering XML-based Media Types 4.2. Using '+xml' when Registering XML-Based Media Types
In Section 9.6, this specification updates the [RFC6839] registration In Section 9.6, this specification updates the registration in
for XML-based MIME types (the '+xml' types). [RFC6839] for XML-based MIME types (the '+xml' types).
When a new media type is introduced for an XML-based format, the name When a new media type is introduced for an XML-based format, the name
of the media type SHOULD end with '+xml' unless generic XML of the media type SHOULD end with '+xml' unless generic XML
processing is in some way inappropriate for documents of the new processing is in some way inappropriate for documents of the new
type. This convention will allow applications that can process XML type. This convention will allow applications that can process XML
generically to detect that the MIME entity is supposed to be an XML generically to detect that the MIME entity is supposed to be an XML
document, verify this assumption by invoking some XML processor, and document, verify this assumption by invoking some XML processor, and
then process the XML document accordingly. Applications may check then process the XML document accordingly. Applications may check
for types that represent XML MIME entities by comparing the last four for types that represent XML MIME entities by comparing the last four
characters of the subtype to the string '+xml'. (However note that 4 characters of the subtype to the string '+xml'. (However, note that
of the 5 media types defined in this specification -- text/xml, four of the five media types defined in this specification -- text/
application/xml, text/xml-external-parsed-entity, and application/ xml, application/xml, text/xml-external-parsed-entity, and
xml-external-parsed-entity -- also represent XML MIME entities while application/xml-external-parsed-entity -- also represent XML MIME
not ending with '+xml'.) entities while not ending with '+xml'.)
NOTE: Section 5.3.2 of HTTPbis [HTTPbis] does not support any form NOTE: Section 5.3.2 of [RFC7231] does not support any form of
of Accept header which will match only '+xml' types. In Accept header that will match only '+xml' types. In particular,
particular, Accept headers of the form "Accept: */*+xml" are not Accept headers of the form "Accept: */*+xml" are not allowed, and
allowed, and will not work for this purpose. will not work for this purpose.
Media types following the naming convention '+xml' SHOULD define the Media types following the naming convention '+xml' SHOULD define the
charset parameter for consistency, since XML-generic processing by charset parameter for consistency, since XML-generic processing by
definition treats treats all XML MIME entities uniformly as regards definition treats all XML MIME entities uniformly as regards
character encoding information. However, there are some cases that character encoding information. However, there are some cases that
the charset parameter need not be defined. For example: the charset parameter need not be defined. For example:
When an XML-based media type is restricted to UTF-8, it is not When an XML-based media type is restricted to UTF-8, it is not
necessary to define the charset parameter. UTF-8 is the default necessary to define the charset parameter. UTF-8 is the default
for XML. for XML.
When an XML-based media type is restricted to UTF-8 and UTF-16, it When an XML-based media type is restricted to UTF-8 and UTF-16, it
might not be unreasonable to omit the charset parameter. Neither might not be unreasonable to omit the charset parameter. Neither
UTF-8 nor UTF-16 require XML encoding declarations. UTF-8 nor UTF-16 require XML encoding declarations.
XML generic processing is not always appropriate for XML-based media XML generic processing is not always appropriate for XML-based media
types. For example, authors of some such media types may wish that types. For example, authors of some such media types may wish that
the types remain entirely opaque except to applications that are the types remain entirely opaque except to applications that are
specifically designed to deal with that media type. By NOT following specifically designed to deal with that media type. By NOT following
the naming convention '+xml', such media types can avoid XML-generic the naming convention '+xml', such media types can avoid XML-generic
processing. Since generic processing will be useful in many cases, processing. Since generic processing will be useful in many cases,
however -- including in some situations that are difficult to predict however -- including in some situations that are difficult to predict
ahead of time -- the '+xml' convention is to be preferred unless ahead of time -- the '+xml' convention is to be preferred unless
there is some particularly compelling reason not to. there is some particularly compelling reason not to use it.
The registration process for specific '+xml' media types is described The registration process for specific '+xml' media types is described
in [RFC6838]. New XML-based media type registrations in the IETF in [RFC6838]. New XML-based media type registrations in the IETF
must follow these guidelines. When other organisations register XML- must follow these guidelines. When other organisations register XML-
based media types via the "Specification Required" IANA registration based media types via the "Specification Required" IANA registration
policy, the relevant Media Reviewer should ensure that they use the policy [RFC5226], the relevant Media Reviewer should ensure that they
'+xml' convention, in order to ensure maximum interoperability of use the '+xml' convention, in order to ensure maximum
their XML-based documents. Only media subtypes that represent XML interoperability of their XML-based documents. Only media subtypes
MIME entities are allowed to register with a '+xml' suffix. that represent XML MIME entities are allowed to register with a
'+xml' suffix.
In addition to the changes described above, the change controller has In addition to the changes described above, the change controller has
been changed to be the World Wide Web Consortium (W3C). been changed to be the World Wide Web Consortium (W3C).
4.3. Registration Guidelines for XML-based Media Types Not Using '+xml' 4.3. Registration Guidelines for XML-Based Media Types Not Using '+xml'
Registrations for new XML-based media types which do _not_ use the Registrations for new XML-based media types that do _not_ use the
'+xml' suffix SHOULD, in specifying the charset parameter and '+xml' suffix SHOULD, in specifying the charset parameter and
encoding considerations, define them as: "Same as [charset parameter encoding considerations, define them as: "Same as [charset parameter
/ encoding considerations] of application/xml as specified in RFC / encoding considerations] of application/xml as specified in RFC
XXXX." 7303".
Defining the charset parameter is RECOMMENDED, since this information Defining the charset parameter is RECOMMENDED, since this information
can be used by XML processors to determine authoritatively the can be used by XML processors to determine authoritatively the
character encoding of the XML MIME entity in the absence of a BOM. character encoding of the XML MIME entity in the absence of a BOM.
If there are some reasons not to follow this advice, they SHOULD be If there are some reasons not to follow this advice, they SHOULD be
included as part of the registration. As shown above, two such included as part of the registration. As shown above, two such
reasons are "UTF-8 only" or "UTF-8 or UTF-16 only". reasons are "UTF-8 only" or "UTF-8 or UTF-16 only".
These registrations SHOULD specify that the XML-based media type These registrations SHOULD specify that the XML-based media type
being registered has all of the security considerations described in being registered has all of the security considerations described in
RFC XXXX plus any additional considerations specific to that media this specification plus any additional considerations specific to
type. that media type.
These registrations SHOULD also make reference to RFC XXXX in These registrations SHOULD also make reference to this specification
specifying magic numbers, base URIs, and use of the BOM. in specifying magic numbers, base URIs, and use of the BOM.
These registrations MAY reference the application/xml registration in These registrations MAY reference the application/xml registration in
RFC XXXX in specifying interoperability and fragment identifier this document in specifying interoperability and fragment identifier
considerations, if these considerations are not overridden by issues considerations, if these considerations are not overridden by issues
specific to that media type. specific to that media type.
5. Fragment Identifiers 5. Fragment Identifiers
Uniform Resource Identifiers (URIs) can contain fragment identifiers Uniform Resource Identifiers (URIs) can contain fragment identifiers
(see Section 3.5 of [RFC3986]). Specifying the syntax and semantics (see Section 3.5 of [RFC3986]). Specifying the syntax and semantics
of fragment identifiers is devolved by [RFC3986] to the appropriate of fragment identifiers is devolved by [RFC3986] to the appropriate
media type registration. media type registration.
The syntax and semantics of fragment identifiers for the XML media The syntax and semantics of fragment identifiers for the XML media
types defined in this specification are based on the types defined in this specification are based on the
[XPointerFramework] W3C Recommendation. It allows simple names, and [XPointerFramework] W3C Recommendation. It allows simple names and
more complex constructions based on named schemes. When the syntax more complex constructions based on named schemes. When the syntax
of a fragment identifier part of any URI or IRI ([RFC3987]) with a of a fragment identifier part of any URI or Internationalized
retrieved media type governed by this specification conforms to the Resource Identifier (IRI) ([RFC3987]) with a retrieved media type
syntax specified in [XPointerFramework], conforming applications MUST governed by this specification conforms to the syntax specified in
interpret such fragment identifiers as designating whatever is [XPointerFramework], conforming applications MUST interpret such
specified by the [XPointerFramework] together with any other fragment identifiers as designating whatever is specified by the
specifications governing the XPointer schemes used in those [XPointerFramework] together with any other specifications governing
identifiers which the applications support. Conforming applications the XPointer schemes used in those identifiers that the applications
MUST support the 'element' scheme as defined in [XPointerElement], support. Conforming applications MUST support the 'element' scheme
but need not support other schemes. as defined in [XPointerElement], but need not support other schemes.
If an XPointer error is reported in the attempt to process the part, If an XPointer error is reported in the attempt to process the part,
this specification does not define an interpretation for the part. this specification does not define an interpretation for the part.
A registry of XPointer schemes [XPtrReg] is maintained at the W3C. A registry of XPointer schemes [XPtrReg] is maintained at the W3C.
Generic processors of XML MIME entities SHOULD NOT implement Generic processors of XML MIME entities SHOULD NOT implement
unregistered XPointer schemes ([XPtrRegPolicy] describes requirements unregistered XPointer schemes ([XPtrRegPolicy] describes requirements
and procedures for registering schemes). and procedures for registering schemes).
See Section 4.2 for additional requirements which apply when an XML- See Section 4.2 for additional requirements that apply when an XML-
based media type follows the naming convention '+xml'. based media type follows the naming convention '+xml'.
If [XPointerFramework] and [XPointerElement] are inappropriate for If [XPointerFramework] and [XPointerElement] are inappropriate for
some XML-based media type, it SHOULD NOT follow the naming convention some XML-based media type, it SHOULD NOT follow the naming convention
'+xml'. '+xml'.
When a URI has a fragment identifier, it is encoded by a limited When a URI has a fragment identifier, it is encoded by a limited
subset of the repertoire of US-ASCII characters, see subset of the repertoire of US-ASCII characters, see
[XPointerFramework] for details.. [XPointerFramework] for details.
6. The Base URI 6. The Base URI
An XML MIME entity of type application/xml, text/xml, application/ An XML MIME entity of type application/xml, text/xml, application/
xml-external-parsed-entity or text/xml-external-parsed-entity MAY use xml-external-parsed-entity, or text/xml-external-parsed-entity MAY
the xml:base attribute, as described in [XMLBase], to embed a base use the xml:base attribute, as described in [XMLBase], to embed a
URI in that entity for use in resolving relative URI references (see base URI in that entity for use in resolving relative URI references
Section 5.1 of [RFC3986]). (see Section 5.1 of [RFC3986]).
Note that the base URI itself might be embedded in a different MIME Note that the base URI itself might be embedded in a different MIME
entity, since the default value for the xml:base attribute can be entity, since the default value for the xml:base attribute can be
specified in an external DTD subset or external parameter entity. specified in an external DTD subset or external parameter entity.
Since conforming XML processors need not always read and process Since conforming XML processors need not always read and process
external entities, the effect of such an external default is external entities, the effect of such an external default is
uncertain and therefore its use is NOT RECOMMENDED. uncertain; therefore, its use is NOT RECOMMENDED.
7. XML Versions 7. XML Versions
application/xml, application/xml-external-parsed-entity, and application/xml, application/xml-external-parsed-entity, application/
application/xml-dtd, text/xml and text/xml-external-parsed-entity are xml-dtd, text/xml, and text/xml-external-parsed-entity are to be used
to be used with [XML]. In all examples herein where version="1.0" is with [XML]. In all examples herein where version="1.0" is shown, it
shown, it is understood that version="1.1" might also appear, is understood that version="1.1" might also appear, providing the
providing the content does indeed conform to [XML1.1]. content does indeed conform to [XML1.1].
The normative requirement of this specification upon XML documents The normative requirement of this specification upon XML documents
and processors is to follow the requirements of [XML], section 4.3.3. and processors is to follow the requirements of [XML], Section 4.3.3.
Except for minor clarifications, that section is substantially Except for minor clarifications, that section is substantially
identical from the first edition to the current (5th) edition of XML identical from the first edition to the current (5th) edition of XML
1.0, and for XML 1.1 1st or 2nd edition [XML1.1]. Therefore, 1.0, and for XML 1.1 first or second edition [XML1.1]. Therefore,
references herein to [XML] may be interpreted as referencing any references herein to [XML] may be interpreted as referencing any
existing version or edition of XML, or any subsequent edition or existing version or edition of XML, or any subsequent edition or
version which makes no incompatible changes to that section. version that makes no incompatible changes to that section.
Specifications and recommendations based on or referring to this RFC Specifications and recommendations based on or referring to this RFC
SHOULD indicate any limitations on the particular versions or SHOULD indicate any limitations on the particular versions or
editions of XML to be used. editions of XML to be used.
8. Examples 8. Examples
This section is non-normative. In particular, note that all This section is non-normative. In particular, note that all
[RFC2119] language herein reproduces or summarizes the consequences [RFC2119] language herein reproduces or summarizes the consequences
of normative statements already made above, and has no independent of normative statements already made above, and has no independent
normative force, and accordingly does not appear in uppercase. normative force, and accordingly does not appear in uppercase.
The examples below give the MIME Content-type header, including the The examples below give the MIME Content-Type header, including the
charset parameter, if present and the XML declaration or Text charset parameter, if present and the XML declaration or Text
declaration (which includes the encoding declaration) inside the XML declaration (which includes the encoding declaration) inside the XML
MIME entity. For UTF-16 examples, the Byte Order Mark character MIME entity. For UTF-16 examples, the Byte Order Mark character
appropriately UTF-16-encoded is denoted as "{BOM}", and the XML or appropriately UTF-16 encoded is denoted as "{BOM}", and the XML or
Text declaration is assumed to come at the beginning of the XML MIME Text declaration is assumed to come at the beginning of the XML MIME
entity, immediately following the encoded BOM. Note that other MIME entity, immediately following the encoded BOM. Note that other MIME
headers may be present, and the XML MIME entity will normally contain headers may be present, and the XML MIME entity will normally contain
other data in addition to the XML declaration; the examples focus on other data in addition to the XML declaration; the examples focus on
the Content-type header and the encoding declaration for clarity. the Content-Type header and the encoding declaration for clarity.
Although they show a content type of 'application/xml', all the Although they show a content type of 'application/xml', all the
examples below apply to all five media types declared below in examples below apply to all five media types declared below in
Section 9, as well as to any media types declared using the '+xml' Section 9, as well as to any media types declared using the '+xml'
convention (with the exception of the examples involving the charset convention (with the exception of the examples involving the charset
parameter for any such media types which do not enable its use). See parameter for any such media types that do not enable its use). See
the XML MIME entities table (Section 4.1, Paragraph 1) for discussion the XML MIME entities table (Section 4.1, Paragraph 1) for discussion
of which types are appropriate for which varieties of XML MIME of which types are appropriate for which varieties of XML MIME
entity. entity.
8.1. UTF-8 Charset 8.1. UTF-8 Charset
Content-Type: application/xml; charset=utf-8 Content-Type: application/xml; charset=utf-8
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
skipping to change at page 15, line 4 skipping to change at page 15, line 34
8.1. UTF-8 Charset 8.1. UTF-8 Charset
Content-Type: application/xml; charset=utf-8 Content-Type: application/xml; charset=utf-8
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
or or
<?xml version="1.0"?> <?xml version="1.0"?>
UTF-8 is the recommended encoding for use with all the media types UTF-8 is the recommended encoding for use with all the media types
defined in this specification. Since the charset parameter is defined in this specification. Since the charset parameter is
provided and there is no overriding BOM, conformant MIME and XML provided and there is no overriding BOM, conformant MIME and XML
processors must treat the enclosed entity as UTF-8 encoded. processors must treat the enclosed entity as UTF-8 encoded.
If sent using a 7-bit transport (e.g. SMTP [RFC5321]), in general, a If sent using a 7-bit transport (e.g., SMTP [RFC5321]), in general, a
UTF-8 XML MIME entity must use a content-transfer-encoding of either UTF-8 XML MIME entity must use a content-transfer-encoding of either
quoted-printable or base64. For an 8-bit clean transport (e.g. quoted-printable or base64. For an 8-bit clean transport (e.g.,
8BITMIME ESMTP or NNTP), or a binary clean transport (e.g. BINARY 8BITMIME ESMTP or NNTP), or a binary clean transport (e.g., BINARY
ESMTP or HTTP), no content-transfer-encoding is necessary (or even ESMTP or HTTP), no content-transfer-encoding is necessary (or even
possible, in the case of HTTP). possible, in the case of HTTP).
8.2. UTF-16 Charset 8.2. UTF-16 Charset
Content-Type: application/xml; charset=utf-16 Content-Type: application/xml; charset=utf-16
{BOM}<?xml version="1.0" encoding="utf-16"?> {BOM}<?xml version="1.0" encoding="utf-16"?>
or or
{BOM}<?xml version="1.0"?> {BOM}<?xml version="1.0"?>
For the three application/ media types defined above, if sent using a For the three application/media types defined above, if sent using a
7-bit transport (e.g. SMTP) or an 8-bit clean transport (e.g. 7-bit transport (e.g., SMTP) or an 8-bit clean transport (e.g.,
8BITMIME ESMTP or NNTP), the XML MIME entity must be encoded in 8BITMIME ESMTP or NNTP), the XML MIME entity must be encoded in
quoted-printable or base64; for a binary clean transport (e.g. BINARY quoted-printable or base64; for a binary clean transport (e.g.,
ESMTP or HTTP), no content-transfer-encoding is necessary (or even BINARY ESMTP or HTTP), no content-transfer-encoding is necessary (or
possible, in the case of HTTP). even possible, in the case of HTTP).
As described in [RFC2781], the UTF-16 family must not be used with As described in [RFC2781], the UTF-16 family must not be used with
media types under the top-level type "text" except over HTTP or HTTPS media types under the top-level type "text" except over HTTP or HTTPS
(see section A.2 of HTTP [HTTPbis] for details). Hence one of the (see Section A.2 of HTTP [RFC7231] for details). Hence, one of the
two text/ media types defined above can be used with this exampleonly two text/media types defined above can be used with this example only
when the XML MIME entity is transmitted via HTTP or HTTPS, which use when the XML MIME entity is transmitted via HTTP or HTTPS, which use
a MIME-like mechanism and are binary-clean protocols, hence do not a MIME-like mechanism and are binary-clean protocols and hence do not
perform CR and LF transformations and allow NUL octets. Since HTTP perform CR and LF transformations and allow NUL octets. Since HTTP
is binary clean, no content-transfer-encoding is necessary (or even is binary clean, no content-transfer-encoding is necessary (or even
possible). possible).
8.3. Omitted Charset and 8-bit MIME Entity 8.3. Omitted Charset and 8-Bit MIME Entity
Content-Type: application/xml Content-Type: application/xml
<?xml version="1.0" encoding="iso-8859-1"?> <?xml version="1.0" encoding="iso-8859-1"?>
Since the charset parameter is not provided in the Content-Type Since the charset parameter is not provided in the Content-Type
header and there is no overriding BOM, conformant XML processors must header and there is no overriding BOM, conformant XML processors must
treat the "iso-8859-1" encoding as authoritative. Conformant XML- treat the "iso-8859-1" encoding as authoritative. Conformant XML-
unaware MIME processors should make no assumptions about the unaware MIME processors should make no assumptions about the
character encoding of the XML MIME entity. character encoding of the XML MIME entity.
8.4. Omitted Charset and 16-bit MIME Entity 8.4. Omitted Charset and 16-Bit MIME Entity
Content-Type: application/xml Content-Type: application/xml
{BOM}<?xml version="1.0" encoding="utf-16"?> {BOM}<?xml version="1.0" encoding="utf-16"?>
or or
{BOM}<?xml version="1.0"?> {BOM}<?xml version="1.0"?>
This example shows a 16-bit MIME entity with no charset parameter. This example shows a 16-bit MIME entity with no charset parameter.
However since there is a BOM conformant processors must treat the However, since there is a BOM, conformant processors must treat the
entity as UTF-16-encoded. entity as UTF-16 encoded.
Omitting the charset parameter is not recommended in conjunction with Omitting the charset parameter is not recommended in conjunction with
media types under the top-level type "application" when used with media types under the top-level type "application" when used with
transports other than HTTP or HTTPS. Media types under the top-level transports other than HTTP or HTTPS. Media types under the top-level
type "text" should not be used for 16-bit MIME with transports other type "text" should not be used for 16-bit MIME with transports other
than HTTP or HTTPS (see discussion above (Section 8.2, Paragraph 7)). than HTTP or HTTPS (see discussion above in
Section 8.2, Paragraph 7).
8.5. Omitted Charset, no Internal Encoding Declaration 8.5. Omitted Charset, No Internal Encoding Declaration
Content-Type: application/xml Content-Type: application/xml
<?xml version='1.0'?> <?xml version='1.0'?>
In this example, the charset parameter has been omitted, there is no In this example, the charset parameter has been omitted, there is no
internal encoding declaration, and there is no BOM. Since there is internal encoding declaration, and there is no BOM. Since there is
no BOM or charset parameter, the XML processor follows the no BOM or charset parameter, the XML processor follows the
requirements in section 4.3.3, and optionally applies the mechanism requirements in Section 4.3.3, and optionally applies the mechanism
described in Appendix F (which is non-normative) of [XML] to described in Appendix F (which is non-normative) of [XML] to
determine an encoding of UTF-8. Although the XML MIME entity does determine an encoding of UTF-8. Although the XML MIME entity does
not contain an encoding declaration, provided the encoding actually not contain an encoding declaration, provided the encoding actually
_is_ UTF-8, this is a conforming XML MIME entity. _is_ UTF-8, this is a conforming XML MIME entity.
A conformant XML-unaware MIME processor should make no assumptions A conformant XML-unaware MIME processor should make no assumptions
about the character encoding of the XML MIME entity. about the character encoding of the XML MIME entity.
See Section 8.1 for transport-related issues for UTF-8 XML MIME See Section 8.1 for transport-related issues for UTF-8 XML MIME
entities. entities.
skipping to change at page 17, line 16 skipping to change at page 17, line 47
Content-Type: application/xml; charset=utf-16be Content-Type: application/xml; charset=utf-16be
<?xml version='1.0' encoding='utf-16be'?> <?xml version='1.0' encoding='utf-16be'?>
Observe that, as required for this encoding, there is no BOM. Since Observe that, as required for this encoding, there is no BOM. Since
the charset parameter is provided and there is no overriding BOM, the charset parameter is provided and there is no overriding BOM,
conformant MIME and XML processors must treat the enclosed entity as conformant MIME and XML processors must treat the enclosed entity as
UTF-16BE encoded. UTF-16BE encoded.
See also the additional considerations in the UTF-16 example See also the additional considerations in the UTF-16 example in
(Section 8.2) above. Section 8.2.
8.7. Non-UTF Charset 8.7. Non-UTF Charset
Content-Type: application/xml; charset=iso-2022-kr Content-Type: application/xml; charset=iso-2022-kr
<?xml version="1.0" encoding="iso-2022-kr"?> <?xml version="1.0" encoding="iso-2022-kr"?>
This example shows the use of a non-UTF character encoding (in this This example shows the use of a non-UTF character encoding (in this
case Hangul, but this example is intended to cover all non-UTF-family case Hangul, but this example is intended to cover all non-UTF-family
character encodings). Since the charset parameter is provided and character encodings). Since the charset parameter is provided and
there is no overriding BOM, conformant processors must treat the there is no overriding BOM, conformant processors must treat the
enclosed entity as encoded per RFC 1557. enclosed entity as encoded per RFC 1557.
Since ISO-2022-KR [RFC1557] has been defined to use only 7 bits of Since ISO-2022-KR [RFC1557] has been defined to use only 7 bits of
data, no content-transfer-encoding is necessary with any transport: data, no content-transfer-encoding is necessary with any transport:
for character sets needing 8 or more bits, considerations such as for character sets needing 8 or more bits, considerations such as
those discussed above (Section 8.1, Section 8.2) would apply. those discussed above (Sections 8.1 and 8.2) would apply.
8.8. INCONSISTENT EXAMPLE: Conflicting Charset and Internal Encoding 8.8. INCONSISTENT EXAMPLE: Conflicting Charset and Internal Encoding
Declaration Declaration
Content-Type: application/xml; charset=iso-8859-1 Content-Type: application/xml; charset=iso-8859-1
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
Although the charset parameter is provided in the Content-Type header Although the charset parameter is provided in the Content-Type header
and there is no BOM and the charset parameter differs from the XML and there is no BOM and the charset parameter differs from the XML
encoding declaration, conformant MIME and XML processors will encoding declaration, conformant MIME and XML processors will
interoperate. Since the charset parameter is authoritative in the interoperate. Since the charset parameter is authoritative in the
absence of a BOM, conformant processors will treat the enclosed absence of a BOM, conformant processors will treat the enclosed
entity as iso-8859-1 encoded. That is, the "UTF-8" encoding entity as iso-8859-1 encoded. That is, the "UTF-8" encoding
declaration will be ignored. declaration will be ignored.
Conformant processors generating XML MIME entities must not label Conformant processors generating XML MIME entities must not label
conflicting character encoding information between the MIME Content- conflicting character encoding information between the MIME Content-
Type and the XML declaration unless they have definitive information Type and the XML declaration unless they have definitive information
about the actual encoding, for example as a result of systematic about the actual encoding, for example, as a result of systematic
transcoding. In particular, the addition by servers of an explicit, transcoding. In particular, the addition by servers of an explicit,
site-wide charset parameter default has frequently lead to site-wide charset parameter default has frequently lead to
interoperability problems for XML documents. interoperability problems for XML documents.
8.9. INCONSISTENT EXAMPLE: Conflicting Charset and BOM 8.9. INCONSISTENT EXAMPLE: Conflicting Charset and BOM
Content-Type: application/xml; charset=iso-8859-1 Content-Type: application/xml; charset=iso-8859-1
{BOM}<?xml version="1.0"?> {BOM}<?xml version="1.0"?>
Although the charset parameter is provided in the Content-Type Although the charset parameter is provided in the Content-Type
header, there is a BOM, so MIME and XML processors may not header, there is a BOM, so MIME and XML processors may not
interoperate. Since the BOM parameter is authoritative for interoperate. Since the BOM parameter is authoritative for
conformant XML processors, they will treat the enclosed entity as conformant XML processors, they will treat the enclosed entity as
UTF-16-encoded. That is, the "iso-8859-1" charset parameter will be UTF-16 encoded. That is, the "iso-8859-1" charset parameter will be
ignored. XML-unaware MIME processors on the other hand may be ignored. XML-unaware MIME processors on the other hand may be
unaware of the BOM and so treat the entity as encoded in iso-8859-1. unaware of the BOM and so treat the entity as encoded in iso-8859-1.
Conformant processors generating XML MIME entities must not label Conformant processors generating XML MIME entities must not label
conflicting character encoding information between the MIME Content- conflicting character encoding information between the MIME Content-
Type and an entity-initial BOM. Type and an entity-initial BOM.
9. IANA Considerations 9. IANA Considerations
9.1. Application/xml Registration 9.1. application/xml Registration
Type name: application Type name: application
Subtype name: xml Subtype name: xml
Required parameters: none Required parameters: none
Optional parameters: charset Optional parameters: charset
See Section 3. See Section 3.
Encoding considerations: Depending on the character encoding used, Encoding considerations: Depending on the character encoding used,
XML MIME entities can consist of 7bit, 8bit or binary data XML MIME entities can consist of 7bit, 8bit, or binary data
[RFC6838]. For 7-bit transports, 7bit data, for example US-ASCII- [RFC6838]. For 7-bit transports, 7bit data, for example, US-
encoded data, does not require content-transfer-encoding, but 8bit ASCII-encoded data, does not require content-transfer-encoding,
or binary data, for example UTF-8 or UTF-16 data, MUST be content- but 8bit or binary data, for example, UTF-8 or UTF-16 data, MUST
transfer-encoded in quoted-printable or base64. For 8-bit clean be content-transfer-encoded in quoted-printable or base64. For
transport (e.g. 8BITMIME ESMTP [RFC6152] or NNTP [RFC3977]), 7bit 8-bit clean transport (e.g., 8BITMIME ESMTP [RFC6152] or NNTP
or 8bit data, for example US-ASCII or UTF-8 data, does not require [RFC3977]), 7bit or 8bit data, for example, US-ASCII or UTF-8
content-transfer-encoding, but binary data, for example data with data, does not require content-transfer-encoding, but binary data,
a UTF-16 encoding, MUST be content-transfer-encoded in base64. for example, data with a UTF-16 encoding, MUST be content-
transfer-encoded in base64. For binary clean transports (e.g.,
For binary clean transports (e.g. BINARY ESMTP [RFC3030] or HTTP BINARY ESMTP [RFC3030] or HTTP [RFC7230]), no content-transfer-
[HTTPbis]), no content-transfer-encoding is necessary (or even encoding is necessary (or even possible, in the case of HTTP) for
possible, in the case of HTTP) for 7bit, 8bit or binary data. 7bit, 8bit, or binary data.
Security considerations: See Section 10. Security considerations: See Section 10.
Interoperability considerations: XML has proven to be interoperable Interoperability considerations: XML has proven to be interoperable
across both generic and task-specific applications and for import across both generic and task-specific applications and for import
and export from multiple XML authoring and editing tools. and export from multiple XML authoring and editing tools.
Validating processors provide maximum interoperability, because Validating processors provide maximum interoperability, because
they have to handle all aspects of XML. Although a non-validating they have to handle all aspects of XML. Although a non-validating
processor may be more efficient, it might not handle all aspects. processor may be more efficient, it might not handle all aspects.
For further information, see sub-section 2.9 "Standalone Document For further information, see Section 2.9 "Standalone Document
Declaration" and section 5 "Conformance" of [XML] . Declaration" and Section 5 "Conformance" of [XML] .
In practice, character set issues have proved to be the biggest In practice, character set issues have proved to be the biggest
source of interoperability problems. The use of UTF-8, and source of interoperability problems. The use of UTF-8, and
careful attention to the guidelines set out in Section 3, are the careful attention to the guidelines set out in Section 3, are the
best ways to avoid such problems. best ways to avoid such problems.
Published specification: Extensible Markup Language (XML) 1.0 (Fifth Published specification: Extensible Markup Language (XML) 1.0 (Fifth
Edition) [XML] or subsequent editions or versions thereof. Edition) [XML] or subsequent editions or versions thereof.
Applications that use this media type: XML is device-, platform-, Applications that use this media type: XML is device, platform, and
and vendor-neutral and is supported by generic and task-specific vendor neutral and is supported by generic and task-specific
applications and a wide range of generic XML tools (editors, applications and a wide range of generic XML tools (editors,
parsers, Web agents, ...). parsers, Web agents, ...).
Additional information: Additional information:
Magic number(s): None. Magic number(s): None.
Although no byte sequences can be counted on to always be Although no byte sequences can be counted on to always be
present, XML MIME entities in ASCII-compatible character sets present, XML MIME entities in ASCII-compatible character sets
(including UTF-8) often begin with hexadecimal 3C 3F 78 6D 6C (including UTF-8) often begin with hexadecimal 3C 3F 78 6D 6C
("<?xml"), and those in UTF-16 often begin with hexadecimal FE ("<?xml"), 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 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 00 6C 00 (the BOM followed by "<?xml"). For more information,
more information, see Appendix F of [XML]. see Appendix F of [XML].
File extension(s): .xml File extension(s): .xml
Macintosh File Type Code(s): "TEXT" Macintosh File Type Code(s): "TEXT"
Base URI: See Section 6 Base URI: See Section 6
Person and email address for further information: See Authors' Person and email address for further information: See Authors'
Addresses section Addresses section
Intended usage: COMMON Intended usage: COMMON
Author: See Authors' Addresses section Author: See Authors' Addresses section
Change controller: The XML specification is a work product of the Change controller: The XML specification is a work product of the
World Wide Web Consortium's XML Core Working Group. The W3C has World Wide Web Consortium's XML Core Working Group. The W3C has
change control over RFC XXXX. change control over RFC 7303.
9.2. Text/xml Registration 9.2. text/xml Registration
The registration information for text/xml is in all respects the same The registration information for text/xml is in all respects the same
as that given for application/xml above (Section 9.1), except that as that given for application/xml above (Section 9.1), except that
the "Type name" is "text". the "Type name" is "text".
9.3. Application/xml-external-parsed-entity Registration 9.3. application/xml-external-parsed-entity Registration
Type name: application Type name: application
Subtype name: xml-external-parsed-entity Subtype name: xml-external-parsed-entity
Required parameters: none Required parameters: none
Optional parameters: charset Optional parameters: charset
See Section 3. See Section 3.
skipping to change at page 21, line 22 skipping to change at page 22, line 14
Person and email address for further information: See Authors' Person and email address for further information: See Authors'
Addresses section. Addresses section.
Intended usage: COMMON Intended usage: COMMON
Author: See Authors' Addresses section. Author: See Authors' Addresses section.
Change controller: The XML specification is a work product of the Change controller: The XML specification is a work product of the
World Wide Web Consortium's XML Core Working Group. The W3C has World Wide Web Consortium's XML Core Working Group. The W3C has
change control over RFC XXXX. change control over RFC 7303.
9.4. Text/xml-external-parsed-entity Registration 9.4. text/xml-external-parsed-entity Registration
The registration information for text/xml-external-parsed-entity is The registration information for text/xml-external-parsed-entity is
in all respects the same as that given for application/xml-external- in all respects the same as that given for application/xml-external-
parsed-entity above (Section 9.3), except that the "Type name" is parsed-entity above (Section 9.3), except that the "Type name" is
"text". "text".
9.5. Application/xml-dtd Registration 9.5. application/xml-dtd Registration
Type name: application Type name: application
Subtype name: xml-dtd Subtype name: xml-dtd
Required parameters: none Required parameters: none
Optional parameters: charset Optional parameters: charset
See Section 3. See Section 3.
skipping to change at page 22, line 27 skipping to change at page 23, line 22
Person and email address for further information: See Authors' Person and email address for further information: See Authors'
Addresses section. Addresses section.
Intended usage: COMMON Intended usage: COMMON
Author: See Authors' Addresses section. Author: See Authors' Addresses section.
Change controller: The XML specification is a work product of the Change controller: The XML specification is a work product of the
World Wide Web Consortium's XML Core Working Group. The W3C has World Wide Web Consortium's XML Core Working Group. The W3C has
change control over RFC XXXX. change control over RFC 7303.
9.6. The '+xml' Naming Convention for XML-Based Media Types 9.6. The '+xml' Naming Convention for XML-Based Media Types
This section supersedes the earlier registration of the '+xml' suffix This section supersedes the earlier registration of the '+xml' suffix
[RFC6839]. [RFC6839].
This specification recommends the use of the '+xml' naming convention This specification recommends the use of the '+xml' naming convention
for identifying XML-based media types, in line with the recognition for identifying XML-based media types, in line with the recognition
in [RFC6838] of structured syntax name suffixes. This allows the use in [RFC6838] of structured syntax name suffixes. This allows the use
of generic XML processors and technologies on a wide variety of of generic XML processors and technologies on a wide variety of
different XML document types at a minimum cost, using existing different XML document types at a minimum cost, using existing
frameworks for media type registration. frameworks for media type registration.
See Section 4.2 for guidance on when and how to register a See Section 4.2 for guidance on when and how to register a media
'+xml'-based media subtype, and Section 4.3 on registering a media subtype that is '+xml' based, and Section 4.3 on registering a media
subtype for XML but _not_ using '+xml'. subtype for XML but _not_ using '+xml'.
9.6.1. +xml Structured Syntax Suffix Registration 9.6.1. The '+xml' Structured Syntax Suffix Registration
Name: Extensible Markup Language (XML) Name: Extensible Markup Language (XML)
+suffix: +xml +suffix: +xml
Reference: RFC XXXX Reference: RFC 7303
Encoding considerations: Same as Section 9.1. Encoding considerations: Same as Section 9.1.
Fragment identifier considerations: Registrations which use this Fragment identifier considerations: Registrations that use this
'+xml' convention MUST also make reference to RFC XXXX, '+xml' convention MUST also make reference to this document,
specifically Section 5, in specifying fragment identifier syntax specifically Section 5, in specifying fragment identifier syntax
and semantics, and they MAY restrict the syntax to a specified and semantics, and they MAY restrict the syntax to a specified
subset of schemes, except that they MUST NOT disallow barenames or subset of schemes, except that they MUST NOT disallow barenames or
'element' scheme pointers. They MAY further require support for 'element' scheme pointers. They MAY further require support for
other registered schemes. They also MAY add additional syntax other registered schemes. They also MAY add additional syntax
(which MUST NOT overlap with [XPointerFramework] syntax) together (which MUST NOT overlap with [XPointerFramework] syntax) together
with associated semantics, and MAY add additional semantics for with associated semantics, and they MAY add additional semantics
barename XPointers which, as provided for in Section 5, will only for barename XPointers that, as provided for in Section 5, will
apply when RFC XXXX does not define an interpretation. only apply when this document does not define an interpretation.
In practice these constraints imply that for a fragment In practice, these constraints imply that for a fragment
identifier addressed to an instance of a specific "xxx/yyy+xml" identifier addressed to an instance of a specific "xxx/yyy+xml"
type, there are three cases: type, there are three cases:
For fragment identifiers matching the syntax defined in For fragment identifiers matching the syntax defined in
[XPointerFramework], where the fragment identifier resolves [XPointerFramework], where the fragment identifier resolves
per the rules specified there, then process as specified per the rules specified there, then process as specified
there; there;
For fragment identifiers matching the syntax defined in For fragment identifiers matching the syntax defined in
[XPointerFramework], where the fragment identifier does [XPointerFramework], where the fragment identifier does
skipping to change at page 24, line 7 skipping to change at page 24, line 46
parameter. parameter.
Security considerations: See Section 10. Security considerations: See Section 10.
Contact: See Authors' Addresses section. Contact: See Authors' Addresses section.
Author: See Authors' Addresses section. Author: See Authors' Addresses section.
Change controller: The XML specification is a work product of the Change controller: The XML specification is a work product of the
World Wide Web Consortium's XML Core Working Group. The W3C has World Wide Web Consortium's XML Core Working Group. The W3C has
change control over RFC XXXX. change control over RFC 7303.
10. Security Considerations 10. Security Considerations
XML MIME entities contain information which may be parsed and further XML MIME entities contain information that may be parsed and further
processed by the recipient. These entities may contain, and processed by the recipient. These entities may contain, and
recipients may permit, explicit system level commands to be executed recipients may permit, explicit system level commands to be executed
while processing the data. To the extent that a recipient while processing the data. To the extent that a recipient
application executes arbitrary command strings from within XML MIME application executes arbitrary command strings from within XML MIME
entities, they may be at risk. entities, they may be at risk.
In general, any information stored outside of the direct control of In general, any information stored outside of the direct control of
the user -- including CSS style sheets, XSL transformations, XML- the user -- including CSS style sheets, XSL transformations, XML-
entity declarations, and DTDs -- can be a source of insecurity, by entity declarations, and DTDs -- can be a source of insecurity, by
either obvious or subtle means. For example, a tiny "whiteout either obvious or subtle means. For example, a tiny "whiteout
skipping to change at page 24, line 42 skipping to change at page 25, line 38
trusted repository. trusted repository.
The simplest attack involves adding declarations that break The simplest attack involves adding declarations that break
validation. Adding extraneous declarations to a list of character validation. Adding extraneous declarations to a list of character
XML-entities can effectively "break the contract" used by documents. XML-entities can effectively "break the contract" used by documents.
A tiny change that produces a fatal error in a DTD could halt XML A tiny change that produces a fatal error in a DTD could halt XML
processing on a large scale. Extraneous declarations are fairly processing on a large scale. Extraneous declarations are fairly
obvious, but more sophisticated tricks, like changing attributes from obvious, but more sophisticated tricks, like changing attributes from
being optional to required, can be difficult to track down. Perhaps being optional to required, can be difficult to track down. Perhaps
the most dangerous option available to attackers, when external DTD the most dangerous option available to attackers, when external DTD
subsets or external parameter entities or other externally-specified subsets or external parameter entities or other externally specified
defaulting is involved, is redefining default values for attributes: defaulting is involved, is redefining default values for attributes:
e.g. if developers have relied on defaulted attributes for security, for example, if developers have relied on defaulted attributes for
a relatively small change might expose enormous quantities of security, a relatively small change might expose enormous quantities
information. of information.
Apart from the structural possibilities, another option, "XML-entity Apart from the structural possibilities, another option, "XML-entity
spoofing," can be used to insert text into documents, vandalizing and spoofing," can be used to insert text into documents, vandalizing and
perhaps conveying an unintended message. Because XML permits perhaps conveying an unintended message. Because XML permits
multiple XML-entity declarations, and the first declaration takes multiple XML-entity declarations, and the first declaration takes
precedence, it is possible to insert malicious content where an XML- precedence, it is possible to insert malicious content where an XML-
entity reference is used, such as by inserting the full text of entity reference is used, such as by inserting the full text of
Winnie the Pooh in place of every occurrence of &mdash;. Winnie the Pooh in place of every occurrence of &mdash;.
Security considerations will vary by domain of use. For example, XML Security considerations will vary by domain of use. For example, XML
skipping to change at page 26, line 4 skipping to change at page 27, line 6
use of what XML terms "[XML-]entity references" to construct repeated use of what XML terms "[XML-]entity references" to construct repeated
expansions of text. Recursive expansions are prohibited by [XML] and expansions of text. Recursive expansions are prohibited by [XML] and
XML processors are required to detect them. However, even non- XML processors are required to detect them. However, even non-
recursive expansions may cause problems with the finite computing recursive expansions may cause problems with the finite computing
resources of computers, if they are performed many times. For resources of computers, if they are performed many times. For
example, consider the case where XML-entity A consists of 100 copies example, consider the case where XML-entity A consists of 100 copies
of XML-entity B, which in turn consists of 100 copies of XML-entity of XML-entity B, which in turn consists of 100 copies of XML-entity
C, and so on. C, and so on.
11. References 11. References
11.1. Normative References
[HTTPbis] Fielding, R., Ed. and J. Reschke, Ed., "Hypertext Transfer 11.1. Normative References
Protocol (HTTP/1.1): Message Syntax and Routing", draft-
ietf-httpbis-p1-messaging-25 (work in progress), November
2013.
[IANA-charsets] [IANA-CHARSETS]
IANA, "Character Sets Registry", 2013, IANA, "Character Sets Registry", 2013,
<http://www.iana.org/assignments/character-sets/ <http://www.iana.org/assignments/character-sets/>.
character-sets.xhtml>.
[RFC2045] Freed, N. and N. Borenstein, "Multipurpose Internet Mail [RFC2045] Freed, N. and N. Borenstein, "Multipurpose Internet Mail
Extensions (MIME) Part One: Format of Internet Message Extensions (MIME) Part One: Format of Internet Message
Bodies", RFC 2045, November 1996. Bodies", RFC 2045, November 1996.
[RFC2046] Freed, N. and N. Borenstein, "Multipurpose Internet Mail [RFC2046] Freed, N. and N. Borenstein, "Multipurpose Internet Mail
Extensions (MIME) Part Two: Media Types", RFC 2046, Extensions (MIME) Part Two: Media Types", RFC 2046,
November 1996. November 1996.
[RFC2119] Bradner, S., "Key words for use in RFCs to Indicate [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate
Requirement Levels", BCP 14, RFC 2119, March 1997. Requirement Levels", BCP 14, RFC 2119, March 1997.
[RFC2781] Hoffman, P. and F. Yergeau, "UTF-16, an encoding of ISO [RFC2781] Hoffman, P. and F. Yergeau, "UTF-16, an encoding of ISO
10646", RFC 2781, February 2000. 10646", RFC 2781, February 2000.
[RFC2978] Freed, N. and J. Postel, "IANA Charset Registration [RFC2978] Freed, N. and J. Postel, "IANA Charset Registration
Procedures", RFC 2978, October 2000. Procedures", BCP 19, RFC 2978, October 2000.
[RFC3986] Berners-Lee, T., Fielding, R., and L. Masinter, "Uniform [RFC3986] Berners-Lee, T., Fielding, R., and L. Masinter, "Uniform
Resource Identifiers (URI): Generic Syntax.", RFC 3986, Resource Identifier (URI): Generic Syntax", STD 66, RFC
January 2005. 3986, January 2005.
[RFC3987] Dueerst, M. and M. Suignard, "Internationalized Resource [RFC3987] Duerst, M. and M. Suignard, "Internationalized Resource
Identifiers (IRIs)", RFC 3987, July 2005. Identifiers (IRIs)", RFC 3987, January 2005.
[RFC6657] Melnikov, A. and J. Reschke, "Update to MIME regarding [RFC6657] Melnikov, A. and J. Reschke, "Update to MIME regarding
"charset" Parameter Handling in Textual Media Types", RFC "charset" Parameter Handling in Textual Media Types", RFC
6657, July 2012, 6657, July 2012.
<http://www.rfc-editor.org/rfc/rfc6657.txt>.
[RFC6838] Freed, N., Klensin, J., and T. Hansen, "Media Type [RFC6838] Freed, N., Klensin, J., and T. Hansen, "Media Type
Specifications and Registration Procedures", BCP 13, RFC Specifications and Registration Procedures", BCP 13, RFC
6838, January 2013. 6838, January 2013.
[RFC6839] Hansen, T. and A. Melnikov, "Additional Media Type [RFC6839] Hansen, T. and A. Melnikov, "Additional Media Type
Structured Syntax Suffixes", RFC 6839, January 2013. Structured Syntax Suffixes", RFC 6839, January 2013.
[RFC7230] Fielding, R. and J. Reschke, "Hypertext Transfer Protocol
(HTTP/1.1): Message Syntax and Routing", RFC 7230, June
2014.
[RFC7231] Fielding, R. and J. Reschke, "Hypertext Transfer Protocol
(HTTP/1.1): Semantics and Content", RFC 7231, June 2014.
[UNICODE] The Unicode Consortium, "The Unicode Standard, Version [UNICODE] The Unicode Consortium, "The Unicode Standard, Version
6.3.0", 2013, 7.0.0", (Mountain View, CA: The Unicode Consortium, 2014
<http://www.unicode.org/versions/Unicode6.3.0/>. ISBN 978-1-936213-09-2),
<http://www.unicode.org/versions/Unicode7.0.0/>.
Defined by: The Unicode Standard, Version 6.3 (Mountain [XML] Bray, T., Paoli, J., Sperberg-McQueen, C., Maler, E., and
View, CA: The Unicode Consortium, 2013. ISBN F. Yergeau, "Extensible Markup Language (XML) 1.0 (Fifth
978-1-936213-08-5) Edition)", W3C Recommendation REC-xml, November 2008,
<http://www.w3.org/TR/2008/REC-xml-20081126/>.
Latest version available at <http://www.w3.org/TR/xml>.
[XML1.1] Bray, T., Paoli, J., Sperberg-McQueen, C., Maler, E., [XML1.1] Bray, T., Paoli, J., Sperberg-McQueen, C., Maler, E.,
Yergeau, F., and J. Cowan, "Extensible Markup Language Yergeau, F., and J. Cowan, "Extensible Markup Language
(XML) 1.1 (Second Edition)", W3C Recommendation REC-xml, (XML) 1.1 (Second Edition)", W3C Recommendation REC-xml,
September 2006, September 2006,
<http://www.w3.org/TR/2006/REC-xml11-20060816/>. <http://www.w3.org/TR/2006/REC-xml11-20060816/>.
Latest version available at [2]. Latest version available at <http://www.w3.org/TR/xml11>.
[XMLBase] Marsh, J. and R. Tobin, "XML Base (Second Edition)", W3C [XMLBase] Marsh, J. and R. Tobin, "XML Base (Second Edition)", W3C
Recommendation REC-xmlbase-20090128, January 2009, Recommendation REC-xmlbase-20090128, January 2009,
<http://www.w3.org/TR/2009/REC-xmlbase-20090128/>. <http://www.w3.org/TR/2009/REC-xmlbase-20090128/>.
Latest version available at [3]. Latest version available at
<http://www.w3.org/TR/xmlbase>.
[XML] Bray, T., Paoli, J., Sperberg-McQueen, C., Maler, E., and
F. Yergeau, "Extensible Markup Language (XML) 1.0 (Fifth
Edition)", W3C Recommendation REC-xml, November 2008,
<http://www.w3.org/TR/2008/REC-xml-20081126/>.
Latest version available at [1].
[XPointerElement] [XPointerElement]
Grosso, P., Maler, E., Marsh, J., and N. Walsh, "XPointer Grosso, P., Maler, E., Marsh, J., and N. Walsh, "XPointer
element() Scheme", W3C Recommendation REC-XPointer- element() Scheme", W3C Recommendation REC-XPointer-
Element, March 2003, Element, March 2003,
<http://www.w3.org/TR/2003/REC-xptr-element-20030325/>. <http://www.w3.org/TR/2003/REC-xptr-element-20030325/>.
Latest version available at [4]. Latest version available at
<http://www.w3.org/TR/xptr-element>.
[XPointerFramework] [XPointerFramework]
Grosso, P., Maler, E., Marsh, J., and N. Walsh, "XPointer Grosso, P., Maler, E., Marsh, J., and N. Walsh, "XPointer
Framework", W3C Recommendation REC-XPointer-Framework, Framework", W3C Recommendation REC-XPointer-Framework,
March 2003, March 2003,
<http://www.w3.org/TR/2003/REC-xptr-framework-20030325/>. <http://www.w3.org/TR/2003/REC-xptr-framework-20030325/>.
Latest version available at [5]. Latest version available at
<http://www.w3.org/TR/xptr-framework>.
[XPtrReg] Hazael-Massieux, D., "XPointer Registry", 2005,
<http://www.w3.org/2005/04/xpointer-schemes/>.
[XPtrRegPolicy] [XPtrRegPolicy]
Hazael-Massieux, D., "XPointer Scheme Name Registry Hazael-Massieux, D., "XPointer Scheme Name Registry
Policy", 2005, Policy", 2005,
<http://www.w3.org/2005/04/xpointer-policy.html>. <http://www.w3.org/2005/04/xpointer-policy.html>.
[XPtrReg] Hazael-Massieux, D., "XPointer Registry", 2005,
<http://www.w3.org/2005/04/xpointer-schemes/>.
11.2. Informative References 11.2. Informative References
[ASCII] American National Standards Institute, "Coded Character [ASCII] American National Standards Institute, "Coded Character
Set -- 7-bit American Standard Code for Information Set -- 7-bit American Standard Code for Information
Interchange", ANSI X3.4, 1986. Interchange", ANSI X3.4, 1986.
[AWWW] Jacobs, I. and N. Walsh, "Architecture of the World Wide [AWWW] Jacobs, I. and N. Walsh, "Architecture of the World Wide
Web, Volume One", W3C Recommendation REC-webarch-20041215, Web, Volume One", W3C Recommendation REC-webarch-20041215,
December 2004, December 2004,
<http://www.w3.org/TR/2004/REC-webarch-20041215/>. <http://www.w3.org/TR/2004/REC-webarch-20041215/>.
Latest version available at [8]. Latest version available at
<http://www.w3.org/TR/webarch>.
[FYN] Mendelsohn, N., "The Self-Describing Web", W3C TAG Finding [FYN] Mendelsohn, N., "The Self-Describing Web", W3C TAG Finding
selfDescribingDocuments-2009-02-07, February 2009, selfDescribingDocuments-2009-02-07, February 2009,
<http://www.w3.org/2001/tag/doc/ <http://www.w3.org/2001/tag/doc/
selfDescribingDocuments-2009-02-07.html>. selfDescribingDocuments-2009-02-07.html>.
Latest version available at [9] Latest version available at
<http://www.w3.org/2001/tag/doc/
selfDescribingDocuments.html>
[Infoset] Cowan, J. and R. Tobin, "XML Information Set (Second [Infoset] Cowan, J. and R. Tobin, "XML Information Set (Second
Edition)", W3C Recommendation REC-xml-infoset-20040204, Edition)", W3C Recommendation REC-xml-infoset-20040204,
Febuary 2004, Febuary 2004,
<http://www.w3.org/TR/2005/REC-xml-id-20050909/>. <http://www.w3.org/TR/2004/REC-xml-infoset-20040204/>.
Latest version available at [11]. Latest version available at
<http://www.w3.org/TR/xml-infoset/>.
[MediaFrags] [MediaFrags]
Troncy, R., Mannens, E., Pfeiffer, S., and D. Van Deursen, Troncy, R., Mannens, E., Pfeiffer, S., and D. Van Deursen,
"Media Fragments URI 1.0 (basic)", W3C Recommendation "Media Fragments URI 1.0 (basic)", W3C Recommendation
media-frags, September 2012, media-frags, September 2012,
<http://www.w3.org/TR/2012/REC-media-frags-20120925/>. <http://www.w3.org/TR/2012/REC-media-frags-20120925/>.
Latest version available at [6]. Latest version available at
<http://www.w3.org/TR/media-frags>.
[RFC1557] Choi, U., Chon, K., and H. Park, "Korean Character [RFC1557] Choi, U., Chon, K., and H. Park, "Korean Character
Encoding for Internet Messages", RFC 1557, December 1993. Encoding for Internet Messages", RFC 1557, December 1993.
[RFC2376] Whitehead, E. and M. Murata, "XML Media Types", RFC 2376, [RFC2376] Whitehead, E. and M. Murata, "XML Media Types", RFC 2376,
July 1998. July 1998.
[RFC2616] Fielding, R., Gettys, J., Mogul, J., Nielsen, H., [RFC2616] Fielding, R., Gettys, J., Mogul, J., Frystyk, H.,
Masinter, L., Leach, P., and T. Berners-Lee, "Hypertext Masinter, L., Leach, P., and T. Berners-Lee, "Hypertext
Transfer Protocol -- HTTP/1.1", RFC 2616, June 1999. Transfer Protocol -- HTTP/1.1", RFC 2616, June 1999.
[RFC3023] Murata, M., St.Laurent, S., and D. Kohn, "XML Media [RFC3023] Murata, M., St. Laurent, S., and D. Kohn, "XML Media
Types", RFC 3023, January 2001. Types", RFC 3023, January 2001.
[RFC3030] Vaudreuil, G., "SMTP Service Extensions for Transmission [RFC3030] Vaudreuil, G., "SMTP Service Extensions for Transmission
of Large and Binary MIME Messages", RFC 3030, 2000. of Large and Binary MIME Messages", RFC 3030, December
2000.
[RFC3977] Feather, B., "Network News Transfer Protocol", RFC 3977, [RFC3977] Feather, C., "Network News Transfer Protocol (NNTP)", RFC
October 2006. 3977, October 2006.
[RFC5226] Narten, T. and H. Alvestrand, "Guidelines for Writing an
IANA Considerations Section in RFCs", BCP 26, RFC 5226,
May 2008.
[RFC5321] Klensin, J., "Simple Mail Transfer Protocol", RFC 5321, [RFC5321] Klensin, J., "Simple Mail Transfer Protocol", RFC 5321,
October 2008. October 2008.
[RFC6152] Klensin, J., Freed, N., Rose, M., and D. Crocker, "SMTP [RFC6152] Klensin, J., Freed, N., Rose, M., and D. Crocker, "SMTP
Service Extension for 8-bit MIME Transport", RFC 6152, Service Extension for 8-bit MIME Transport", STD 71, RFC
March 2011. 6152, March 2011.
[Sivonen] Sivonen, H. and others, "Mozilla bug: Remove support for [Sivonen] Sivonen, H. and others, "Mozilla bug: Remove support for
UTF-32 per HTML5 spec", October 2011, <https:// UTF-32 per HTML5 spec", October 2011,
bugzilla.mozilla.org/show_bug.cgi?id=604317#c6>. <https://bugzilla.mozilla.org/show_bug.cgi?id=604317#c6>.
[TAGMIME] Bray, T., Ed., "Internet Media Type registration, [TAGMIME] Bray, T., Ed., "Internet Media Type registration,
consistency of use", April 2004, consistency of use", April 2004,
<http://www.w3.org/2001/tag/2004/0430-mime>. <http://www.w3.org/2001/tag/2004/0430-mime>.
[XHTML] Pemberton, S. and et al, "XHTML 1.0: The Extensible [XHTML] Pemberton, S. and et al, "XHTML 1.0: The Extensible
HyperText Markup Language", W3C Recommendation xhtml1, HyperText Markup Language", W3C Recommendation xhtml1,
December 1999, December 1999,
<http://www.w3.org/TR/2000/REC-xhtml1-20000126/>. <http://www.w3.org/TR/2000/REC-xhtml1-20000126/>.
Latest version available at [7]. Latest version available at <http://www.w3.org/TR/xhtml1>.
[XMLModel] [XMLModel] Grosso, P. and J. Kosek, "Associating Schemas with XML
Grosso, P. and J. Kosek, "Associating Schemas with XML documents 1.0 (Third Edition)", W3C Working Group Note
documents 1.0 (Third Edition)", W3C Group Note NOTE-xml- NOTE-xml-model-20121009, October 2012,
model-20121009, October 2012,
<http://www.w3.org/TR/2012/NOTE-xml-model-20121009/>. <http://www.w3.org/TR/2012/NOTE-xml-model-20121009/>.
Latest version available at [13]. Latest version available at
<http://www.w3.org/TR/xml-model>.
[XMLNS10] Bray, T., Hollander, D., Layman, A., Tobin, R., and H. [XMLNS10] Bray, T., Hollander, D., Layman, A., Tobin, R., and H.
Thompson, "Namespaces in XML 1.0 (Third Edition)", W3C Thompson, "Namespaces in XML 1.0 (Third Edition)", W3C
Recommendation REC-xml-names-20091208, December 2009, Recommendation REC-xml-names-20091208, December 2009,
<http://www.w3.org/TR/2009/REC-xml-names-20091208/>. <http://www.w3.org/TR/2009/REC-xml-names-20091208/>.
Latest version available at [12]. Latest version available at
<http://www.w3.org/TR/xml-names>.
[XMLNS11] Bray, T., Hollander, D., Layman, A., and R. Tobin, [XMLNS11] Bray, T., Hollander, D., Layman, A., and R. Tobin,
"Namespaces in XML 1.1 (Second Edition)", W3C "Namespaces in XML 1.1 (Second Edition)", W3C
Recommendation REC-xml-names11-20060816, August 2006, Recommendation REC-xml-names11-20060816, August 2006,
<http://www.w3.org/TR/2006/REC-xml-names11-20060816/>. <http://www.w3.org/TR/2006/REC-xml-names11-20060816/>.
Latest version available at [14]. Latest version available at
<http://www.w3.org/TR/xml-names11>.
[XMLSS] Clark, J., Pieters, S., and H. Thompson, "Associating [XMLSS] Clark, J., Pieters, S., and H. Thompson, "Associating
Style Sheets with XML documents 1.0 (Second Edition)", W3C Style Sheets with XML documents 1.0 (Second Edition)", W3C
Recommendation REC-xml-stylesheet-20101028, October 2010, Recommendation REC-xml-stylesheet-20101028, October 2010,
<http://www.w3.org/TR/2010/REC-xml-stylesheet-20101028/>. <http://www.w3.org/TR/2010/REC-xml-stylesheet-20101028/>.
Latest version available at [15]. Latest version available at
<http://www.w3.org/TR/xml-stylesheet>.
[XMLid] Marsh, J., Veillard, D., and N. Walsh, "xml:id Version [XMLid] Marsh, J., Veillard, D., and N. Walsh, "xml:id Version
1.0", W3C Recommendation REC-xml-id-20050909, September 1.0", W3C Recommendation REC-xml-id-20050909, September
2005, <http://www.w3.org/TR/2005/REC-xml-id-20050909/>. 2005, <http://www.w3.org/TR/2005/REC-xml-id-20050909/>.
Latest version available at [10]. Latest version available at
<http://www.w3.org/TR/xml-id>.
Appendix A. Why Use the '+xml' Suffix for XML-Based MIME Types? Appendix A. Why Use the '+xml' Suffix for XML-Based MIME Types?
[RFC3023] contains a detailed discussion of the (at the time) novel [RFC3023] contains a detailed discussion of the (at the time) novel
use of a suffix, a practice which has since become widespread. Those use of a suffix, a practice that has since become widespread. Those
interested in a historical perspective on this topic are referred to interested in a historical perspective on this topic are referred to
[RFC3023], Appendix A. [RFC3023], Appendix A.
The registration process for new '+xml' media types is described in The registration process for new '+xml' media types is described in
[RFC6838] [RFC6838].
Appendix B. Core XML specifications Appendix B. Core XML Specifications
The following specifications each articulate key aspects of XML The following specifications each articulate key aspects of XML
document semantics: document semantics:
Namespaces in XML 1.0 [XMLNS10]/Namespaces in XML 1.1 [XMLNS11] Namespaces in XML 1.0 [XMLNS10]/Namespaces in XML 1.1 [XMLNS11]
XML Information Set [Infoset] XML Information Set [Infoset]
xml:id [XMLid] xml:id [XMLid]
XML Base [XMLBase] XML Base [XMLBase]
Associating Style Sheets with XML documents [XMLSS] Associating Style Sheets with XML documents [XMLSS]
Associating Schemas with XML documents [XMLModel] Associating Schemas with XML documents [XMLModel]
The W3C Technical Architecture group has produced two documents which The W3C Technical Architecture group has produced two documents that
are also relevant: are also relevant:
The Self-Describing Web [FYN] discusses the overall principles of The Self-Describing Web [FYN] discusses the overall principles of
how document semantics are determined on the Web. how document semantics are determined on the Web.
Architecture of the World Wide Web, Volume One [AWWW], section Architecture of the World Wide Web, Volume One [AWWW],
4.5.4, discusses the specific role of XML Namespace documents in Section 4.5.4, discusses the specific role of XML Namespace
this process. documents in this process.
Appendix C. Operational considerations Appendix C. Operational Considerations
This section provides an informal summary of the major operational This section provides an informal summary of the major operational
considerations which arise when exchanging XML MIME entities over a considerations that arise when exchanging XML MIME entities over a
network. network.
C.1. General considerations C.1. General Considerations
The existence of both XML-aware and XML-unaware agents handling XML The existence of both XML-aware and XML-unaware agents handling XML
MIME entities can compromise introperability. Generic transcoding MIME entities can compromise introperability. Generic transcoding
proxies pose a particular risk in this regard. Detailed advice about proxies pose a particular risk in this regard. Detailed advice about
the handling of BOMs when transcoding can be found in Section 3.3. the handling of BOMs when transcoding can be found in Section 3.3.
This specification requires XML consumers to treat BOMs as This specification requires XML consumers to treat BOMs as
authoritative: this is in principle a backwards-incompatibility. In authoritative: this is in principle a backwards-incompatibility. In
practice serious interoperability issues already exist when BOMs are practice, serious interoperability issues already exist when BOMs are
used. Making BOMs authoritative, in conjunction with the deprecation used. Making BOMs authoritative, in conjunction with the deprecation
of the UTF-32 encoding form and the requirement to include an XML of the UTF-32 encoding form and the requirement to include an XML
encoding declaration in certain cases (Section 3.1), is intended to encoding declaration in certain cases (Section 3.1), is intended to
improve in-practice interoperability as much as possible over time. improve in-practice interoperability as much as possible over time.
This specification establishes Section 5 as the basis for This specification establishes Section 5 as the basis for
interpreting URIs for XML MIME entities which include fragment interpreting URIs for XML MIME entities that include fragment
identifiers, mandates support only for shorthand ("simple name") and identifiers, mandates support only for shorthand ("simple name") and
'element'-scheme fragments and deprecates support for unregistered 'element'-scheme fragments and deprecates support for unregistered
XPointer schemes by XML MIME entity processors. Accordingly, URIs XPointer schemes by XML MIME entity processors. Accordingly, URIs
will interoperate best if they use only simple names and will interoperate best if they use only simple names and 'element'-
'element'-scheme fragment identifiers, with registered schemes scheme fragment identifiers, with registered schemes varying widely
varying widely in the degree of support to be found in generic tools. in the degree of support to be found in generic tools. XPointer
XPointer scheme authors can only expect generic tool support if they scheme authors can only expect generic tool support if they register
register their schemes. their schemes.
C.2. Considerations for producers C.2. Considerations for Producers
Interoperability for all XML MIME entities is maximized by the use of Interoperability for all XML MIME entities is maximized by the use of
UTF-8, without a BOM. When UTF-8 is _not_ used, a charset parameter UTF-8, without a BOM. When UTF-8 is _not_ used, a charset parameter
and/or a BOM improve interoperability, particularly when XML-unaware and/or a BOM improve interoperability, particularly when XML-unaware
consumers may be involved. consumers may be involved.
In the very rare case where the substantive content of a non-UNICODE In the very rare case where the substantive content of a non-UNICODE
XML external parsed entity begins with the hexadecimal octet XML external parsed entity begins with the hexadecimal octet
sequences 0xFE 0xFF, 0xFF 0xFE or 0xEF 0xBB 0xBF, including an XML sequences 0xFE 0xFF, 0xFF 0xFE or 0xEF 0xBB 0xBF, including an XML
text declaration will forestall the mistaken detection of a BOM. text declaration will forestall the mistaken detection of a BOM.
The use of UTF-32 for XML MIME entities puts interoperability at very The use of UTF-32 for XML MIME entities puts interoperability at very
high risk. high risk.
Web-server configurations which supply default charset parameters Web-server configurations that supply default charset parameters risk
risk misrepresenting XML MIME entities. Allowing users to control misrepresenting XML MIME entities. Allowing users to control the
the value of charset parameters improves interoperability. value of charset parameters improves interoperability.
Supplying a mistaken charset parameter is worse than supplying none Supplying a mistaken charset parameter is worse than supplying none
at all. In particular, generic processors such as transcoders, when at all. In particular, generic processors such as transcoders, when
processing based on a mistaken charset parameter, if they do not fail processing based on a mistaken charset parameter, if they do not fail
altogether are likely to produce arbitrarily bogus results from which altogether are likely to produce arbitrarily bogus results from which
the original is not recoverable. the original is not recoverable.
C.3. Considerations for consumers C.3. Considerations for Consumers
Consumers of XML MIME entities can maximize interoperability by Consumers of XML MIME entities can maximize interoperability by
1. Taking a BOM as authoritative if it is present in an XML MIME 1. Taking a BOM as authoritative if it is present in an XML MIME
entity; entity;
2. In the absence of a BOM, taking a charset parameter as 2. In the absence of a BOM, taking a charset parameter as
authoritative if it is present. authoritative if it is present.
Assuming a default character encoding in the absence of a charset Assuming a default character encoding in the absence of a charset
parameter harms interoperability. parameter harms interoperability.
Although support for UTF-32 is not required by [XML] itself, and this Although support for UTF-32 is not required by [XML] itself, and this
specification deprecates its use, consumers which check for UTF-32 specification deprecates its use, consumers that check for UTF-32
BOMs can thereby avoid mistakenly processing UTF-32 entities as BOMs can thereby avoid mistakenly processing UTF-32 entities as
(invalid) UTF-16 entities. (invalid) UTF-16 entities.
Appendix D. Changes from RFC 3023 Appendix D. Changes from RFC 3023
There are numerous and significant differences between this There are numerous and significant differences between this
specification and [RFC3023], which it obsoletes. This appendix specification and [RFC3023], which it obsoletes. This appendix
summarizes the major differences only. summarizes the major differences only.
XPointer ([XPointerFramework] and [XPointerElement]) has been XPointer ([XPointerFramework] and [XPointerElement]) has been
skipping to change at page 33, line 4 skipping to change at page 34, line 40
There are numerous and significant differences between this There are numerous and significant differences between this
specification and [RFC3023], which it obsoletes. This appendix specification and [RFC3023], which it obsoletes. This appendix
summarizes the major differences only. summarizes the major differences only.
XPointer ([XPointerFramework] and [XPointerElement]) has been XPointer ([XPointerFramework] and [XPointerElement]) has been
added as fragment identifier syntax for all the XML media types, added as fragment identifier syntax for all the XML media types,
and the XPointer Registry ([XPtrReg]) mentioned and the XPointer Registry ([XPtrReg]) mentioned
[XMLBase] has been added as a mechanism for specifying base URIs [XMLBase] has been added as a mechanism for specifying base URIs
The language regarding character sets was updated to correspond to The language regarding character sets was updated to correspond to
the W3C TAG finding Internet Media Type registration, consistency the W3C TAG finding Internet Media Type registration, consistency
of use [TAGMIME] of use [TAGMIME]
Priority is now given to a Byte Order Mark (BOM) if present Priority is now given to a BOM if present
Many references are updated, and the existence of XML 1.1 and Many references are updated, and the existence of XML 1.1 and
relevance of this specification to it acknowledged relevance of this specification to it acknowledged
A number of justifications and contextualizations which were A number of justifications and contextualizations that were
appropriate when XML was new have been removed, including the appropriate when XML was new have been removed, including the
whole of the original Appendix A whole of the original Appendix A
Appendix E. Acknowledgements Appendix E. Acknowledgements
MURATA Makoto (FAMILY Given) and Alexey Melnikov made early and MURATA Makoto (FAMILY Given) and Alexey Melnikov made early and
important contributions to the effort to revise [RFC3023]. important contributions to the effort to revise [RFC3023].
This specification reflects the input of numerous participants to the This specification reflects the input of numerous participants to the
ietf-xml-mime@imc.org, xml-mime@ietf.org and apps-discuss@ietf.org ietf-xml-mime@imc.org, xml-mime@ietf.org, and apps-discuss@ietf.org
mailing lists, though any errors are the responsibility of the mailing lists, though any errors are the responsibility of the
authors. Special thanks to: authors. Special thanks to:
Mark Baker, James Clark, Dan Connolly, Martin Duerst, Ned Freed, Mark Baker, James Clark, Dan Connolly, Martin Duerst, Ned Freed,
Yaron Goland, Bjoern Hoehrmann, Rick Jelliffe, Murray S. Kucherawy, Yaron Goland, Bjoern Hoehrmann, Rick Jelliffe, Murray S. Kucherawy,
Larry Masinter, David Megginson, S. Moonesamy, Keith Moore, Chris Larry Masinter, David Megginson, S. Moonesamy, Keith Moore, Chris
Newman, Gavin Nicol, Julian Reschke, Marshall Rose, Jim Whitehead, Newman, Gavin Nicol, Julian Reschke, Marshall Rose, Jim Whitehead,
Erik Wilde and participants of the XML activity and the TAG at the Erik Wilde, and participants of the XML activity and the TAG at the
W3C. W3C.
Jim Whitehead and Simon St. Laurent were editors of [RFC2376] and Jim Whitehead and Simon St. Laurent were editors of [RFC2376] and
[RFC3023], respectively. [RFC3023], respectively.
Authors' Addresses Authors' Addresses
Henry S. Thompson Henry S. Thompson
University of Edinburgh University of Edinburgh
Email: ht@inf.ed.ac.uk EMail: ht@inf.ed.ac.uk
URI: http://www.ltg.ed.ac.uk/~ht/ URI: http://www.ltg.ed.ac.uk/~ht/
Chris Lilley Chris Lilley
World Wide Web Consortium World Wide Web Consortium
2004, Route des Lucioles - B.P. 93 06902 2004, Route des Lucioles - B.P. 93 06902
Sophia Antipolis Cedex Sophia Antipolis Cedex
France France
Email: chris@w3.org EMail: chris@w3.org
URI: http://www.w3.org/People/chris/ URI: http://www.w3.org/People/chris/
 End of changes. 180 change blocks. 
355 lines changed or deleted 371 lines changed or added

This html diff was produced by rfcdiff 1.41. The latest version is available from http://tools.ietf.org/tools/rfcdiff/