<?xml version="1.0"?>
<!DOCTYPE rfc SYSTEM "rfc2629.dtd">
<?rfc toc="yes"?>

<!--
     ASCII to XML transformation by Invisible Worlds, Inc.
     http://invisible.net/
     Last transformation: 03-Feb-1999, 02:03:52

     Cannonical version of this document is at:
     http://info.internet.isi.edu/in-notes/rfc/files/rfc2112.txt

     Implementors should verify all content with
     cannonical version.  Failure to do so may result in
     protocol failures.
-->

<rfc number="2112"
     category="std"
     obsoletes="1872">
<front>
<title abbrev="MIME Multipart/Related Content-type">The MIME Multipart/Related Content-type</title>
<author initials="E." surname="Levinson" fullname="Edward Levinson">
<organization>XIson, Inc.</organization>
<address>
<postal>
<street>47 Clive Street</street>
<street>Metuchen</street>
<street>NJ  08840-1060</street>
<country>USA</country>
</postal>
<phone>+1 908 549 3716</phone>
<email>XIson@cnj.digex.com</email>
</address>
</author>
<date month="March" year="1997"/>
<keyword>MIME</keyword>
<keyword>content-type</keyword>
<keyword>multipurpose internet mail extensions</keyword>
<abstract>
<t>
   The Multipart/Related content-type provides a common mechanism for
   representing objects that are aggregates of related MIME body parts.
   This document defines the Multipart/Related content-type and provides
   examples of its use.
</t>
</abstract>
</front>
<middle>
<!-- RFC original section: (1.) -->
<section title="Introduction">
<t>
   Several applications of MIME, including MIME-PEM, and MIME-Macintosh
   and other proposals, require multiple body parts that make sense only
   in the aggregate.  The present approach to these compound objects has
   been to define specific multipart subtypes for each new object.  In
   keeping with the MIME philosophy of having one mechanism to achieve
   the same goal for different purposes, this document describes a
   single mechanism for such aggregate or compound objects.
</t>
<t>
   The Multipart/Related content-type addresses the MIME representation
   of compound objects.  The object is categorized by a &quot;type&quot;
   parameter.  Additional parameters are provided to indicate a specific
   starting body part or root and auxiliary information which may be
   required when unpacking or processing the object.
</t>
<t>
   Multipart/Related MIME entities may contain Content-Disposition
   headers that provide suggestions for the storage and display of a
   body part.  Multipart/Related processing takes precedence over
   Content-Disposition; the interaction between them is discussed in
   section 4.
</t>
<t>
   Responsibility for the display or processing of a Multipart/Related&apos;s
   constituent entities rests with the application that handles the
   compound object.
</t>
</section>
<!-- RFC original section: (2.) -->
<section title="Multipart/Related Registration Information">
<t>
   The following form is copied from RFC 1590, Appendix A.
</t>
<figure><artwork>
   To:  IANA@isi.edu Subject:  Registration of new Media Type content-
   type/subtype

   Media Type name:           Multipart

   Media subtype name:        Related

   Required parameters:       Type, a media type/subtype.

   Optional parameters:       Start
                     Start-info

   Encoding considerations:   Multipart content-types cannot have
                              encodings.

   Security considerations:   Depends solely on the referenced type.

   Published specification:   RFC-REL (this document).

   Person &amp; email address to contact for further information:
                     Edward Levinson
                     47 Clive Street
                     Metuchen, NJ 08840-1060
                     +1 908 494 1606
                     XIson@cnj.digex.net
</artwork></figure>
</section>
<!-- RFC original section: (3.) -->
<section title="Intended usage">
<t>
   The Multipart/Related media type is intended for compound objects
   consisting of several inter-related body parts.  For a
   Multipart/Related object, proper display cannot be achieved by
   individually displaying the constituent body parts.  The content-type
   of the Multipart/Related object is specified by the type parameter.
   The &quot;start&quot; parameter, if given, points, via a content-ID, to the
   body part that contains the object root.  The default root is the
   first body part within the Multipart/Related body.
