Internet Draft Laurence Lundblade draft-lundblade-1pass-mult-alt-01.txt QUALCOMM Inc. Expires: February 1999 August 1998 One Pass Multipart/Alternative Processing Status of this Memo This document is an Internet-Draft. Internet-Drafts are working documents of the Internet Engineering Task Force (IETF), its areas, and its working groups. Note that other groups may also distribute working documents as Internet-Drafts. 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.'' To learn the current status of any Internet-Draft, please check the ``1id-abstracts.txt'' listing contained in the Internet-Drafts Shadow Directories on ftp.ietf.org (US East Coast), nic.nordu.net (Europe), ftp.isi.edu (US West Coast), or munnari.oz.au (Pacific Rim). A revised version of this draft document will be submitted to the RFC editor as a Proposed Standard for the Internet Community. Discussion and suggestions for improvement are requested. This document will expire before July 1997. Distribution of the draft is unlimited. Note: This draft may be discussed on the 822 mailing list at ietf-822@imc.org. Copyright Notice Copyright (c) The Internet Society 1998. All rights reserved. 1. Introduction Most MIME syntax and semantics can usually be processed in a single pass through the data. For example, the MIME boundary parameter always appears before it is used. This is not the case with multipart/alternative MIME entities. The processor of the data cannot know the MIME types of the altnernatives present until all alternatives have been processed. Thus, it is not possible for a one pass processor to consider more than the first and most limited representation, because a subsequent part may be something that cannot be handled. A particular case of this occurs with alternative representations of types text/plain and text/html or text/enriched formats. The text/plain representation must come first as required for multipart/alternative entities. If the processing is being done on a small device with Laurence Lundblade Expires February 1999 [Page 1] Internet Draft One pass multipart/alternative processing August 1998 limited memory it is most desirable to process the structure in one pass. If the display is also small, for example 40 colums rather than 80, it is desirable to use the text/html alternative because it is appropriate to reflow HTML to fit the display. This memo proposes a parameter addition for the multipart/alternative MIME type that lists the MIME types of its alternative components. This allows a one-pass processing of most multipart/alternative entities. 2. The "types" parameter The "types" parameter is a comma separated list of the MIME types of the parts that make up the multipart/altnertive MIME entity. The order of the listed types corresponds to the order of the parts. Note that this parameter must be quoted because MIME type identifiers always include the "/" character which must be quoted. Spaces are not permitted between the MIME types or adjacent to the separating commas. (Allowing spaces provides no advantages and would complicate parsing). 3. An Example The following is an example for how this might be used for HTML and plain text parts: Content-type: multipart/alternative; boundary="-separator-"; types="text/plain,text/html" ---separator- Content-type: text/plain This paragraph of text in its orginal form can be reflowed to fit nicely on screens of many different widths. However if you use the text/plain rendition of it the text has been formatted with fixed line lengths and adjusting it for a screen size that is not an integer fraction of fixed length will not look very good. ------------------------------------------------------------------------------------- In addition HTML constructs in the list below can be fomatted to look much nicer than the plain text version without implementing a full web browser. * Centered text can be correctly centered * Bulleted lists can use the local bullet character * Horizontal rules can be the correct width for the display * Special characters such currency symbols can be displayed correct. Note that often the plain text rendition is US-ASCII only. * Bold, italic and underlining ---separator- Content-type: text/html Laurence Lundblade Expires February 1999 [Page 2] Internet Draft One pass multipart/alternative processing August 1998
This paragraph of text in its orginal form can be reflowed to fit nicely on screens of many different widths. However if you use the text/plain rendition of it the text has been formatted with fixed line lengths and adjusting it for a screen size that is not an integer fraction of fixed length will not look very good.