cdocutils.nodes document q)q}q(U nametypesq}q(Xtext/xmlqNXxml1.0qXianaqXxml 1.1q Xxml 1.0q Xrfc2616q Xrfc0020q Xrfc4627q XunicodeqXrfc2046qXapplication/jsonqNX4setting content-type and content-disposition headersqNXxml1.1qXxmlqX iana_mediaqXversion 2.0 content-typeqNX.preserving media type metadata between systemsqNXmedia type metadataqNXapplication/javascriptqNXapplication/xmlqNX w3c_headersqXrfc6657qX rfc2616-sec14qX section 3.2qXrfc6266qXversion 1.x content-typeqNX iana_charsq X text/plainq!NXrfc7303q"Xrules for various content typesq#NXrfc4180q$Xtext/javascriptq%NX spolsky2003q&Xtext/csvq'NXwhat is this thing?q(NuUsubstitution_defsq)}q*Uparse_messagesq+]q,cdocutils.nodes system_message q-)q.}q/(U rawsourceq0UU attributesq1}q2(Udupnamesq3]UlevelKUidsq4]q5Uid1q6aUbackrefsq7]q8Uid2q9aUsourceXf/var/lib/jenkins/jobs/API_Documentation_trunk/workspace/api-documentation/source/design/what_is_it.txtq:Uclassesq;]Unamesq<]UlineKsUtypeUWARNINGq=uUparentq>cdocutils.nodes list_item q?)q@}qA(h0X4The media type as provided by the producer of the object should be specified and should be preserved as part of the system metadata so that the media type may be reliably presented to downstream consumers. When specified in the ``Content-Type`` header, the media type overrides the default value present in the associated objectFormat. When present in System Metadata, that value overrides a value presented in the ``Content-Type``header. In practice, System Metadata is retrieved separately from the object, and so such an override will optional for consumers. h>cdocutils.nodes enumerated_list qB)qC}qD(h0Uh>cdocutils.nodes section qE)qF}qG(h0Uh>hE)qH}qI(h0Uh>hUsourceqJh:UtagnameqKUsectionqLh1}qM(h3]h;]h7]h4]qNUwhat-is-this-thingqOah<]qPh(auUlineqQKUdocumentqRhUchildrenqS]qT(cdocutils.nodes title qU)qV}qW(h0XWhat is This Thing?qXh>hHhJh:hKUtitleqYh1}qZ(h3]h;]h7]h4]h<]uhQKhRhhS]q[cdocutils.nodes Text q\XWhat is This Thing?q]q^}q_(h0hXh>hVubaubcdocutils.nodes paragraph q`)qa}qb(h0Xa**It does not make sense to have a string without knowing what encoding it uses** [Spolsky2003_].h>hHhJh:hKU paragraphqch1}qd(h3]h;]h7]h4]h<]uhQKhRhhS]qe(cdocutils.nodes strong qf)qg}qh(h0XQ**It does not make sense to have a string without knowing what encoding it uses**h1}qi(h3]h;]h7]h4]h<]uh>hahS]qjh\XMIt does not make sense to have a string without knowing what encoding it usesqkql}qm(h0Uh>hgubahKUstrongqnubh\X [qoqp}qq(h0X [h>haubcdocutils.nodes reference qr)qs}qt(h0X Spolsky2003_UresolvedquKh>hahKU referenceqvh1}qw(UnameX Spolsky2003UrefuriqxX3http://www.joelonsoftware.com/articles/Unicode.htmlqyh4]h7]h3]h;]h<]uhS]qzh\X Spolsky2003q{q|}q}(h0Uh>hsubaubh\X].q~q}q(h0X].h>haubeubhE)q}q(h0Uh>hHhJh:hKhLh1}q(h3]h;]h7]h4]qUmedia-type-metadataqah<]qhauhQK hRhhS]q(hU)q}q(h0XMedia Type Metadataqh>hhJh:hKhYh1}q(h3]h;]h7]h4]h<]uhQK hRhhS]qh\XMedia Type Metadataqq}q(h0hh>hubaubh`)q}q(h0XIn DataONE content may be transferred multiple times between multiple locations, and each transfer must result in an accurate representation of the original content. DataONE achieves this by transferring byte copies of content between clients and servers using the HTTP protocol, and verifying that the checksum computed by the origin matches that retrieved. Hence the bytes are accurately transferred and can be reliably transferred again by the consumer.qh>hhJh:hKhch1}q(h3]h;]h7]h4]h<]uhQK hRhhS]qh\XIn DataONE content may be transferred multiple times between multiple locations, and each transfer must result in an accurate representation of the original content. DataONE achieves this by transferring byte copies of content between clients and servers using the HTTP protocol, and verifying that the checksum computed by the origin matches that retrieved. Hence the bytes are accurately transferred and can be reliably transferred again by the consumer.qq}q(h0hh>hubaubh`)q}q(h0XIn order to properly interpret how to use the object, the consumer must know the *media type* of the object. The media type (formerly the MIME or Multipurpose Internet Mail Extensions Type) is metadata about an object that can be used by the consumer to determine what the object is. The IANA (Internet Assigned Numbers Authority [IANA_]) provides a controlled list of media types [IANA_MEDIA_] (henceforth "IANA Media Types") that are used during internet transfer of objects to inform the receiver of the type of object being transferred.h>hhJh:hKhch1}q(h3]h;]h7]h4]h<]uhQKhRhhS]q(h\XQIn order to properly interpret how to use the object, the consumer must know the qq}q(h0XQIn order to properly interpret how to use the object, the consumer must know the h>hubcdocutils.nodes emphasis q)q}q(h0X *media type*h1}q(h3]h;]h7]h4]h<]uh>hhS]qh\X media typeqq}q(h0Uh>hubahKUemphasisqubh\X of the object. The media type (formerly the MIME or Multipurpose Internet Mail Extensions Type) is metadata about an object that can be used by the consumer to determine what the object is. The IANA (Internet Assigned Numbers Authority [qq}q(h0X of the object. The media type (formerly the MIME or Multipurpose Internet Mail Extensions Type) is metadata about an object that can be used by the consumer to determine what the object is. The IANA (Internet Assigned Numbers Authority [h>hubhr)q}q(h0XIANA_huKh>hhKhvh1}q(UnameXIANAhxXhttp://www.iana.org/qh4]h7]h3]h;]h<]uhS]qh\XIANAqq}q(h0Uh>hubaubh\X.]) provides a controlled list of media types [qq}q(h0X.]) provides a controlled list of media types [h>hubhr)q}q(h0X IANA_MEDIA_huKh>hhKhvh1}q(UnameX IANA_MEDIAhxX=http://www.iana.org/assignments/media-types/media-types.xhtmlqh4]h7]h3]h;]h<]uhS]qh\X IANA_MEDIAqq}q(h0Uh>hubaubh\X] (henceforth "IANA Media Types") that are used during internet transfer of objects to inform the receiver of the type of object being transferred.qq}q(h0X] (henceforth "IANA Media Types") that are used during internet transfer of objects to inform the receiver of the type of object being transferred.h>hubeubh`)q}q(h0X.The media type can be determined several ways:qh>hhJh:hKhch1}q(h3]h;]h7]h4]h<]uhQKhRhhS]qh\X.The media type can be determined several ways:qƅq}q(h0hh>hubaubcdocutils.nodes bullet_list q)q}q(h0Uh>hhJh:hKU bullet_listqh1}q(UbulletqX*h4]h7]h3]h;]h<]uhQKhRhhS]q(h?)q}q(h0Xexamine the bytes of the objectqh>hhJh:hKU list_itemqh1}q(h3]h;]h7]h4]h<]uhQNhRhhS]qh`)q}q(h0hh>hhJh:hKhch1}q(h3]h;]h7]h4]h<]uhQKhS]qh\Xexamine the bytes of the objectqڅq}q(h0hh>hubaubaubh?)q}q(h0X&infer from the file name of the objectqh>hhJh:hKhh1}q(h3]h;]h7]h4]h<]uhQNhRhhS]qh`)q}q(h0hh>hhJh:hKhch1}q(h3]h;]h7]h4]h<]uhQKhS]qh\X&infer from the file name of the objectq慁q}q(h0hh>hubaubaubh?)q}q(h0X4additional metadata provided by the object producer h>hhJh:hKhh1}q(h3]h;]h7]h4]h<]uhQNhRhhS]qh`)q}q(h0X3additional metadata provided by the object producerqh>hhJh:hKhch1}q(h3]h;]h7]h4]h<]uhQKhS]qh\X3additional metadata provided by the object producerqq}q(h0hh>hubaubaubeubh`)q}q(h0X0The most reliable general solution is for the media type metadata to be provided by the object producer. This is especially important for ambiguous object types such as text documents since the character encoding can in many cases only be reliably determined by the application that created the document.qh>hhJh:hKhch1}q(h3]h;]h7]h4]h<]uhQK!hRhhS]qh\X0The most reliable general solution is for the media type metadata to be provided by the object producer. This is especially important for ambiguous object types such as text documents since the character encoding can in many cases only be reliably determined by the application that created the document.qq}q(h0hh>hubaubh`)q}q(h0XIn some cases, the IANA Media Type by itself does not provide sufficient information for a consumer to reliably process an object. For example a text document with IANA Media Type of ``text/plain`` may have been created using any of hundreds of character sets [IANA_CHARS_]. In these cases, an additional ``charset`` parameter is specified, and this information along with the IANA Media Type is required to properly interpret a text file.h>hhJh:hKhch1}q(h3]h;]h7]h4]h<]uhQK&hRhhS]r(h\XIn some cases, the IANA Media Type by itself does not provide sufficient information for a consumer to reliably process an object. For example a text document with IANA Media Type of rr}r(h0XIn some cases, the IANA Media Type by itself does not provide sufficient information for a consumer to reliably process an object. For example a text document with IANA Media Type of h>hubcdocutils.nodes literal r)r}r(h0X``text/plain``h1}r(h3]h;]h7]h4]h<]uh>hhS]rh\X text/plainr r }r (h0Uh>jubahKUliteralr ubh\X@ may have been created using any of hundreds of character sets [r r}r(h0X@ may have been created using any of hundreds of character sets [h>hubhr)r}r(h0X IANA_CHARS_huKh>hhKhvh1}r(UnameX IANA_CHARShxXChttp://www.iana.org/assignments/character-sets/character-sets.xhtmlrh4]h7]h3]h;]h<]uhS]rh\X IANA_CHARSrr}r(h0Uh>jubaubh\X!]. In these cases, an additional rr}r(h0X!]. In these cases, an additional h>hubj)r}r(h0X ``charset``h1}r(h3]h;]h7]h4]h<]uh>hhS]rh\Xcharsetrr }r!(h0Uh>jubahKj ubh\X{ parameter is specified, and this information along with the IANA Media Type is required to properly interpret a text file.r"r#}r$(h0X{ parameter is specified, and this information along with the IANA Media Type is required to properly interpret a text file.h>hubeubh`)r%}r&(h0X(DataONE expands on the metadata describing an object by recording additional information in :class:`Types.SystemMetadata` that accompanies every object. Amongst this additional metadata is a ``formatId`` that, like the IANA Media Type, provides a pointer to additional information (a :class:`Types.ObjectFormat`) about the object for the benefit of downstream consumers. The ``ObjectFormat`` structure is a controlled list of object classifications that augments the IANA Media Type to support use by analytical tools employed by researchers and other.h>hhJh:hKhch1}r'(h3]h;]h7]h4]h<]uhQK-hRhhS]r((h\X\DataONE expands on the metadata describing an object by recording additional information in r)r*}r+(h0X\DataONE expands on the metadata describing an object by recording additional information in h>j%ubcsphinx.addnodes pending_xref r,)r-}r.(h0X:class:`Types.SystemMetadata`r/h>j%hJh:hKU pending_xrefr0h1}r1(UreftypeXclassUrefwarnr2U reftargetr3XTypes.SystemMetadataU refdomainXpyr4h4]h7]U refexplicith3]h;]h<]Urefdocr5Xdesign/what_is_itr6Upy:classr7NU py:moduler8NuhQK-hS]r9j)r:}r;(h0j/h1}r<(h3]h;]r=(Uxrefr>j4Xpy-classr?eh7]h4]h<]uh>j-hS]r@h\XTypes.SystemMetadatarArB}rC(h0Uh>j:ubahKj ubaubh\XF that accompanies every object. Amongst this additional metadata is a rDrE}rF(h0XF that accompanies every object. Amongst this additional metadata is a h>j%ubj)rG}rH(h0X ``formatId``h1}rI(h3]h;]h7]h4]h<]uh>j%hS]rJh\XformatIdrKrL}rM(h0Uh>jGubahKj ubh\XQ that, like the IANA Media Type, provides a pointer to additional information (a rNrO}rP(h0XQ that, like the IANA Media Type, provides a pointer to additional information (a h>j%ubj,)rQ}rR(h0X:class:`Types.ObjectFormat`rSh>j%hJh:hKj0h1}rT(UreftypeXclassj2j3XTypes.ObjectFormatU refdomainXpyrUh4]h7]U refexplicith3]h;]h<]j5j6j7Nj8NuhQK-hS]rVj)rW}rX(h0jSh1}rY(h3]h;]rZ(j>jUXpy-classr[eh7]h4]h<]uh>jQhS]r\h\XTypes.ObjectFormatr]r^}r_(h0Uh>jWubahKj ubaubh\X@) about the object for the benefit of downstream consumers. The r`ra}rb(h0X@) about the object for the benefit of downstream consumers. The h>j%ubj)rc}rd(h0X``ObjectFormat``h1}re(h3]h;]h7]h4]h<]uh>j%hS]rfh\X ObjectFormatrgrh}ri(h0Uh>jcubahKj ubh\X structure is a controlled list of object classifications that augments the IANA Media Type to support use by analytical tools employed by researchers and other.rjrk}rl(h0X structure is a controlled list of object classifications that augments the IANA Media Type to support use by analytical tools employed by researchers and other.h>j%ubeubh`)rm}rn(h0XIn this manner the combination of an object and it's System Metadata provides the information necessary for a consumer to discern what the object is and so what applications might be used to ingest the object.roh>hhJh:hKhch1}rp(h3]h;]h7]h4]h<]uhQK6hRhhS]rqh\XIn this manner the combination of an object and it's System Metadata provides the information necessary for a consumer to discern what the object is and so what applications might be used to ingest the object.rrrs}rt(h0joh>jmubaubeubhFhE)ru}rv(h0Uh>hHhJh:hKhLh1}rw(h3]h;]h7]h4]rxU4setting-content-type-and-content-disposition-headersryah<]rzhauhQKhRhhS]r{(hU)r|}r}(h0X4Setting Content-Type and Content-Disposition Headersr~h>juhJh:hKhYh1}r(h3]h;]h7]h4]h<]uhQKhRhhS]rh\X4Setting Content-Type and Content-Disposition Headersrr}r(h0j~h>j|ubaubh`)r}r(h0XThe purpose of the HTTP ``Content-Type`` header is to inform the receiver of a byte stream what the payload actually is. Parameters may be included with the ``Content-Type`` to provide additional information for the consumer (e.g. the ``charset`` parameter for text sub-types).h>juhJh:hKhch1}r(h3]h;]h7]h4]h<]uhQKhRhhS]r(h\XThe purpose of the HTTP rr}r(h0XThe purpose of the HTTP h>jubj)r}r(h0X``Content-Type``h1}r(h3]h;]h7]h4]h<]uh>jhS]rh\X Content-Typerr}r(h0Uh>jubahKj ubh\Xu header is to inform the receiver of a byte stream what the payload actually is. Parameters may be included with the rr}r(h0Xu header is to inform the receiver of a byte stream what the payload actually is. Parameters may be included with the h>jubj)r}r(h0X``Content-Type``h1}r(h3]h;]h7]h4]h<]uh>jhS]rh\X Content-Typerr}r(h0Uh>jubahKj ubh\X> to provide additional information for the consumer (e.g. the rr}r(h0X> to provide additional information for the consumer (e.g. the h>jubj)r}r(h0X ``charset``h1}r(h3]h;]h7]h4]h<]uh>jhS]rh\Xcharsetrr}r(h0Uh>jubahKj ubh\X parameter for text sub-types).rr}r(h0X parameter for text sub-types).h>jubeubhE)r}r(h0Uh>juhJh:hKhLh1}r(h3]h;]h7]h4]rUversion-1-x-content-typerah<]rhauhQKhRhhS]r(hU)r}r(h0XVersion 1.x Content-Typerh>jhJh:hKhYh1}r(h3]h;]h7]h4]h<]uhQKhRhhS]rh\XVersion 1.x Content-Typerr}r(h0jh>jubaubh`)r}r(h0XMedia type tracking in Version 1.x is largely delegated to the ObjectFormat referenced in the SystemMetadata associated with an object. A content producer may provide a Content-Type header, but this information is not preserved as part of the DataONE infrastructure. Hence, consumers that intend to re-expose the object should endeavor to record the provided Content-Type and provide tha header when re-transmitting the object. Such an action is however, undefined within the Version 1.x DataONE service interfaces.rh>jhJh:hKhch1}r(h3]h;]h7]h4]h<]uhQKhRhhS]rh\XMedia type tracking in Version 1.x is largely delegated to the ObjectFormat referenced in the SystemMetadata associated with an object. A content producer may provide a Content-Type header, but this information is not preserved as part of the DataONE infrastructure. Hence, consumers that intend to re-expose the object should endeavor to record the provided Content-Type and provide tha header when re-transmitting the object. Such an action is however, undefined within the Version 1.x DataONE service interfaces.rr}r(h0jh>jubaubh`)r}r(h0X_Lacking an explicltly set Content-Type, a Node may infer the Content-Type from the ObjectFormatrh>jhJh:hKhch1}r(h3]h;]h7]h4]h<]uhQKhRhhS]rh\X_Lacking an explicltly set Content-Type, a Node may infer the Content-Type from the ObjectFormatrr}r(h0jh>jubaubeubhE)r}r(h0Uh>juhJh:hKhLh1}r(h3]h;]h7]h4]rUversion-2-0-content-typerah<]rhauhQKhRhhS]r(hU)r}r(h0XVersion 2.0 Content-Typerh>jhJh:hKhYh1}r(h3]h;]h7]h4]h<]uhQKhRhhS]rh\XVersion 2.0 Content-Typerr}r(h0jh>jubaubhB)r}r(h0Uh>jhJh:hKUenumerated_listrh1}r(UsuffixrU.h4]h7]h3]UprefixrUh;]h<]UenumtyperU loweralpharuhQKhRhhS]r(h?)r}r(h0X``mediaType`` value is specified in SystemMetadata The SystemMetdata.mediaType value is used to set the Content-Type header value. The SystemMetadata.mediaType overrides a value that may be set in the referenced ObjectFormat. h>jhJh:hKhh1}r(h3]h;]h7]h4]h<]uhQNhRhhS]r(h`)r}r(h0X2``mediaType`` value is specified in SystemMetadatah>jhJh:hKhch1}r(h3]h;]h7]h4]h<]uhQKhS]r(j)r}r(h0X ``mediaType``h1}r(h3]h;]h7]h4]h<]uh>jhS]rh\X mediaTyperr}r(h0Uh>jubahKj ubh\X% value is specified in SystemMetadatarr}r(h0X% value is specified in SystemMetadatah>jubeubh`)r}r(h0XThe SystemMetdata.mediaType value is used to set the Content-Type header value. The SystemMetadata.mediaType overrides a value that may be set in the referenced ObjectFormat.rh>jhJh:hKhch1}r(h3]h;]h7]h4]h<]uhQKhS]rh\XThe SystemMetdata.mediaType value is used to set the Content-Type header value. The SystemMetadata.mediaType overrides a value that may be set in the referenced ObjectFormat.rr}r(h0jh>jubaubeubh?)r}r(h0XO``mediaType`` value not specified in SystemMetadata, available in ObjectFormat h>jhJh:hKhh1}r(h3]h;]h7]h4]h<]uhQNhRhhS]rh`)r}r(h0XN``mediaType`` value not specified in SystemMetadata, available in ObjectFormath>jhJh:hKhch1}r(h3]h;]h7]h4]h<]uhQKhS]r(j)r}r(h0X ``mediaType``h1}r(h3]h;]h7]h4]h<]uh>jhS]rh\X mediaTyperr}r(h0Uh>jubahKj ubh\XA value not specified in SystemMetadata, available in ObjectFormatr r }r (h0XA value not specified in SystemMetadata, available in ObjectFormath>jubeubaubh?)r }r (h0XE``mediaType`` value not specified in SystemMetadata or ObjectFormat h>jhJh:hKhh1}r(h3]h;]h7]h4]h<]uhQNhRhhS]rh`)r}r(h0XC``mediaType`` value not specified in SystemMetadata or ObjectFormath>j hJh:hKhch1}r(h3]h;]h7]h4]h<]uhQKhS]r(j)r}r(h0X ``mediaType``h1}r(h3]h;]h7]h4]h<]uh>jhS]rh\X mediaTyperr}r(h0Uh>jubahKj ubh\X6 value not specified in SystemMetadata or ObjectFormatrr}r(h0X6 value not specified in SystemMetadata or ObjectFormath>jubeubaubeubeubeubhE)r}r(h0Uh>hHhJh:hKhLh1}r (h3]h;]h7]h4]r!Urules-for-various-content-typesr"ah<]r#h#auhQKhRhhS]r$(hU)r%}r&(h0XRules for Various Content Typesr'h>jhJh:hKhYh1}r((h3]h;]h7]h4]h<]uhQKhRhhS]r)h\XRules for Various Content Typesr*r+}r,(h0j'h>j%ubaubhE)r-}r.(h0Uh>jhJh:hKhLh1}r/(h3]h;]h7]h4]r0Uapplication-xmlr1ah<]r2hauhQKhRhhS]r3(hU)r4}r5(h0Xapplication/xmlr6h>j-hJh:hKhYh1}r7(h3]h;]h7]h4]h<]uhQKhRhhS]r8h\Xapplication/xmlr9r:}r;(h0j6h>j4ubaubcdocutils.nodes note r<)r=}r>(h0XK``application/xml`` and ``text/xml`` are equivalent [RFC7303_ Section 9.2].h>j-hJh:hKUnoter?h1}r@(h3]h;]h7]h4]h<]uhQNhRhhS]rAh`)rB}rC(h0XK``application/xml`` and ``text/xml`` are equivalent [RFC7303_ Section 9.2].h>j=hJh:hKhch1}rD(h3]h;]h7]h4]h<]uhQKhS]rE(j)rF}rG(h0X``application/xml``h1}rH(h3]h;]h7]h4]h<]uh>jBhS]rIh\Xapplication/xmlrJrK}rL(h0Uh>jFubahKj ubh\X and rMrN}rO(h0X and h>jBubj)rP}rQ(h0X ``text/xml``h1}rR(h3]h;]h7]h4]h<]uh>jBhS]rSh\Xtext/xmlrTrU}rV(h0Uh>jPubahKj ubh\X are equivalent [rWrX}rY(h0X are equivalent [h>jBubhr)rZ}r[(h0XRFC7303_huKh>jBhKhvh1}r\(UnameXRFC7303hxX#http://www.ietf.org/rfc/rfc7303.txtr]h4]h7]h3]h;]h<]uhS]r^h\XRFC7303r_r`}ra(h0Uh>jZubaubh\X Section 9.2].rbrc}rd(h0X Section 9.2].h>jBubeubaubh`)re}rf(h0XUThe use of UTF-8, without a BOM, is RECOMMENDED for all XML MIME entities [RFC7303_].h>j-hJh:hKhch1}rg(h3]h;]h7]h4]h<]uhQKhRhhS]rh(h\XKThe use of UTF-8, without a BOM, is RECOMMENDED for all XML MIME entities [rirj}rk(h0XKThe use of UTF-8, without a BOM, is RECOMMENDED for all XML MIME entities [h>jeubhr)rl}rm(h0XRFC7303_huKh>jehKhvh1}rn(UnameXRFC7303hxj]h4]h7]h3]h;]h<]uhS]roh\XRFC7303rprq}rr(h0Uh>jlubaubh\X].rsrt}ru(h0X].h>jeubeubh`)rv}rw(h0XHThe document character set for XML is Unicode (ISO 10646), which means that XML processors should behave as if they used Unicode internally. However, that does not mean an XML document must be transmitted in Unicode. As long as client and server agree on the encoding, they can use any encoding that can be converted to Unicode.rxh>j-hJh:hKhch1}ry(h3]h;]h7]h4]h<]uhQKhRhhS]rzh\XHThe document character set for XML is Unicode (ISO 10646), which means that XML processors should behave as if they used Unicode internally. However, that does not mean an XML document must be transmitted in Unicode. As long as client and server agree on the encoding, they can use any encoding that can be converted to Unicode.r{r|}r}(h0jxh>jvubaubh`)r~}r(h0XvA challenge with XML documents is that there are three locations where character encoding information may be provided:rh>j-hJh:hKhch1}r(h3]h;]h7]h4]h<]uhQKhRhhS]rh\XvA challenge with XML documents is that there are three locations where character encoding information may be provided:rr}r(h0jh>j~ubaubh)r}r(h0Uh>j-hJh:hKhh1}r(hX*h4]h7]h3]h;]h<]uhQKhRhhS]r(h?)r}r(h0X<A Byte Order Marker (BOM) at the begining of the entity bodyrh>jhJh:hKhh1}r(h3]h;]h7]h4]h<]uhQNhRhhS]rh`)r}r(h0jh>jhJh:hKhch1}r(h3]h;]h7]h4]h<]uhQKhS]rh\X<A Byte Order Marker (BOM) at the begining of the entity bodyrr}r(h0jh>jubaubaubh?)r}r(h0X=An XML encoding property present at the start of the documentrh>jhJh:hKhh1}r(h3]h;]h7]h4]h<]uhQNhRhhS]rh`)r}r(h0jh>jhJh:hKhch1}r(h3]h;]h7]h4]h<]uhQKhS]rh\X=An XML encoding property present at the start of the documentrr}r(h0jh>jubaubaubh?)r}r(h0X?A charset property present in the ``Content-Type`` HTTP header h>jhJh:hKhh1}r(h3]h;]h7]h4]h<]uhQNhRhhS]rh`)r}r(h0X>A charset property present in the ``Content-Type`` HTTP headerh>jhJh:hKhch1}r(h3]h;]h7]h4]h<]uhQKhS]r(h\X"A charset property present in the rr}r(h0X"A charset property present in the h>jubj)r}r(h0X``Content-Type``h1}r(h3]h;]h7]h4]h<]uh>jhS]rh\X Content-Typerr}r(h0Uh>jubahKj ubh\X HTTP headerrr}r(h0X HTTP headerh>jubeubaubeubh`)r}r(h0XEach of these are optional, and when present may provide conflicting information. `Section 3.2 `_ of RFC7303 provides guidelines for how to infer the character encoding of a document. In order of priority:h>j-hJh:hKhch1}r(h3]h;]h7]h4]h<]uhQKhRhhS]r(h\XREach of these are optional, and when present may provide conflicting information. rr}r(h0XREach of these are optional, and when present may provide conflicting information. h>jubhr)r}r(h0X`Section 3.2 `_h1}r(UnameX Section 3.2hxXRFC7303rh4]h7]h3]h;]h<]uh>jhS]rh\X Section 3.2rr}r(h0Uh>jubahKhvubcdocutils.nodes target r)r}r(h0X U referencedrKh>jhKUtargetrh1}r(Urefurijh4]rU section-3-2rah7]h3]h;]h<]rhauhS]ubh\Xl of RFC7303 provides guidelines for how to infer the character encoding of a document. In order of priority:rr}r(h0Xl of RFC7303 provides guidelines for how to infer the character encoding of a document. In order of priority:h>jubeubcdocutils.nodes block_quote r)r}r(h0Uh>j-hJNhKU block_quoterh1}r(h3]h;]h7]h4]h<]uhQNhRhhS]rhB)r}r(h0Uh1}r(jU.h4]h7]h3]jUh;]h<]jUarabicruh>jhS]r(h?)r}r(h0XMA BOM (Section 3.3) is authoritative if it is present in an XML MIME entity; h1}r(h3]h;]h7]h4]h<]uh>jhS]rh`)r}r(h0XLA BOM (Section 3.3) is authoritative if it is present in an XML MIME entity;rh>jhJh:hKhch1}r(h3]h;]h7]h4]h<]uhQKhS]rh\XLA BOM (Section 3.3) is authoritative if it is present in an XML MIME entity;rr}r(h0jh>jubaubahKhubh?)r}r(h0X`In the absence of a BOM (Section 3.3), the charset parameter is authoritative if it is present. h1}r(h3]h;]h7]h4]h<]uh>jhS]rh`)r}r(h0X_In the absence of a BOM (Section 3.3), the charset parameter is authoritative if it is present.rh>jhJh:hKhch1}r(h3]h;]h7]h4]h<]uhQKhS]rh\X_In the absence of a BOM (Section 3.3), the charset parameter is authoritative if it is present.rr}r(h0jh>jubaubahKhubh?)r}r(h0XfIf 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 [XML_] that directly address this case. XML-unaware MIME consumers SHOULD NOT assume a default encoding in this case. h1}r(h3]h;]h7]h4]h<]uh>jhS]rh`)r}r(h0XeIf 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 [XML_] that directly address this case. XML-unaware MIME consumers SHOULD NOT assume a default encoding in this case.h>jhJh:hKhch1}r(h3]h;]h7]h4]h<]uhQKhS]r(h\XIf 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 [rr}r(h0XIf 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 [h>jubhr)r}r(h0XXML_huKh>jhKhvh1}r(UnameXXMLhxX*http://www.w3.org/TR/2008/REC-xml-20081126rh4]h7]h3]h;]h<]uhS]rh\XXMLrr}r(h0Uh>jubaubh\Xq] that directly address this case. XML-unaware MIME consumers SHOULD NOT assume a default encoding in this case.rr }r (h0Xq] that directly address this case. XML-unaware MIME consumers SHOULD NOT assume a default encoding in this case.h>jubeubahKhubehKjubaubh`)r }r (h0X\Section 8 of RFC7303_ provides several examples of consistent and inconsistent XML encoding.h>j-hJh:hKhch1}r (h3]h;]h7]h4]h<]uhQKhRhhS]r(h\X Section 8 of rr}r(h0X Section 8 of h>j ubhr)r}r(h0XRFC7303_huKh>j hKhvh1}r(UnameXRFC7303hxj]h4]h7]h3]h;]h<]uhS]rh\XRFC7303rr}r(h0Uh>jubaubh\XG provides several examples of consistent and inconsistent XML encoding.rr}r(h0XG provides several examples of consistent and inconsistent XML encoding.h>j ubeubh`)r}r(h0XXAn important consequence of the document character set is that values of numeric character references (such as ǵ and ǵ for LATIN SMALL LETTER G WITH ACUTE) are interpreted as Unicode characters - no matter what encoding you use for your document. This is a common source of error among those who are not clear about the distinction.rh>j-hJh:hKhch1}r(h3]h;]h7]h4]h<]uhQKhRhhS]r h\XXAn important consequence of the document character set is that values of numeric character references (such as ǵ and ǵ for LATIN SMALL LETTER G WITH ACUTE) are interpreted as Unicode characters - no matter what encoding you use for your document. This is a common source of error among those who are not clear about the distinction.r!r"}r#(h0jh>jubaubh`)r$}r%(h0XNote that not all Unicode characters can be used anywhere in XML. Certain characters are excluded from use in tag names (elements and attributes), and `XML 1.1 `_ expands significantly on the range of characters that may be used compared with `XML 1.0 `_.h>j-hJh:hKhch1}r&(h3]h;]h7]h4]h<]uhQKhRhhS]r'(h\XNote that not all Unicode characters can be used anywhere in XML. Certain characters are excluded from use in tag names (elements and attributes), and r(r)}r*(h0XNote that not all Unicode characters can be used anywhere in XML. Certain characters are excluded from use in tag names (elements and attributes), and h>j$ubhr)r+}r,(h0X`XML 1.1 `_h1}r-(UnameXXML 1.1hxXXML1.1r.h4]h7]h3]h;]h<]uh>j$hS]r/h\XXML 1.1r0r1}r2(h0Uh>j+ubahKhvubj)r3}r4(h0X jKh>j$hKjh1}r5(Urefurij.h4]r6Uxml-1-1r7ah7]h3]h;]h<]r8h auhS]ubh\XQ expands significantly on the range of characters that may be used compared with r9r:}r;(h0XQ expands significantly on the range of characters that may be used compared with h>j$ubhr)r<}r=(h0X`XML 1.0 `_h1}r>(UnameXXML 1.0hxXXML1.0r?h4]h7]h3]h;]h<]uh>j$hS]r@h\XXML 1.0rArB}rC(h0Uh>j<ubahKhvubj)rD}rE(h0X jKh>j$hKjh1}rF(Urefurij?h4]rGUxml-1-0rHah7]h3]h;]h<]rIh auhS]ubh\X.rJ}rK(h0X.h>j$ubeubeubhE)rL}rM(h0Uh>jhJh:hKhLh1}rN(h3]h;]h7]h4]rOUtext-xmlrPah<]rQhauhQKhRhhS]rR(hU)rS}rT(h0Xtext/xmlrUh>jLhJh:hKhYh1}rV(h3]h;]h7]h4]h<]uhQKhRhhS]rWh\Xtext/xmlrXrY}rZ(h0jUh>jSubaubh`)r[}r\(h0XSee application/xml.r]h>jLhJh:hKhch1}r^(h3]h;]h7]h4]h<]uhQKhRhhS]r_h\XSee application/xml.r`ra}rb(h0j]h>j[ubaubeubhE)rc}rd(h0Uh>jhJh:hKhLh1}re(h3]h;]h7]h4]rfUtext-csvrgah<]rhh'auhQKhRhhS]ri(hU)rj}rk(h0Xtext/csvrlh>jchJh:hKhYh1}rm(h3]h;]h7]h4]h<]uhQKhRhhS]rnh\Xtext/csvrorp}rq(h0jlh>jjubaubh`)rr}rs(h0X [RFC4180_]rth>jchJh:hKhch1}ru(h3]h;]h7]h4]h<]uhQKhRhhS]rv(h\X[rw}rx(h0X[h>jrubhr)ry}rz(h0XRFC4180_huKh>jrhKhvh1}r{(UnameXRFC4180hxX#http://www.ietf.org/rfc/rfc4180.txtr|h4]h7]h3]h;]h<]uhS]r}h\XRFC4180r~r}r(h0Uh>jyubaubh\X]r}r(h0X]h>jrubeubh`)r}r(h0XMIME media type name: textrh>jchJh:hKhch1}r(h3]h;]h7]h4]h<]uhQKhRhhS]rh\XMIME media type name: textrr}r(h0jh>jubaubh`)r}r(h0XMIME subtype name: csvrh>jchJh:hKhch1}r(h3]h;]h7]h4]h<]uhQKhRhhS]rh\XMIME subtype name: csvrr}r(h0jh>jubaubh`)r}r(h0XRequired parameters: nonerh>jchJh:hKhch1}r(h3]h;]h7]h4]h<]uhQKhRhhS]rh\XRequired parameters: nonerr}r(h0jh>jubaubh`)r}r(h0X$Optional parameters: charset, headerrh>jchJh:hKhch1}r(h3]h;]h7]h4]h<]uhQKhRhhS]rh\X$Optional parameters: charset, headerrr}r(h0jh>jubaubj)r}r(h0Uh>jchJh:hKjh1}r(h3]h;]h7]h4]h<]uhQNhRhhS]r(h`)r}r(h0XCommon usage of CSV is US-ASCII, but other character sets defined by IANA for the "text" tree may be used in conjunction with the "charset" parameter.rh>jhJh:hKhch1}r(h3]h;]h7]h4]h<]uhQKhS]rh\XCommon usage of CSV is US-ASCII, but other character sets defined by IANA for the "text" tree may be used in conjunction with the "charset" parameter.rr}r(h0jh>jubaubh`)r}r(h0XThe "header" parameter indicates the presence or absence of the header line.Valid values are "present" or "absent". Implementors choosing not to use this parameter must make their own decisions as to whether the header line is present or absent.rh>jhJh:hKhch1}r(h3]h;]h7]h4]h<]uhQMhS]rh\XThe "header" parameter indicates the presence or absence of the header line.Valid values are "present" or "absent". Implementors choosing not to use this parameter must make their own decisions as to whether the header line is present or absent.rr}r(h0jh>jubaubeubh`)r}r(h0XEncoding considerations:rh>jchJh:hKhch1}r(h3]h;]h7]h4]h<]uhQMhRhhS]rh\XEncoding considerations:rr}r(h0jh>jubaubj)r}r(h0Uh>jchJh:hKjh1}r(h3]h;]h7]h4]h<]uhQNhRhhS]rh`)r}r(h0XAs per section 4.1.1. of RFC 2046 [3], this media type uses CRLF to denote line breaks.However, implementors should be aware that some implementations may use other values.rh>jhJh:hKhch1}r(h3]h;]h7]h4]h<]uhQMhS]rh\XAs per section 4.1.1. of RFC 2046 [3], this media type uses CRLF to denote line breaks.However, implementors should be aware that some implementations may use other values.rr}r(h0jh>jubaubaubeubhE)r}r(h0Uh>jhJh:hKhLh1}r(h3]h;]h7]h4]rU text-plainrah<]rh!auhQM hRhhS]r(hU)r}r(h0X text/plainrh>jhJh:hKhYh1}r(h3]h;]h7]h4]h<]uhQM hRhhS]rh\X text/plainrr}r(h0jh>jubaubh`)r}r(h0X [RFC2046_]rh>jhJh:hKhch1}r(h3]h;]h7]h4]h<]uhQMhRhhS]r(h\X[r}r(h0X[h>jubhr)r}r(h0XRFC2046_huKh>jhKhvh1}r(UnameXRFC2046hxX#http://www.ietf.org/rfc/rfc2046.txtrh4]h7]h3]h;]h<]uhS]rh\XRFC2046rr}r(h0Uh>jubaubh\X]r}r(h0X]h>jubeubeubhE)r}r(h0Uh>jhJh:hKhLh1}r(h3]h;]h7]h4]rUtext-javascriptrah<]rh%auhQMhRhhS]r(hU)r}r(h0Xtext/javascriptrh>jhJh:hKhYh1}r(h3]h;]h7]h4]h<]uhQMhRhhS]rh\Xtext/javascriptrr}r(h0jh>jubaubh`)r}r(h0X0Obsoleted in favor of ``application/javascript``rh>jhJh:hKhch1}r(h3]h;]h7]h4]h<]uhQMhRhhS]r(h\XObsoleted in favor of rr}r(h0XObsoleted in favor of h>jubj)r}r(h0X``application/javascript``h1}r(h3]h;]h7]h4]h<]uh>jhS]rh\Xapplication/javascriptrr}r(h0Uh>jubahKj ubeubeubhE)r }r (h0Uh>jhJh:hKhLh1}r (h3]h;]h7]h4]r Uapplication-javascriptr ah<]rhauhQMhRhhS]rhU)r}r(h0Xapplication/javascriptrh>j hJh:hKhYh1}r(h3]h;]h7]h4]h<]uhQMhRhhS]rh\Xapplication/javascriptrr}r(h0jh>jubaubaubhE)r}r(h0Uh>jhJh:hKhLh1}r(h3]h;]h7]h4]rUapplication-jsonrah<]rhauhQMhRhhS]r(hU)r}r (h0Xapplication/jsonr!h>jhJh:hKhYh1}r"(h3]h;]h7]h4]h<]uhQMhRhhS]r#h\Xapplication/jsonr$r%}r&(h0j!h>jubaubh`)r'}r((h0XQJSON text SHALL be encoded in Unicode_ [RFC4627_]. The default encoding is UTF-8.r)h>jhJh:hKhch1}r*(h3]h;]h7]h4]h<]uhQM!hRhhS]r+(h\XJSON text SHALL be encoded in r,r-}r.(h0XJSON text SHALL be encoded in h>j'ubhr)r/}r0(h0XUnicode_huKh>j'hKhvh1}r1(UnameXUnicodehxXhttp://www.unicode.org/r2h4]h7]h3]h;]h<]uhS]r3h\XUnicoder4r5}r6(h0Uh>j/ubaubh\X [r7r8}r9(h0X [h>j'ubhr)r:}r;(h0XRFC4627_huKh>j'hKhvh1}r<(UnameXRFC4627hxX#http://www.ietf.org/rfc/rfc4627.txtr=h4]h7]h3]h;]h<]uhS]r>h\XRFC4627r?r@}rA(h0Uh>j:ubaubh\X!]. The default encoding is UTF-8.rBrC}rD(h0X!]. The default encoding is UTF-8.h>j'ubeubh`)rE}rF(h0XSince the first two characters of a JSON text will always be ASCII characters [RFC0020_], it is possible to determine whether an octet stream is UTF-8, UTF-16 (BE or LE), or UTF-32 (BE or LE) by looking at the pattern of nulls in the first four octets::h>jhJh:hKhch1}rG(h3]h;]h7]h4]h<]uhQM#hRhhS]rH(h\XOSince the first two characters of a JSON text will always be ASCII characters [rIrJ}rK(h0XOSince the first two characters of a JSON text will always be ASCII characters [h>jEubhr)rL}rM(h0XRFC0020_huKh>jEhKhvh1}rN(UnameXRFC0020hxX#http://www.ietf.org/rfc/rfc0020.txtrOh4]h7]h3]h;]h<]uhS]rPh\XRFC0020rQrR}rS(h0Uh>jLubaubh\X], it is possible to determine whether an octet stream is UTF-8, UTF-16 (BE or LE), or UTF-32 (BE or LE) by looking at the pattern of nulls in the first four octets:rTrU}rV(h0X], it is possible to determine whether an octet stream is UTF-8, UTF-16 (BE or LE), or UTF-32 (BE or LE) by looking at the pattern of nulls in the first four octets:h>jEubeubcdocutils.nodes literal_block rW)rX}rY(h0Xj00 00 00 xx UTF-32BE 00 xx 00 xx UTF-16BE xx 00 00 00 UTF-32LE xx 00 xx 00 UTF-16LE xx xx xx xx UTF-8h>jhJh:hKU literal_blockrZh1}r[(U xml:spacer\Upreserver]h4]h7]h3]h;]h<]uhQM(hRhhS]r^h\Xj00 00 00 xx UTF-32BE 00 xx 00 xx UTF-16BE xx 00 00 00 UTF-32LE xx 00 xx 00 UTF-16LE xx xx xx xx UTF-8r_r`}ra(h0Uh>jXubaubj)rb}rc(h0XD.. _Spolsky2003: http://www.joelonsoftware.com/articles/Unicode.htmljKh>jhJh:hKjh1}rd(hxhyh4]reU spolsky2003rfah7]h3]h;]h<]rgh&auhQM2hRhhS]ubj)rh}ri(h0XM.. _W3C_Headers: http://www.w3.org/International/questions/qa-headers-charseth>jhJh:hKjh1}rj(hxX<http://www.w3.org/International/questions/qa-headers-charseth4]rkU w3c-headersrlah7]h3]h;]h<]rmhauhQM4hRhhS]ubj)rn}ro(h0X.. _IANA: http://www.iana.org/jKh>jhJh:hKjh1}rp(hxhh4]rqUianarrah7]h3]h;]h<]rshauhQM6hRhhS]ubj)rt}ru(h0XM.. _IANA_MEDIA: http://www.iana.org/assignments/media-types/media-types.xhtmljKh>jhJh:hKjh1}rv(hxhh4]rwU iana-mediarxah7]h3]h;]h<]ryhauhQM8hRhhS]ubj)rz}r{(h0XS.. _IANA_CHARS: http://www.iana.org/assignments/character-sets/character-sets.xhtmljKh>jhJh:hKjh1}r|(hxjh4]r}U iana-charsr~ah7]h3]h;]h<]rh auhQM:hRhhS]ubj)r}r(h0XI.. _RFC2616-sec14: http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.htmlh>jhJh:hKjh1}r(hxX6http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.htmlh4]rU rfc2616-sec14rah7]h3]h;]h<]rhauhQM<hRhhS]ubj)r}r(h0X3.. _XML: http://www.w3.org/TR/2008/REC-xml-20081126jKh>jhJh:hKjh1}r(hxjh4]rUxmlrah7]h3]h;]h<]rhauhQM>hRhhS]ubj)r}r(h0X2.. _XML1.0: http://www.w3.org/TR/REC-xml/#charsetsh>jhJh:hKjh1}r(hxX&http://www.w3.org/TR/REC-xml/#charsetsh4]rUxml1-0rah7]h3]h;]h<]rhauhQM@hRhhS]ubj)r}r(h0X0.. _XML1.1: http://www.w3.org/TR/xml11/#charsetsh>jhJh:hKjh1}r(hxX$http://www.w3.org/TR/xml11/#charsetsh4]rUxml1-1rah7]h3]h;]h<]rhauhQMBhRhhS]ubj)r}r(h0X0.. _RFC0020: http://www.ietf.org/rfc/rfc0020.txtjKh>jhJh:hKjh1}r(hxjOh4]rUrfc0020rah7]h3]h;]h<]rh auhQMDhRhhS]ubj)r}r(h0X0.. _RFC2046: http://www.ietf.org/rfc/rfc2046.txtjKh>jhJh:hKjh1}r(hxjh4]rUrfc2046rah7]h3]h;]h<]rhauhQMFhRhhS]ubj)r}r(h0X0.. _RFC2616: http://www.ietf.org/rfc/rfc2616.txtjKh>jhJh:hKjh1}r(hxX#http://www.ietf.org/rfc/rfc2616.txtrh4]rUrfc2616rah7]h3]h;]h<]rh auhQMHhRhhS]ubj)r}r(h0X0.. _RFC4180: http://www.ietf.org/rfc/rfc4180.txtjKh>jhJh:hKjh1}r(hxj|h4]rUrfc4180rah7]h3]h;]h<]rh$auhQMJhRhhS]ubj)r}r(h0X0.. _RFC4627: http://www.ietf.org/rfc/rfc4627.txtjKh>jhJh:hKjh1}r(hxj=h4]rUrfc4627rah7]h3]h;]h<]rh auhQMLhRhhS]ubj)r}r(h0X0.. _RFC6266: http://www.ietf.org/rfc/rfc6266.txtjKh>jhJh:hKjh1}r(hxX#http://www.ietf.org/rfc/rfc6266.txtrh4]rUrfc6266rah7]h3]h;]h<]rhauhQMNhRhhS]ubj)r}r(h0X/.. _RFC6657: http://www.rfc.org/rfc/rfc6657.txth>jhJh:hKjh1}r(hxX"http://www.rfc.org/rfc/rfc6657.txth4]rUrfc6657rah7]h3]h;]h<]rhauhQMPhRhhS]ubj)r}r(h0X0.. _RFC7303: http://www.ietf.org/rfc/rfc7303.txtjKh>jhJh:hKjh1}r(hxj]h4]rUrfc7303rah7]h3]h;]h<]rh"auhQMRhRhhS]ubj)r}r(h0X$.. _Unicode: http://www.unicode.org/jKh>jhJh:hKjh1}r(hxj2h4]rUunicoderah7]h3]h;]h<]rhauhQMThRhhS]ubeubeubeubhJh:hKhLh1}r(h3]h;]h7]h4]rU.preserving-media-type-metadata-between-systemsrah<]rhauhQKhFhJh:hKhYh1}r(h3]h;]h7]h4]h<]uhQKjubaubh`)r}r(h0XoOnce available, the media type metadata should be preserved with the object to ensure that downstream consumers can utilize the content in the same way without resorting to inference mechanisms with potentially different results. Hence it is essential that media type information is considered an integral part of the action of transferring an object between systems.rh>hFhJh:hKhch1}r(h3]h;]h7]h4]h<]uhQK>hRhhS]rh\XoOnce available, the media type metadata should be preserved with the object to ensure that downstream consumers can utilize the content in the same way without resorting to inference mechanisms with potentially different results. Hence it is essential that media type information is considered an integral part of the action of transferring an object between systems.rr}r(h0jh>jubaubh`)r}r(h0XWhen a server sends an object to a user agent (e.g. a CN acting as a client retrieving a Science Metadata document from a MN, a script accessing content, or a browser viewing something from a CN), the server should specify the media type in the ``Content-Type`` field of the accompanying HTTP headers [RFC2616_ Section 14.17]. The ``Content-Type`` entity-header field indicates the media type [IANA_MEDIA_] (formerly known as "MIME Type" or "Multipurpose Internet Mail Extensions Type") of the entity-body sent to the recipient [RFC2616_]. The media type entry of the Content-Type header is used to to inform the consumer of what the bytes in the payload represent.h>hFhJh:hKhch1}r(h3]h;]h7]h4]h<]uhQKDhRhhS]r(h\XWhen a server sends an object to a user agent (e.g. a CN acting as a client retrieving a Science Metadata document from a MN, a script accessing content, or a browser viewing something from a CN), the server should specify the media type in the rr}r(h0XWhen a server sends an object to a user agent (e.g. a CN acting as a client retrieving a Science Metadata document from a MN, a script accessing content, or a browser viewing something from a CN), the server should specify the media type in the h>jubj)r}r(h0X``Content-Type``h1}r(h3]h;]h7]h4]h<]uh>jhS]rh\X Content-Typerr}r(h0Uh>jubahKj ubh\X) field of the accompanying HTTP headers [rr}r(h0X) field of the accompanying HTTP headers [h>jubhr)r}r(h0XRFC2616_huKh>jhKhvh1}r(UnameXRFC2616hxjh4]h7]h3]h;]h<]uhS]rh\XRFC2616rr}r(h0Uh>jubaubh\X Section 14.17]. The rr}r(h0X Section 14.17]. The h>jubj)r}r(h0X``Content-Type``h1}r(h3]h;]h7]h4]h<]uh>jhS]rh\X Content-Typerr}r(h0Uh>jubahKj ubh\X/ entity-header field indicates the media type [rr}r (h0X/ entity-header field indicates the media type [h>jubhr)r }r (h0X IANA_MEDIA_huKh>jhKhvh1}r (UnameX IANA_MEDIAhxhh4]h7]h3]h;]h<]uhS]r h\X IANA_MEDIArr}r(h0Uh>j ubaubh\X|] (formerly known as "MIME Type" or "Multipurpose Internet Mail Extensions Type") of the entity-body sent to the recipient [rr}r(h0X|] (formerly known as "MIME Type" or "Multipurpose Internet Mail Extensions Type") of the entity-body sent to the recipient [h>jubhr)r}r(h0XRFC2616_huKh>jhKhvh1}r(UnameXRFC2616hxjh4]h7]h3]h;]h<]uhS]rh\XRFC2616rr}r(h0Uh>jubaubh\X]. The media type entry of the Content-Type header is used to to inform the consumer of what the bytes in the payload represent.rr}r(h0X]. The media type entry of the Content-Type header is used to to inform the consumer of what the bytes in the payload represent.h>jubeubh`)r}r(h0X6The server may also include a suggested filename in the Content-Disposition HTTP header [RFC6266_]. This can be useful for consumers as it specifies a filename that may be used by default for the content, and also provides a hint as to the type of content being provided (i.e. through the file name extension).h>hFhJh:hKhch1}r (h3]h;]h7]h4]h<]uhQKNhRhhS]r!(h\XYThe server may also include a suggested filename in the Content-Disposition HTTP header [r"r#}r$(h0XYThe server may also include a suggested filename in the Content-Disposition HTTP header [h>jubhr)r%}r&(h0XRFC6266_huKh>jhKhvh1}r'(UnameXRFC6266hxjh4]h7]h3]h;]h<]uhS]r(h\XRFC6266r)r*}r+(h0Uh>j%ubaubh\X]. This can be useful for consumers as it specifies a filename that may be used by default for the content, and also provides a hint as to the type of content being provided (i.e. through the file name extension).r,r-}r.(h0X]. This can be useful for consumers as it specifies a filename that may be used by default for the content, and also provides a hint as to the type of content being provided (i.e. through the file name extension).h>jubeubh`)r/}r0(h0XAll content in DataONE is accompanied by System Metadata which is used to provide persistent information about the associated object that is useful for maintaining the object state and for consumers. Content type in DataONE is indicated in System Metadata by freference to an :class:`Types.Object Format`, a complex structure that contains a ``formatId``, a ``formatName`` and a ``formatType``. In version 2.0 APIs, :class:`V2_0.Types.objectFormat` is extended to include mimeType and extension.h>hFhJh:hKhch1}r1(h3]h;]h7]h4]h<]uhQKShRhhS]r2(h\XAll content in DataONE is accompanied by System Metadata which is used to provide persistent information about the associated object that is useful for maintaining the object state and for consumers. Content type in DataONE is indicated in System Metadata by freference to an r3r4}r5(h0XAll content in DataONE is accompanied by System Metadata which is used to provide persistent information about the associated object that is useful for maintaining the object state and for consumers. Content type in DataONE is indicated in System Metadata by freference to an h>j/ubj,)r6}r7(h0X:class:`Types.Object Format`r8h>j/hJh:hKj0h1}r9(UreftypeXclassj2j3XTypes.Object FormatU refdomainXpyr:h4]h7]U refexplicith3]h;]h<]j5j6j7Nj8NuhQKShS]r;j)r<}r=(h0j8h1}r>(h3]h;]r?(j>j:Xpy-classr@eh7]h4]h<]uh>j6hS]rAh\XTypes.Object FormatrBrC}rD(h0Uh>j<ubahKj ubaubh\X&, a complex structure that contains a rErF}rG(h0X&, a complex structure that contains a h>j/ubj)rH}rI(h0X ``formatId``h1}rJ(h3]h;]h7]h4]h<]uh>j/hS]rKh\XformatIdrLrM}rN(h0Uh>jHubahKj ubh\X, a rOrP}rQ(h0X, a h>j/ubj)rR}rS(h0X``formatName``h1}rT(h3]h;]h7]h4]h<]uh>j/hS]rUh\X formatNamerVrW}rX(h0Uh>jRubahKj ubh\X and a rYrZ}r[(h0X and a h>j/ubj)r\}r](h0X``formatType``h1}r^(h3]h;]h7]h4]h<]uh>j/hS]r_h\X formatTyper`ra}rb(h0Uh>j\ubahKj ubh\X. In version 2.0 APIs, rcrd}re(h0X. In version 2.0 APIs, h>j/ubj,)rf}rg(h0X :class:`V2_0.Types.objectFormat`rhh>j/hJh:hKj0h1}ri(UreftypeXclassj2j3XV2_0.Types.objectFormatU refdomainXpyrjh4]h7]U refexplicith3]h;]h<]j5j6j7Nj8NuhQKShS]rkj)rl}rm(h0jhh1}rn(h3]h;]ro(j>jjXpy-classrpeh7]h4]h<]uh>jfhS]rqh\XV2_0.Types.objectFormatrrrs}rt(h0Uh>jlubahKj ubaubh\X/ is extended to include mimeType and extension.rurv}rw(h0X/ is extended to include mimeType and extension.h>j/ubeubh`)rx}ry(h0XNThe use of a controlled list of object formats may be problematic however, when considering that a particular type of object may have multiple media types (e.g. an Excel spreadsheet) or may require more detail such as character encoding information (e.g. a CSV or XML document) that may not be reliably inferred from the object bytes.rzh>hFhJh:hKhch1}r{(h3]h;]h7]h4]h<]uhQK[hRhhS]r|h\XNThe use of a controlled list of object formats may be problematic however, when considering that a particular type of object may have multiple media types (e.g. an Excel spreadsheet) or may require more detail such as character encoding information (e.g. a CSV or XML document) that may not be reliably inferred from the object bytes.r}r~}r(h0jzh>jxubaubh`)r}r(h0XHence, the system metadata for an object should also include optional properties for the media type specific to the object, the character encoding, and the filename. This information may be provided with the object System Metadata or in the Content-Type and Content-Disposition headers. Where the information in the headers conflicts with that in the System Metadata, the System Metadata should prevail (since presumably the system metadata was set correctly by the origin, whereas a misconfigured server may be setting an incorrect value).rh>hFhJh:hKhch1}r(h3]h;]h7]h4]h<]uhQKahRhhS]rh\XHence, the system metadata for an object should also include optional properties for the media type specific to the object, the character encoding, and the filename. This information may be provided with the object System Metadata or in the Content-Type and Content-Disposition headers. Where the information in the headers conflicts with that in the System Metadata, the System Metadata should prevail (since presumably the system metadata was set correctly by the origin, whereas a misconfigured server may be setting an incorrect value).rr}r(h0jh>jubaubh`)r}r(h0X**Recommendations**rh>hFhJh:hKhch1}r(h3]h;]h7]h4]h<]uhQKihRhhS]rhf)r}r(h0jh1}r(h3]h;]h7]h4]h<]uh>jhS]rh\XRecommendationsrr}r(h0Uh>jubahKhnubaubhCeubhJh:hKjh1}r(jU.h4]h7]h3]jUh;]h<]jjuhQKkhRhhS]r(h?)r}r(h0X(no change) The objectFormat is used to indicate to a consumer application more detailed information than is available through the media type. h>hChJh:hKhh1}r(h3]h;]h7]h4]h<]uhQNhRhhS]rh`)r}r(h0X(no change) The objectFormat is used to indicate to a consumer application more detailed information than is available through the media type.rh>jhJh:hKhch1}r(h3]h;]h7]h4]h<]uhQKkhS]rh\X(no change) The objectFormat is used to indicate to a consumer application more detailed information than is available through the media type.rr}r(h0jh>jubaubaubh?)r}r(h0XThe ``mimeType`` element of the Draft v2.0 API should be renamed "mediaType" and used to specify the default media type for an object should that information not be explicitly provided through the Content-Type header provided by the producer (Issue #) h>hChJh:hKhh1}r(h3]h;]h7]h4]h<]uhQNhRhhS]rh`)r}r(h0XThe ``mimeType`` element of the Draft v2.0 API should be renamed "mediaType" and used to specify the default media type for an object should that information not be explicitly provided through the Content-Type header provided by the producer (Issue #)h>jhJh:hKhch1}r(h3]h;]h7]h4]h<]uhQKnhS]r(h\XThe rr}r(h0XThe h>jubj)r}r(h0X ``mimeType``h1}r(h3]h;]h7]h4]h<]uh>jhS]rh\XmimeTyperr}r(h0Uh>jubahKj ubh\X element of the Draft v2.0 API should be renamed "mediaType" and used to specify the default media type for an object should that information not be explicitly provided through the Content-Type header provided by the producer (Issue #)rr}r(h0X element of the Draft v2.0 API should be renamed "mediaType" and used to specify the default media type for an object should that information not be explicitly provided through the Content-Type header provided by the producer (Issue #)h>jubeubaubh@h?)r}r(h0XFor text media sub-types, or content that is textual (e.g. media type = ``application/xml`` or ``application/javascript``), a charset parameter should be provided in the ``Content-Type`` header. When provided, this value must be persisted in the system metadata associated with an object. When ``charset`` is specified in the System Metadata, it overrides a value that may be present in the Content-Type header. In practice, System Metadata is retrieved separately from the object, and so such an override will optional for consumers. h>hChJh:hKhh1}r(h3]h;]h7]h4]h<]uhQNhRhhS]rh`)r}r(h0XFor text media sub-types, or content that is textual (e.g. media type = ``application/xml`` or ``application/javascript``), a charset parameter should be provided in the ``Content-Type`` header. When provided, this value must be persisted in the system metadata associated with an object. When ``charset`` is specified in the System Metadata, it overrides a value that may be present in the Content-Type header. In practice, System Metadata is retrieved separately from the object, and so such an override will optional for consumers.h>jhJh:hKhch1}r(h3]h;]h7]h4]h<]uhQK|hS]r(h\XHFor text media sub-types, or content that is textual (e.g. media type = rr}r(h0XHFor text media sub-types, or content that is textual (e.g. media type = h>jubj)r}r(h0X``application/xml``h1}r(h3]h;]h7]h4]h<]uh>jhS]rh\Xapplication/xmlrr}r(h0Uh>jubahKj ubh\X or rr}r(h0X or h>jubj)r}r(h0X``application/javascript``h1}r(h3]h;]h7]h4]h<]uh>jhS]rh\Xapplication/javascriptrr}r(h0Uh>jubahKj ubh\X1), a charset parameter should be provided in the rr}r(h0X1), a charset parameter should be provided in the h>jubj)r}r(h0X``Content-Type``h1}r(h3]h;]h7]h4]h<]uh>jhS]rh\X Content-Typerr}r(h0Uh>jubahKj ubh\Xl header. When provided, this value must be persisted in the system metadata associated with an object. When rr}r(h0Xl header. When provided, this value must be persisted in the system metadata associated with an object. When h>jubj)r}r(h0X ``charset``h1}r(h3]h;]h7]h4]h<]uh>jhS]rh\Xcharsetrr}r(h0Uh>jubahKj ubh\X is specified in the System Metadata, it overrides a value that may be present in the Content-Type header. In practice, System Metadata is retrieved separately from the object, and so such an override will optional for consumers.rr}r(h0X is specified in the System Metadata, it overrides a value that may be present in the Content-Type header. In practice, System Metadata is retrieved separately from the object, and so such an override will optional for consumers.h>jubeubaubh?)r}r(h0XA filename should be provided in a ``Content-Disposition`` header by a producer and should be preserved in the system metadata associated with the object. When present in the System Metadata, that value overrides a value in the ``Content-Disposition`` header. In practice, System Metadata is retrieved separately from the object, and so such an override will optional for consumers. h>hChJh:hKhh1}r(h3]h;]h7]h4]h<]uhQNhRhhS]rh`)r}r(h0X~A filename should be provided in a ``Content-Disposition`` header by a producer and should be preserved in the system metadata associated with the object. When present in the System Metadata, that value overrides a value in the ``Content-Disposition`` header. In practice, System Metadata is retrieved separately from the object, and so such an override will optional for consumers.h>jhJh:hKhch1}r(h3]h;]h7]h4]h<]uhQKhS]r(h\X#A filename should be provided in a rr}r(h0X#A filename should be provided in a h>jubj)r}r(h0X``Content-Disposition``h1}r(h3]h;]h7]h4]h<]uh>jhS]rh\XContent-Dispositionrr}r(h0Uh>jubahKj ubh\X header by a producer and should be preserved in the system metadata associated with the object. When present in the System Metadata, that value overrides a value in the rr}r(h0X header by a producer and should be preserved in the system metadata associated with the object. When present in the System Metadata, that value overrides a value in the h>jubj)r}r(h0X``Content-Disposition``h1}r(h3]h;]h7]h4]h<]uh>jhS]rh\XContent-Dispositionrr}r(h0Uh>jubahKj ubh\X header. In practice, System Metadata is retrieved separately from the object, and so such an override will optional for consumers.rr}r(h0X header. In practice, System Metadata is retrieved separately from the object, and so such an override will optional for consumers.h>jubeubaubeubhJh:hKhh1}r (h3]h;]h7]h4]h<]uhQNhRhhS]r h`)r }r (h0X3The media type as provided by the producer of the object should be specified and should be preserved as part of the system metadata so that the media type may be reliably presented to downstream consumers. When specified in the ``Content-Type`` header, the media type overrides the default value present in the associated objectFormat. When present in System Metadata, that value overrides a value presented in the ``Content-Type``header. In practice, System Metadata is retrieved separately from the object, and so such an override will optional for consumers.h>h@hJh:hKhch1}r (h3]h;]h7]h4]h<]uhQKshS]r(h\XThe media type as provided by the producer of the object should be specified and should be preserved as part of the system metadata so that the media type may be reliably presented to downstream consumers. When specified in the rr}r(h0XThe media type as provided by the producer of the object should be specified and should be preserved as part of the system metadata so that the media type may be reliably presented to downstream consumers. When specified in the h>j ubj)r}r(h0X``Content-Type``h1}r(h3]h;]h7]h4]h<]uh>j hS]rh\X Content-Typerr}r(h0Uh>jubahKj ubh\X header, the media type overrides the default value present in the associated objectFormat. When present in System Metadata, that value overrides a value presented in the rr}r(h0X header, the media type overrides the default value present in the associated objectFormat. When present in System Metadata, that value overrides a value presented in the h>j ubcdocutils.nodes problematic r)r}r(h0X``h1}r(h4]r h9ah7]h3]h;]h<]Urefidh6uh>j hS]r!h\X``r"r#}r$(h0Uh>jubahKU problematicr%ubh\XContent-Type``header. In practice, System Metadata is retrieved separately from the object, and so such an override will optional for consumers.r&r'}r((h0XContent-Type``header. In practice, System Metadata is retrieved separately from the object, and so such an override will optional for consumers.h>j ubeubaubhS]r)h`)r*}r+(h0X/Inline literal start-string without end-string.h1}r,(h3]h;]h7]h4]h<]uh>h.hS]r-h\X/Inline literal start-string without end-string.r.r/}r0(h0Uh>j*ubahKhcubahKUsystem_messager1ubaUcurrent_sourcer2NU decorationr3NUautofootnote_startr4KUnameidsr5}r6(hjPhjhjrh j7h jHh jh jh jhjhjhjhjyhjhjhjxhjhjhhhj hj1hjlhjhjhjhjhjh j~h!jh"jh#j"h$jh%jh&jfh'jgh(hOuhS]r7hHah0UU transformerr8NU footnote_refsr9}r:Urefnamesr;}r<(Xxml]r=jaX iana_media]r>(hj eXrfc2046]r?jaXiana]r@haXrfc2616]rA(jjeXrfc0020]rBjLaX spolsky2003]rChsaXrfc6266]rDj%aXrfc4627]rEj:aXunicode]rFj/aXrfc4180]rGjyaX iana_chars]rHjaXrfc7303]rI(jZjljeuUsymbol_footnotesrJ]rKUautofootnote_refsrL]rMUsymbol_footnote_refsrN]rOU citationsrP]rQhRhU current_linerRNUtransform_messagesrS]rT(h-)rU}rV(h0Uh1}rW(h3]UlevelKh4]h7]Usourceh:h;]h<]UlineM4UtypeUINFOrXuhS]rYh`)rZ}r[(h0Uh1}r\(h3]h;]h7]h4]h<]uh>jUhS]r]h\X1Hyperlink target "w3c_headers" is not referenced.r^r_}r`(h0Uh>jZubahKhcubahKj1ubh-)ra}rb(h0Uh1}rc(h3]UlevelKh4]h7]Usourceh:h;]h<]UlineM<UtypejXuhS]rdh`)re}rf(h0Uh1}rg(h3]h;]h7]h4]h<]uh>jahS]rhh\X3Hyperlink target "rfc2616-sec14" is not referenced.rirj}rk(h0Uh>jeubahKhcubahKj1ubh-)rl}rm(h0Uh1}rn(h3]UlevelKh4]h7]Usourceh:h;]h<]UlineM@UtypejXuhS]roh`)rp}rq(h0Uh1}rr(h3]h;]h7]h4]h<]uh>jlhS]rsh\X,Hyperlink target "xml1.0" is not referenced.rtru}rv(h0Uh>jpubahKhcubahKj1ubh-)rw}rx(h0Uh1}ry(h3]UlevelKh4]h7]Usourceh:h;]h<]UlineMBUtypejXuhS]rzh`)r{}r|(h0Uh1}r}(h3]h;]h7]h4]h<]uh>jwhS]r~h\X,Hyperlink target "xml1.1" is not referenced.rr}r(h0Uh>j{ubahKhcubahKj1ubh-)r}r(h0Uh1}r(h3]UlevelKh4]h7]Usourceh:h;]h<]UlineMPUtypejXuhS]rh`)r}r(h0Uh1}r(h3]h;]h7]h4]h<]uh>jhS]rh\X-Hyperlink target "rfc6657" is not referenced.rr}r(h0Uh>jubahKhcubahKj1ubeUreporterrNUid_startrKU autofootnotesr]rU citation_refsr}rUindirect_targetsr]rUsettingsr(cdocutils.frontend Values ror}r(Ufootnote_backlinksrKUrecord_dependenciesrNU rfc_base_urlrUhttps://tools.ietf.org/html/rU tracebackrUpep_referencesrNUstrip_commentsrNU toc_backlinksrUentryrU language_coderUenrU datestamprNU report_levelrKU _destinationrNU halt_levelrKU strip_classesrNhYNUerror_encoding_error_handlerrUbackslashreplacerUdebugrNUembed_stylesheetrUoutput_encoding_error_handlerrUstrictrU sectnum_xformrKUdump_transformsrNU docinfo_xformrKUwarning_streamrNUpep_file_url_templaterUpep-%04drUexit_status_levelrKUconfigrNUstrict_visitorrNUcloak_email_addressesrUtrim_footnote_reference_spacerUenvrNUdump_pseudo_xmlrNUexpose_internalsrNUsectsubtitle_xformrU source_linkrNUrfc_referencesrNUoutput_encodingrUutf-8rU source_urlrNUinput_encodingrU utf-8-sigrU_disable_configrNU id_prefixrUU tab_widthrKUerror_encodingrUUTF-8rU_sourcerh:Ugettext_compactrU generatorrNUdump_internalsrNU smart_quotesrU pep_base_urlrU https://www.python.org/dev/peps/rUsyntax_highlightrUlongrUinput_encoding_error_handlerrjUauto_id_prefixrUidrUdoctitle_xformrUstrip_elements_with_classesrNU _config_filesr]Ufile_insertion_enabledrU raw_enabledrKU dump_settingsrNubUsymbol_footnote_startrKUidsr}r(jjjrjnj j jjjjjjjjjjjjj~jzjjjjh9jh6h.jyjuj7j3jHjDjjj"jhOhHjjjjjjjhFjxjtjjjjj1j-jjjjjjjfjbjgjchhjPjLjljhjjuUsubstitution_namesr}rhKhRh1}r(h3]h4]h7]Usourceh:h;]h<]uU footnotesr]rUrefidsr}rub.