</t>
<t>
   The relationships among the body parts of a compound object
   distinguishes it from other object types.  These relationships are
   often represented by links internal to the object&apos;s components that
   reference the other components.  Within a single operating
   environment the links are often file names, such links may be
   represented within a MIME message using content-IDs or the value of
   some other &quot;Content-&quot; headers.
</t>
<!-- RFC original section: (3.1.) -->
<section title="The Type Parameter">
<t>
   The type parameter must be specified and its value is the MIME media
   type of the &quot;root&quot; body part.  It permits a MIME user agent to
   determine the content-type without reference to the enclosed body
   part.  If the value of the type parameter and the root body part&apos;s
   content-type differ then the User Agent&apos;s behavior is undefined.
</t>
</section>
<!-- RFC original section: (3.2.) -->
<section title="The Start Parameter">
<t>
   The start parameter, if given, is the content-ID of the compound
   object&apos;s &quot;root&quot;.  If not present the &quot;root&quot; is the first body part in
   the Multipart/Related entity.  The &quot;root&quot; is the element the
   applications processes first.
</t>
</section>
<!-- RFC original section: (3.3.) -->
<section title="The Start-Info Parameter">
<t>
   Additional information can be provided to an application by the
   start-info parameter.  It contains either a string or points, via a
   content-ID, to another MIME entity in the message.  A typical use
   might be to provide additional command line parameters or a MIME
   entity giving auxiliary information for processing the compound
   object.
</t>
<t>
   Applications that use Multipart/Related must specify the
   interpretation of start-info.  User Agents shall provide the
   parameter&apos;s value to the processing application.  Processes can
   distinguish a start-info reference from a token or quoted-string by
   examining the first non-white-space character, &quot;&lt;&quot; indicates a
   reference.
</t>
</section>
<!-- RFC original section: (3.4.) -->
<section title="Syntax">
<figure><artwork>
     related-param    := [ &quot;;&quot; &quot;start&quot; &quot;=&quot; cid ]
                         [ &quot;;&quot; &quot;start-info&quot;  &quot;=&quot;
                     ( cid-list / value ) ]
                         [ &quot;;&quot; &quot;type&quot;  &quot;=&quot; type &quot;/&quot; subtype ]
                   ; order independent

     cid-list        := cid cid-list
     cid             := msg-id     ; c.f. [822]

     value           := token / quoted-string    ; c.f. [MIME]
                    ; value cannot begin with &quot;&lt;&quot;
</artwork></figure>
<t>
   Note that the parameter values will usually require quoting.  Msg-id
   contains the special characters &quot;&lt;&quot;, &quot;&gt;&quot;, &quot;@&quot;, and perhaps other
   special characters.  If msg-id contains quoted-strings, those quote
   marks must be escaped.  Similarly, the type parameter contains the
   special character &quot;/&quot;.
</t>
</section>
</section>
<!-- RFC original section: (4.) -->
<section title="Handling Content-Disposition Headers">
<t>
   Content-Disposition Headers <xref target="_XREF_DISP"/> suggest presentation styles for
   MIME body parts.  <xref target="_XREF_DISP"/> describes two presentation styles, called
   the disposition type, INLINE and ATTACHMENT.  These, used within a
   multipart entity, allow the sender to suggest presentation
   information.  <xref target="_XREF_DISP"/> also provides for an optional storage (file)
   name.  Content-Disposition headers could appear in one or more body
   parts contained within a Multipart/Related entity.
</t>
<t>
   Using Content-Disposition headers in addition to Multipart/Related
   provides presentation information to User Agents that do not
   recognize Multipart/Related.  They will treat the multipart as
   Multipart/Mixed and they may find the Content-Disposition information
   useful.
