Content Type Xml
XML Media Types Network Working Group H. Thompson Internet-Draft University of Edinburgh Obsoletes: (if approved) C. Lilley Updates: (if approved) W3C Intended status: Standards Track February 23, 2014 Expires: August 27, 2014 XML Media Types draft-ietf-appsawg-xml-mediatypes-08 This specification standardizes three media types - application/xml, application/xml-external-parsed-entity, and application/xml-dtd - for use in exchanging network entities that are related to the Extensible Markup Language (XML) while defining text/xml and text/xml-external-parsed-entity as aliases for the respective application/ types.
Complex Types with Mixed Content. An XML element, 'letter', that contains both text and other elements. And let the 'letter' element have a type attribute that.
This specification also standardizes the '+xml' suffix for naming media types outside of these five types when those media types represent XML MIME entities. This Internet-Draft is submitted in full conformance with the 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. Internet-Drafts are draft documents valid for a maximum of six months and may be updated, replaced, or obsoleted by other documents at any time. It is inappropriate to use Internet-Drafts as reference material or to cite them other than as “work in progress”.
This Internet-Draft will expire on August 27, 2014. Copyright © 2014 IETF Trust and the persons identified as the document authors. All rights reserved.
This document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents in effect on the date of publication of this document. Please review these documents carefully, as they describe your rights and restrictions with respect to this document. Code Components extracted from this document must include Simplified BSD License text as described in Section 4.e of the Trust Legal Provisions and are provided without warranty as described in the Simplified BSD License. This document may contain material from IETF Documents or IETF Contributions published or made publicly available before November 10, 2008. The person(s) controlling the copyright in some of this material may not have granted the IETF Trust the right to allow modifications of such material outside the IETF Standards Process. Without obtaining an adequate license from the person(s) controlling the copyright in such materials, this document may not be modified outside the IETF Standards Process, and derivative works of it may not be created outside the IETF Standards Process, except to format it for publication as an RFC or to translate it into languages other than English.
The World Wide Web Consortium has issued the XML and XML1.1 specifications. To enable the exchange of XML network entities, this specification standardizes three media types - application/xml, application/xml-external-parsed-entity, and application/xml-dtd and two aliases - text/xml and text/xml-external-parsed-entity, as well as a naming convention for identifying XML-based MIME media types (using '+xml'). XML has been used as a foundation for other media types, including types in every branch of the IETF media types tree.
To facilitate the processing of such types, and in line with the recognition in of structured syntax name suffixes, a suffix of '+xml' is described in. This will allow generic XML-based tools - browsers, editors, search engines, and other processors - to work with all XML-based media types. This specification replaces. Major differences are in the areas of alignment of text/xml and text/xml-external-parsed-entity with application/xml and application/xml-external-parsed-entity respectively, the addition of XPointer and XML Base as fragment identifiers and base URIs, respectively, integration of the XPointer Registry and updating of many references. Characters, Encodings, Charsets Both XML (in an XML or Text declaration using the encoding pseudo- attribute) and MIME (in a Content-Type header field using the charset parameter) use a common set of labels to identify the MIME charset (mapping from byte stream to character sequence ). In this specification we will use the phrases 'charset parameter' and 'encoding declaration' to refer to whatever MIME charset is specified by a MIME charset parameter or XML encoding declaration respectively. We reserve the phrase 'character encoding' (or, when the context makes the intention clear, simply 'encoding') for the MIME charset actually used in a particular XML MIME entity.
Defines three 'encoding forms', which are independent of serialization, namely UTF-8, UTF-16 and UTF-32. This specification follows this precedent.
Furthermore, note that UTF-16 XML documents may be 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-16le'. As UTF-8 can only be serialized in one way, the only possible label for UTF-8-encoded documents when serialised into MIME entities is 'utf-8'. Namely UTF-8, UTF-16, and 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 entities is 'utf-8'. UTF-16 XML documents, however, can be 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-16le'. UTF-32 has four potential serializations, of which only two (UTF-32BE and UTF-32LE) are given names in in. Support for the various serializations varies widely, and security concerns about their use have been raised.
The use of UTF-32 is NOT RECOMMENDED for XML MIME entities. MIME Entities, XML Entities As sometimes happens between two communities, both MIME and XML have defined the term entity, with different meanings.
Section 2.4 of says:. 'The term 'entity' refers specifically to the MIME-defined header fields and contents of either a message or one of the parts in the body of a multipart entity.' Section 4 of says:.
'An XML document may consist of one or many storage units. These are called entities; they all have content and are all (except for the document entity and the external DTD subset) identified by entity name'. In this specification, 'XML MIME entity' is defined as the latter (an XML entity) encapsulated in the former (a MIME entity). Furthermore, XML provides for the naming and referencing of entities for purposes of inclusion and/or substitution. In this specification 'XML-entity declaration/reference/.' Is used to avoid confusion when referring to such cases.
The registrations below all address issues around character encoding in the same way, by referencing this section. As many as three distinct sources of information about character encoding may be present for an XML MIME entity: a charset parameter, a Byte Order Mark (BOM - see below) and an XML encoding declaration (see Section 4.3.3 of ). Ensuring consistency among these sources requires coordination between entity authors and MIME agents (that is, processes which package, transfer, deliver and/or receive MIME entities). The use of UTF-8, without a BOM, is RECOMMENDED for all XML MIME entities.
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 encoding declaration (or its absence). All three sources of information about encoding are available to them, and they can be expected to be aware of this spec. Others Other MIME agents, while comforming to this and other media type registrations, will not be XML-aware, and thus cannot know anything about the XML encoding declaration.
Header Content Type Xml
Not only do they lack one of the three sources of information about encoding, they are also less likely to be aware of or responsive to this spec. Some MIME agents, such as proxies and transcoders, both consume and produce MIME entities. This mixture of two kinds of agents handling XML MIME entities increases the complexity of the coordination task. The recommendations given below are intended to maximise interoperability in the face of this, by on the one hand mandating consistent production and encouraging maximally robust forms of production, and on the other specifying recovery strategies to maximize the interoperability of consumers when the production rules are broken. XML-aware MIME producers SHOULD supply a charset parameter and/or an appropriate BOM with non-UTF-8-encoded XML MIME entities which lack an encoding declaration, and SHOULD remove or correct an encoding declaration which is known to be incorrect (for example, as a result of transcoding).
XML-aware MIME producers MUST supply an XML text declaration at the beginning of non-UNICODE XML external parsed entities which would otherwise begin with the hexadecimal octet sequences 0xFE 0xFF, 0xFF 0xFE or 0xEF 0xBB 0xBF, in order to avoid the mistaken detection of a BOM. XML-unaware MIME producers MUST NOT supply a charset parameter with an XML MIME entity unless the entity's character encoding is reliably known. Note that this is particularly relevant for central configuration of web servers, where configuring a default for the charset parameter will almost certainly violate this requirement. XML MIME producers are RECOMMENDED to provide means for XML MIME entity authors to determine what value, if any, is given to charset parameters for their entities, for example by enabling user-level configuration of for users to control what value, if any, is given to charset parameters for XML MIME entities, for example by giving users control of the configuration of Web server filename-to-Content-Type-header mappings on a file-by-file or suffix basis. The use of UTF-32 is NOT RECOMMENDED for XML MIME entities.
XML MIME consumers For XML MIME consumers, the question of priority arises in cases when the available character encoding information is not consistent. Again, we must distinguish betweeen XML-aware and XML-unaware agents. When a charset parameter is specified for an XML MIME entity, the normative component of the XML specification leaves the question 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 entity contains in-band encoding information, that is, either a BOM or an XML encoding declaration, or both, or neither.
In particular, in the case where there is in-band information and it conflicts with the charset parameter, the specification does not specify which is authoritative. In its (non-normative) Appendix F it defers to this specification: The preferred method of handling conflict should be specified as part of the higher-level protocol used to deliver XML.
In particular, please refer to IETF RFC 3023 or its successor Accordingly, to conform with deployed processors and content and to avoid conflicting with this or other normative specifications, this specification sets the priority as follows:. A ll consumers SHOULD treat a BOM as is authoritative if it is present in an XML MIME entity;. In the absence of a BOM , all consumers SHOULD treat the charset parameter as is authoritative if it is present. Whenever the above determines a source of encoding information as authoritative, consumers SHOULD process XML MIME entities based on that information. When MIME producers conform to the requirements stated above (, ) inconsistencies will not arise-the above statement of priorities only has practical impact in the case of non-conforming XML MIME entities. In the face of inconsistencies, no uniform strategy can deliver the 'right' answer every time: the purpose of specifying one here is to encourage convergence over time, first on the part of consumers, then on the part of producers. For XML-aware consumers, note that Section 4.3.3 of does not make it an error for the charset parameter and the XML encoding declaration (or the UTF-8 default in the absence of encoding declaration and BOM) to be inconsistent, although such consumers might choose to issue a warning in this case.
If an XML MIME entity is received where the charset parameter is omitted, no information is being provided about the character encoding by the MIME Content-Type header. XML-aware consumers MUST follow the requirements in section 4.3.3 of that directly address this case. XML-unaware MIME consumers SHOULD NOT assume a default encoding in this case. Section 4.3.3 of specifies that UTF-16 XML MIME entities not labelled as 'utf-16le' or 'utf16-be' MUST begin with a byte order mark (BOM), U+FEFF, which appears as the hexadecimal octet sequence 0xFE 0xFF (big-endian) or 0xFF 0xFE (little-endian). Further states that the BOM is an encoding signature, and is not part of either the markup or the character data of the XML document.
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 conversion. Similarly, when converting from another encoding into 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 was already present, in which case it MUST be transcoded into the appropriate UTF-16 BOM. Section 4.3.3 of also allows for UTF-8 XML MIME entities to begin with a BOM, which appears as the hexadecimal octet sequence 0xEF 0xBB 0xBF. This is likewise defined to be an encoding signature, and not part of either the markup or the character data of the XML document. Applications that convert XML from UTF-8 to an encoding other than UTF-16 MUST strip the BOM, if present, before conversion.
Applications which convert XML into UTF-8 MAY add a BOM. In addition to the MIME charset 'utf-16', introduces 'utf-16le' (little endian) and 'utf-16be' (big endian).
The BOM is prohibited in MIME entities with these labels. When an XML MIME entity is encoded in 'utf-16le' or 'utf-16be', it MUST NOT begin with the BOM but SHOULD contain an in-band XML encoding declaration. 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, and conversion in the other direction MUST (for UTF-16) or MAY (for UTF-8) add the appropriate BOM. Appendix F of also implies the a UTF-32 BOM may be used in conjunction with UTF-32-encoded documents.
As noted above, this specification recommends against the use of UTF-32, but if it is used, the same considerations apply with respect to its being a signature, not part of the document, with respect to transcoding into or out of it and with respect to the MIME charsets 'utf-32le' and 'utf-32be', as for UTF-16. Consumers which do not support UTF-32 SHOULD none-the-less recognise UTF-32 signatures in order to give helpful error messages (instead of treating them as invalid UTF-16). Within the XML specification, XML MIME entities can be classified into four types. In the XML terminology, they are called 'document entities', 'external DTD subsets', 'external parsed entities', and 'external parameter entities'. Appropriate usage for the types registered below is as follows: document entities: The media types application/xml or text/xml, or a more specific media type (see ), SHOULD be used. External DTD subsets: The media type application/xml-dtd SHOULD be used.
The media types application/xml and text/xml MUST NOT be used. External parsed entities: The media types application/xml-external-parsed-entity or text/xml-external-parsed-entity SHOULD be used. The media types application/xml and text/xml MUST NOT be used unless the parsed entities are also well-formed 'document entities'. External parameter entities: The media type application/xml-dtd SHOULD be used. The media types application/xml and text/xml MUST NOT be used. Note that (which this specification obsoletes) recommended the use of text/xml and text/xml-external-parsed-entity for document entities and external parsed entities, respectively, but described handling of character encoding which differed from common implementation practice. These media types are still commonly used, and this specification aligns the handling of character encoding with industry practice.
Note that (which is obsolete) allowed application/xml and text/xml to be used for any of the four types, although in practice it is likely to have been rare. Neither external DTD subsets nor external parameter entities parse as XML documents, and while some XML document entities may be used as external parsed entities and vice versa, there are many cases where the two are not interchangeable. XML also has unparsed entities, internal parsed entities, and internal parameter entities, but they are not XML MIME entities. Compared to or, this specification alters the handling of character encoding of text/xml and text/xml-external-parsed-entity, treating them no differently from the respective application/ types.
However application/xml and application/xml-external-parsed-entity are still RECOMMENDED, to avoid possible confusion based on the earlier distinction. The former confusion around the question of default character sets for the two text/ types no longer arises because. changes by removing the ISO-8859-1 default and not defining any default at all;. updates to remove the US-ASCII default.
See for the now-unified approach to the charset parameter which results. XML provides a general framework for defining sequences of structured data. It is often appropriate to define new media types that use XML but define a specific application of XML, due to domain-specific display, editing, security considerations or runtime information. Furthermore, such media types may allow only UTF-8 and/or UTF-16 and prohibit other character sets. This specification does not prohibit such media types and in fact expects them to proliferate. However, developers of such media types are RECOMMENDED to use this specification as a basis for their registration. See for more detailed recommendations on using the '+xml' suffix for registration of such media types.
An XML document labeled as application/xml or text/xml, or with a '+xml' media type, might contain namespace declarations, stylesheet-linking processing instructions (PIs), schema information, or other declarations that might be used to suggest how the document is to be processed. For example, a document might have the XHTML namespace and a reference to a CSS stylesheet. Such a document might be handled by applications that would use this information to dispatch the document for appropriate processing. Lists the core XML specifications which, taken together with itself, show how to determine an XML document's language-level semantics and suggest how information about its application-level semantics may be locatable.
Content Type Xml
Type name: application Subtype name: xml Required parameters: none Optional parameters: charset. See. Encoding considerations: Depending on the character encoding used, XML MIME entities can consist of 7bit, 8bit or binary data. For 7-bit transports, 7bit data, for example US-ASCII-encoded data, does not require content-transfer-encoding, but 8bit or binary data, for example UTF-8 or UTF-16 data, MUST be content-transfer-encoded in quoted-printable or base64. For 8-bit clean transport (e.g. RFC6152 or RFC3977), 7bit or 8bit data, for example US-ASCII or UTF-8 data, does not require content-transfer-encoding, but binary data, for example data with a UTF-16 encoding, MUST be content-transfer-encoded in base64.
For binary clean transports (e.g. RFC3030 or HTTPbis), no content-transfer-encoding is necessary (or even possible, in the case of HTTP) for 7bit, 8bit or binary data.
Security considerations: See. Interoperability considerations: XML has proven to be interoperable across both generic and task-specific applications and for import and export from multiple XML authoring and editing tools. Validating processors provide maximum interoperability. Although non-validating processors may be more efficient, they are not required to handle all features of XML. For further information, see sub-section 2.9 'Standalone Document Declaration' and section 5 'Conformance' of. In practice, character set issues have proved to be the biggest source of interoperability problems.
The use of UTF-8, and careful attention to the guidelines set out in, are the best way to avoid such problems. Published specification: XML or subsequent editions or versions thereof. Applications that use this media type: XML is device-, platform-, and vendor-neutral and is supported by generic and task-specific applications and a wide range of generic XML tools (editors, parsers, Web agents.). Additional information: Magic number(s): None. Although no byte sequences can be counted on to always be present, XML MIME entities in ASCII-compatible character sets (including UTF-8) often begin with hexadecimal 3C 3F 78 6D 6C ('. Type name: application Subtype name: xml-external-parsed-entity Required parameters: none Optional parameters: charset.
Xml Mime Content Type
See. Encoding considerations: Same as for application/xml. Security considerations: See.
Interoperability considerations: XML external parsed entities are as interoperable as XML documents, though they have a less tightly constrained structure and therefore need to be referenced by XML documents for proper handling by XML processors. Similarly, XML documents cannot be reliably used as external parsed entities because external parsed entities are prohibited from having standalone document declarations or DTDs.
Identifying XML external parsed entities with their own content type enhances interoperability of both XML documents and XML external parsed entities. Published specification: Same as for application/xml. Applications which use this media type: Same as for application/xml.
Additional information: Magic number(s): Same as for application/xml. File extension(s):.xml or.ent Macintosh File Type Code(s): 'TEXT' Base URI: See Person and email address for further information: See Authors' Addresses section. Intended usage: COMMON Author: See Authors' Addresses section.
Change controller: The XML specification is a work product of the World Wide Web Consortium's XML Core Working Group. The W3C has change control over this specification. Application/xml-dtd Registration Type name: application Subtype name: xml-dtd Required parameters: none Optional parameters: charset. See.
Encoding considerations: Same as for application/xml. Security considerations: See. Interoperability considerations: XML DTDs have proven to be interoperable by DTD authoring tools and XML validators, among others. Published specification: Same as for application/xml.
Applications which use this media type: DTD authoring tools handle external DTD subsets as well as external parameter entities. XML validators may also access external DTD subsets and external parameter entities. Additional information: Magic number(s): Same as for application/xml. File extension(s):.dtd or.mod Macintosh File Type Code(s): 'TEXT' Person and email address for further information: See Authors' Addresses section.
Intended usage: COMMON Author: See Authors' Addresses section. Change controller: The XML specification is a work product of the World Wide Web Consortium's XML Core Working Group. The W3C has change control over this specification. Uniform Resource Identifiers (URIs) can contain fragment identifiers (see Section 3.5 of ).
Specifying the syntax and semantics of fragment identifiers is devolved by to the appropriate media type registration. The syntax and semantics of fragment identifiers for the XML media types defined in this specification are based on the W3C Recommendation. It allows simple names, and more complex constructions based on named schemes. When the syntax of a fragment identifier part of any URI or IRI with a retrieved media type governed by this specification conforms to the syntax specified in, conforming applications MUST interpret such fragment identifiers as designating whatever is specified by the together with any other specifications governing the XPointer schemes used in those identifiers which the applications support. Conforming applications MUST support the 'element' scheme as defined in, but need not support other schemes.
If an XPointer error is reported in the attempt to process the part, this specification does not define an interpretation for the part. A XPtrReg is maintained at the W3C.
Document authors SHOULD NOT use unregistered schemes. Scheme authors SHOULD register their schemes ( describes requirements and procedures for doing so). See for additional requirements which apply when an XML-based media type follows the naming convention '+xml'. If and are inappropriate for some XML-based media type, it SHOULD NOT follow the naming convention '+xml'.
When a URI has a fragment identifier, it is encoded by a limited subset of the repertoire of US-ASCII characters, see for details. An XML MIME entity of type application/xml, text/xml, application/xml-external-parsed-entity or text/xml-external-parsed-entity MAY use the xml:base attribute, as described in, to embed a base URI in that entity for use in resolving relative URI references (see Section 5.1 of ). 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 specified in an external DTD subset or external parameter entity. Since conforming XML processors need not always read and process external entities, the effect of such an external default is uncertain and therefore its use is NOT RECOMMENDED. Application/xml, application/xml-external-parsed-entity, and application/xml-dtd, text/xml and text/xml-external-parsed-entity are to be used with. In all examples herein where version='1.0' is shown, it is understood that version='1.1' might also appear, providing the content does indeed conform to.
The normative requirement of this specification upon XML documents and processors is to follow the requirements of, section 4.3.3. Except for minor clarifications, that section is substantially identical from the first edition to the current (5th) edition of XML 1.0, and for XML 1.1 1st or 2nd edition. Therefore, references herein to may be interpreted as referencing any existing version or edition of XML, or any subsequent edition or version which makes no incompatible changes to that section.
Specifications and recommendations based on or referring to this RFC SHOULD indicate any limitations on the particular versions or editions of XML to be used. This section supersedes RFC6839. This specification recommends the use of the '+xml' naming convention for identifying XML-based media types, in line with the recognition in of structured syntax name suffixes. This allows the use of generic XML processors and technologies on a wide variety of different XML document types at a minimum cost, using existing frameworks for media type registration. See for guidance on when and how to register a '+xml'-based media subtype, and on registering a media subtype for XML but not using '+xml'. +xml Structured Syntax Suffix Registration Name: Extensible Markup Language (XML) +suffix: +xml Reference: This specification Encoding considerations: Same as.
Fragment identifier considerations: Registrations which use this '+xml' convention MUST also make reference to RFC XXXX, specifically, in specifying fragment identifier syntax and semantics, and they MAY restrict the syntax to a specified subset of schemes, except that they MUST NOT disallow barenames or 'element' scheme pointers. They MAY further require support for other registered schemes. They also MAY add additional syntax (which MUST NOT overlap with syntax) together with associated semantics, and MAY add additional semantics for barename XPointers which, as provided for in, will only apply when this specification does not define an interpretation. In practice these constraints imply that for a fragment identifier addressed to an instance of a specific 'xxx/yyy+xml' type, there are three cases:. For fragment identifiers matching the syntax defined in, where the fragment identifier resolves per the rules specified there, then process as specified there;. For fragment identifiers matching the syntax defined in, where the fragment identifier does not resolve per the rules specified there, then process as specified in 'xxx/yyy+xml';. For fragment identifiers not matching the syntax defined in, then process as specified in 'xxx/yyy+xml'.
A fragment identifier of the form 'xywh=160,120,320,240', as defined in, which might be used in a URI for an XML-encoded image, would fall in this category. Interoperability considerations: Same as. See above, and also, for guidelines on the use of the 'charset' parameter.
Security considerations: See. Contact: See Authors' Addresses section. Author: See Authors' Addresses section. Change controller: The XML specification is a work product of the World Wide Web Consortium's XML Core Working Group. The W3C has change control over this specification.
Content-Type: application/xml; charset=utf-8 or UTF-8 is the recommended encoding for use with all the media types defined in this specification. Since the charset parameter is provided and there is no overriding BOM, both conformant MIME and XML processors must treat the enclosed entity as UTF-8 encoded. If sent using a 7-bit transport (e.g.
RFC5321), in general, a 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. 8BITMIME ESMTP or NNTP), or a binary clean transport (e.g. BINARY ESMTP or HTTP), no content-transfer-encoding is necessary (or even possible, in the case of HTTP). As described in, the UTF-16 family must not be used with media types under the top-level type 'text' except over HTTP or HTTPS (see section A.2 of HTTPbis for details). Hence one of the two text/ media types defined above can be used with this exampleonly 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 perform CR and LF transformations and allow NUL octets. Since HTTP is binary clean, no content-transfer-encoding is necessary (or even possible).
Omitted Charset, no Internal Encoding Declaration Content-Type: application/xml In this example, the charset parameter has been omitted, there is no internal encoding declaration, and there is no BOM. Since there is no BOM or charset parameter, the XML processor follows the requirements in section 4.3.3, and optionally applies the mechanism described in Appendix F (which is non-normative) of to determine an encoding of UTF-8. Although the XML MIME entity does not contain an encoding declaration, provided the encoding actually is UTF-8, this is a conforming XML MIME entity. An A conformant XML-unaware MIME processor should make no assumptions about the character encoding of the XML MIME entity. See for transport-related issues for UTF-8 XML MIME entities.
Non-UTF Charset Content-Type: application/xml; charset=iso-2022-kr 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 character encodings). Since the charset parameter is provided and there is no overriding BOM, all conformant processors must treat the enclosed entity as encoded per RFC 1557. Since ISO-2022-KR has been defined to use only 7 bits of data, no content-transfer-encoding is necessary with any transport: for character sets needing 8 or more bits, considerations such as those discussed above (, ) would apply. INCONSISTENT EXAMPLE: Conflicting Charset and Internal Encoding Declaration Content-Type: application/xml; charset=iso-8859-1 Although the charset parameter is provided in the Content-Type header and there is no BOM and the charset parameter differs from the XML encoding declaration, conformant MIME and XML processors will interoperate. Since the charset parameter is authoritative in the absence of a BOM, all conformant processors will treat the enclosed entity as iso-8859-1 encoded.
That is, the 'UTF-8' encoding declaration will be ignored. Processors Conformant processors generating XML MIME entities must not label conflicting character encoding information between the MIME Content-Type and the XML declaration unless they have definitive information about the actual encoding, for example as a result of systematic transcoding. In particular, the addition by servers of an explicit, site-wide charset parameter default has frequently lead to interoperability problems for XML documents. Using '+xml' when Registering XML-based Media Types 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 processing is in some way inappropriate for documents of the new type. This convention will allow applications that can process XML generically to detect that the MIME entity is supposed to be an XML document, verify this assumption by invoking some XML processor, and then process the XML document accordingly.
Applications may check for types that represent XML MIME entities by comparing the last four characters of the subtype to the string '+xml'. (However note that 4 of the 5 media types defined in this specification - text/xml, application/xml, text/xml-external-parsed-entity, and application/xml-external-parsed-entity - also represent XML MIME entities while not ending with '+xml'.). NOTE: Section 5.3.2 of HTTPbis does not support any form of Accept header which will match only '+xml' types. In particular, Accept headers of the form 'Accept:./.+xml' are not allowed, and so this header MUST NOT be used for this purpose. Media types following the naming convention '+xml' SHOULD introduce the charset parameter for consistency, since XML-generic processing applies the same program for any such media type. However, there are some cases that the charset parameter need not be introduced. For example:.
When an XML-based media type is restricted to UTF-8, it is not necessary to introduce the charset parameter. UTF-8 is the default for XML. 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 UTF-8 nor UTF-16 require XML encoding declarations. XML generic processing is not always appropriate for XML-based media types. For example, authors of some such media types may wish that the types remain entirely opaque except to applications that are specifically designed to deal with that media type. By NOT following the naming convention '+xml', such media types can avoid XML-generic processing.
Download Game PC Gratis bisa kalian dapatkan dengan mudah dan yang pastinya banyak sekali game pc ringan yang saya bagikan untuk kalian. Tempat download game pc gratis.
Since generic processing will be useful in many cases, however - including in some situations that are difficult to predict ahead of time - the '+xml' convention is to be preferred unless there is some particularly compelling reason not to. The registration process for specific '+xml' media types is described in.
The registrar for the IETF tree will encourage new XML-based media type registrations in the IETF tree to follow this guideline. Registrars for other trees SHOULD follow this convention in order to ensure maximum interoperability of their XML-based documents. Media Only media subtypes that do not represent XML MIME entities MUST NOT be are allowed to register with a '+xml' suffix.
In addition to the changes described above, the change controller has been changed to be the World Wide Web Consortium (W3C). Registrations for new XML-based media types which do not use the '+xml' suffix SHOULD, in specifying the charset parameter and encoding considerations, define them as: 'Same as charset parameter / encoding considerations of application/xml as specified in RFC XXXX.' Enabling the charset parameter is RECOMMENDED, since this information can be used by XML processors to determine authoritatively the 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 included as part of the registration.
As shown above, two such reasons are 'UTF-8 only' or 'UTF-8 or UTF-16 only'. These registrations SHOULD specify that the XML-based media type being registered has all of the security considerations described in RFC XXXX plus any additional considerations specific to that media type. These registrations SHOULD also make reference to RFC XXXX in specifying magic numbers, base URIs, and use of the BOM. These registrations MAY reference the application/xml registration in RFC XXXX in specifying interoperability and fragment identifier considerations, if these considerations are not overridden by issues specific to that media type. Changes from RFC 3023 There are numerous and significant differences between this specification and, which it obsoletes. This appendix summarizes the major differences only.
Acknowledgements MURATA Makoto (FAMILY Given) and Alexey Melnikov made early and important contributions to the effort to revise. This specification reflects the input of numerous participants to the ietf-xml-mime@imc.org, xml-mime@ietf.org and apps-discuss@ietf.org mailing lists, though any errors are the responsibility of the authors. Special thanks to: Mark Baker, James Clark, Dan Connolly, Martin Duerst, Ned Freed, Yaron Goland, Bjoern Hoehrmann, Rick Jelliffe, Murray S. Kucherawy, Larry Masinter, David Megginson, S. Moonesamy, Keith Moore, Chris Newman, Gavin Nicol, Julian Reschke, Marshall Rose, Jim Whitehead, Erik Wilde and participants of the XML activity and the TAG at the W3C. Jim Whitehead and Simon St.Laurent were editors of and, respectively.
Here is a list of MIME types, associated by type of documents, ordered by their common extensions. Two primary MIME types are important for the role of default types:.
text/plain is the default value for textual files. A textual file should be human-readable and must not contain binary data.
application/octet-stream is the default value for all other cases. An unknown file type should use this type. Browsers pay a particular care when manipulating these files, attempting to safeguard the user to prevent dangerous behaviors. IANA is the official registry of MIME media types and maintains a.