</t>
<t>
   With Multipart/Related however, the application processing the
   compound object determines the presentation style for all the
   contained parts.  In that context the Content-Disposition header
   information is redundant or even misleading.  Hence, User Agents that
   understand Multipart/Related shall ignore the disposition type within
   a Multipart/Related body part.
</t>
<t>
   It may be possible for a User Agent capable of handling both
   Multipart/Related and Content-Disposition headers to provide the
   invoked application the Content-Disposition header&apos;s optional
   filename parameter to the Multipart/Related.  The use of that
   information will depend on the specific application and should be
   specified when describing the handling of the corresponding compound
   object.  Such descriptions would be appropriate in an RFC registering
   that object&apos;s media type.
</t>
</section>
<!-- RFC original section: (5.) -->
<section title="Examples">
<t>
</t>
<!-- RFC original section: (5.1) -->
<section title="Application/X-FixedRecord">
<t>
   The X-FixedRecord content-type consists of one or more octet-streams
   and a list of the lengths of each record.  The root, which lists the
   record lengths of each record within the streams.  The record length
   list, type Application/X-FixedRecord, consists of a set of INTEGERs
   in ASCII format, one per line.  Each INTEGER gives the number of
   octets from the octet-stream body part that constitute the next
   &quot;record&quot;.
</t>
<t>
   The example below, uses a single data block.
</t>
<figure><artwork>
     Content-Type: Multipart/Related; boundary=example-1
             start=&quot;&lt;950120.aaCC@XIson.com&gt;&quot;;
             type=&quot;Application/X-FixedRecord&quot;
          start-info=&quot;-o ps&quot;

     --example-1
     Content-Type: Application/X-FixedRecord
     Content-ID: &lt;950120.aaCC@XIson.com&gt;

     25
     10
     34
     10
     25
     21
     26
     10
     --example-1
     Content-Type: Application/octet-stream
     Content-Description: The fixed length records
     Content-Transfer-Encoding: base64
     Content-ID: &lt;950120.aaCB@XIson.com&gt;

     T2xkIE1hY0RvbmFsZCBoYWQgYSBmYXJtCkUgSS
     BFIEkgTwpBbmQgb24gaGlzIGZhcm0gaGUgaGFk
     IHNvbWUgZHVja3MKRSBJIEUgSSBPCldpdGggYS
     BxdWFjayBxdWFjayBoZXJlLAphIHF1YWNrIHF1
     YWNrIHRoZXJlLApldmVyeSB3aGVyZSBhIHF1YW
     NrIHF1YWNrCkUgSSBFIEkgTwo=

     --example-1--
</artwork></figure>
</section>
<!-- RFC original section: (5.2) -->
<section title="Text/X-Okie">
<t>
   The Text/X-Okie is an invented markup language permitting the
   inclusion of images with text.  A feature of this example is the
   inclusion of two additional body parts, both picture. They are
   referred to internally by the encapsulated document via each
   picture&apos;s body part content-ID.  Usage of &quot;cid:&quot;, as in this example,
   may be useful for a variety of compound objects.  It is not, however,
   a part of the Multipart/Related specification.
</t>
<figure><artwork>
     Content-Type: Multipart/Related; boundary=example-2;
             start=&quot;&lt;950118.AEBH@XIson.com&gt;&quot;
          type=&quot;Text/x-Okie&quot;

     --example-2
     Content-Type: Text/x-Okie; charset=iso-8859-1;
             declaration=&quot;&lt;950118.AEB0@XIson.com&gt;&quot;
     Content-ID: &lt;950118.AEBH@XIson.com&gt;
     Content-Description: Document

     {doc}
     This picture was taken by an automatic camera mounted ...
     {image file=cid:&lt;950118.AECB@XIson.com&gt;}
     {para}
     Now this is an enlargement of the area ...
     {image file=cid:&lt;950118:AFDH@XIson.com&gt;}
     {/doc}
     --example-2
     Content-Type: image/jpeg
     Content-ID: &lt;950118.AFDH@XIson.com&gt;
     Content-Transfer-Encoding: BASE64
     Content-Description: Picture A

     [encoded jpeg image]
     --example-2
     Content-Type: image/jpeg
     Content-ID: &lt;950118.AECB@XIson.com&gt;
     Content-Transfer-Encoding: BASE64
     Content-Description: Picture B

     [encoded jpeg image]
     --example-2--
</artwork></figure>
</section>
<!-- RFC original section: (5.3) -->
<section title="Content-Disposition">
<t>
   In the above example each image body part could also have a Content-
   Disposition header.  For example,
</t>
<figure><artwork>
     ...
     --example-2
     Content-Type: image/jpeg
     Content-ID: &lt;950118.AECB@XIson.com&gt;
     Content-Transfer-Encoding: BASE64
     Content-Description: Picture B
     Content-Disposition: INLINE

     [encoded jpeg image]
     --example-2--
</artwork></figure>
<t>
   User Agents that recognize Multipart/Related will ignore the
   Content-Disposition header&apos;s disposition type.  Other User Agents
   will process the Multipart/Related as Multipart/Mixed and may make
   use of that header&apos;s information.
</t>
</section>
</section>
<!-- RFC original section: (6.) -->
<section title="User Agent Requirements">
<t>
   User agents that do not recognize Multipart/Related shall, in
   accordance with <xref target="_XREF_MIME"/>, treat the entire entity as Multipart/Mixed.
   MIME User Agents that do recognize Multipart/Related entities but are
   unable to process the given type should give the user the option of
   suppressing the entire Multipart/Related body part shall be.
</t>
<t>
   Existing MIME-capable mail user agents (MUAs) handle the existing
   media types in a straightforward manner.  For discrete media types
   (e.g. text, image, etc.) the body of the entity can be directly
   passed to a display process.  Similarly the existing composite
   subtypes can be reduced to handing one or more discrete types.
   Handling Multipart/Related differs in that processing cannot be
   reduced to handling the individual entities.
</t>
<t>
   The following sections discuss what information the processing
   application requires.
</t>
<t>
   It is possible that an application specific &quot;receiving agent&quot; will
   manipulate the entities for display prior to invoking actual
   application process.  Okie, above, is an example of this; it may need
   a receiving agent to parse the document and substitute local file
   names for the originator&apos;s file names.  Other applications may just
   require a table showing the correspondence between the local file
   names and the originator&apos;s.  The receiving agent takes responsibility
   for such processing.
</t>
<!-- RFC original section: (6.1) -->
<section title="Data Requirements">
<t>
   MIME-capable mail user agents (MUAs) are required to provide the
   application:
<list>
<t>
   (a)  the bodies of the MIME entities and the entity Content-*
        headers,
</t>
<t>
   (b)  the parameters of the Multipart/Related Content-type
        header, and
</t>
<t>
   (c)  the correspondence between each body&apos;s local file name,
        that body&apos;s header data, and, if present, the body part&apos;s
        content-ID.
</t></list>
</t>
</section>
<!-- RFC original section: (6.2) -->
<section title="Storing Multipart/Related Entities">
<t>
   The Multipart/Related media type will be used for objects that have
   internal linkages between the body parts.  When the objects are
   stored the linkages may require processing by the application or its
   receiving agent.
</t>
</section>
<!-- RFC original section: (6.3) -->
<section title="Recursion">
<t>
   MIME is a recursive structure.  Hence one must expect a
   Multipart/Related entity to contain other Multipart/Related entities.
   When a Multipart/Related entity is being processed for display or
   storage, any enclosed Multipart/Related entities shall be processed
   as though they were being stored.
</t>
</section>
<!-- RFC original section: (6.4) -->
<section title="Configuration Considerations">
<t>
   It is suggested that MUAs that use configuration mechanisms, see
   <xref target="_XREF_CFG"/> for an example, refer to Multipart/Related as
   Multipart/Related/&lt;type&gt;, were &lt;type&gt; is the value of the &quot;type&quot;
   parameter.
</t>
</section>
</section>
<!-- RFC original section: (7.) -->
<section title="Security considerations">
<t>
   Security considerations relevant to Multipart/Related are identical
   to those of the underlying content-type.
</t>
</section>
<!-- RFC original section: (8.) -->
<section title="Acknowledgments">
<t>
   This proposal is the result of conversations the author has had with
   many people.  In particular, Harald A. Alvestrand, James Clark,
   Charles Goldfarb, Gary Houston, Ned Freed, Ray Moody, and Don
   Stinchfield, provided both encouragement and invaluable help.  The
   author, however, take full responsibility for all errors contained in
   this document.
</t>
</section>
<!-- RFC original section: (9.) -->
<section title="References (BOILERPLATE)">
<t>
This RFC contained boilerplate in this section which has been moved
to the RFC2223-compliant unnumbered section &quot;References.&quot;
</t>
</section>
<!-- RFC original section: (9.) -->
<section title="Author&apos;s Address (BOILERPLATE)">
<t>
This RFC contained boilerplate in this section which has been moved
to the RFC2223-compliant unnumbered section &quot;Author&apos;s Address.&quot;
</t>
</section>
</middle>
<back>
<!-- BEGIN INCLUDE REFERENCES ** DO NOT REMOVE -->
<references>
<reference anchor="_XREF_822">
<front>
<title abbrev="Standard for the Format of ARPA Internet">Standard for the Format of ARPA Internet Text Messages, &quot;, University of Delaware</title>
<author initials="D." surname="Crocker" fullname="D. Crocker">
<organization/>
</author>
<date month="August" year="1982"/>
</front>
<seriesInfo>RFC 822</seriesInfo>
</reference>
<reference anchor="_XREF_CID">
<front>
<title abbrev="Message/External-Body Content-ID Access">Message/External-Body Content-ID Access Type, &quot;, 12/26/1995, Levinson, E., &quot;Message/External-Body Content-ID Access Type&quot;</title>
<author initials="E." surname="Levinson" fullname="E. Levinson">
<organization/>
</author>
<author initials="J." surname="Clark" fullname="J. Clark">
<organization/>
</author>
<date month="February" year="1997"/>
</front>
<seriesInfo>RFC 1873</seriesInfo>
<seriesInfo>RFC 2111</seriesInfo>
</reference>
<reference anchor="_XREF_CFG">
<front>
<title abbrev="A User Agent Configuration Mechanism">A User Agent Configuration Mechanism For Multimedia Mail Format Information,&quot;</title>
<author initials="N." surname="Borenstein" fullname="N. Borenstein">
<organization/>
</author>
<date month="September" year="1993"/>
</front>
<seriesInfo>RFC 1524</seriesInfo>
</reference>
<reference anchor="_XREF_DISP">
<front>
<title abbrev="Communicating Presentation Information in">Communicating Presentation Information in Internet Messages:  The Content-Disposition Header,&quot;</title>
<author initials="R." surname="Troost" fullname="R. Troost">
<organization/>
</author>
<author initials="S." surname="Dorner" fullname="S. Dorner">
<organization/>
</author>
<date month="June" year="1995"/>
</front>
<seriesInfo>RFC 1806</seriesInfo>
</reference>
<reference anchor="_XREF_MIME">
<front>
<title abbrev="Borenstein">Borenstein, N. and Freed, N., &quot;MIME (Multipurpose Internet Mail Extensions): Mechanisms for Specifying and Describing the Format of Internet Message Bodies&quot;</title>
<author>
<organization/>
</author>
<date month="June" year="1992"/>
</front>
<seriesInfo>RFC 1341</seriesInfo>
</reference>
</references>
<!-- END INCLUDE REFERENCES ** DO NOT REMOVE -->
</back>
</rfc>
