Network Working Group J. Borden Request for Comments: nnnn The Open HealthCare Group Category: Standards Track June, 2000 Page 1 A mapping from RFC822/MIME to XML Status of this Memo This document specifies an Internet standards track protocol for the Internet community, and requests discussion and suggestions for improvements. Please refer to the current edition of the "Internet Official Protocol Standards" (STD 1) for the standardization state and status of this protocol. This memo is to be submitted as an Internet Draft. Its current state is early. Distribution of this memo will be unlimited once submitted. Copyright Notice Copyright (c) The Internet Society (2000). All Rights Reserved. Introduction The XML MIME Transformation Protocol (XMTP) defines a mapping between RFC822/MIME messages and XML documents. The mapping is straightforward and allows MIME messages to be integrated into XML processing systems. For example an SMTP e-mail can be transformed by XSLT into an HTML page for viewing within a browser. Protocol The RFC822/MIME message corresponds to an XML document having a root "mime" element in XML namespace "http://www.openhealth.org/xmtp" e.g. ... Headers The RFC822/MIME headers are represented as elements within the mime root. The value of the header becomes the content of the element. Parameters are represented as attributes of the header element. jborden@mediaone.net jon@openhealth.org text/html quoted-printable ... Body The body is contained within the element. The XMTP namespace does not apply to the contents of the Body element. The XMTP namespace does apply to parts of a multipart body. jborden@mediaone.net jon@openhealth.org text/plain This is the message body Multipart messages The body of a multipart message will contain the element . Each part consists of a mime message which is represented as a subelement of the Parts root. jborden@mediaone.net jon@openhealth.org multipart/related xxxxx$yyyyy@openhealth.org The contents of this part are text Examples A simple text RFC822 message: Received: from jabr (jabr.ne.mediaone.net [24.128.34.211]) by chmls05.mediaone.net (8.8.7/8.8.7) with SMTP id XAA27071 for ; Tue, 13 Oct 1998 23:42:47 -0400 (EDT) From: "Borden, Jonathan" To: "XMTP" Subject: this is a simple message Date: Tue, 13 Oct 1998 23:33:49 -0400 Message-ID: <001501bdf723$74f03fe0$d3228017@jabr.ne.mediaone.net> MIME-Version: 1.0 Content-Type: text/plain Content-Transfer-Encoding: 7bit This is a simple text message which will be converted into XML as shown below The XMTP message text/plain 7bit Tue, 13 Oct 1998 23:33:49 -0400 "Borden, Jonathan" <jborden@mediaone.net> Normal <001501bdf723$74f03fe0$d3228017@jabr.ne.mediaone.net> 1.0 from jabr (jabr.ne.mediaone.net [24.128.34.211]) by chmls05.mediaone.net (8.8.7/8.8.7) with SMTP id XAA27071 for <test-xmtp@jabr.ne.mediaone.net>; Tue, 13 Oct 1998 23:42:47 -0400 (EDT) this is a simple message "XMTP" <test-xmtp@jabr.ne.mediaone.net> This is a simple text message which will be converted into XML as shown below A multipart message: Received: from jabr (jabr.ne.mediaone.net [24.128.34.211]) by chmls05.mediaone.net (8.8.7/8.8.7) with SMTP id XAA27071 for ; Tue, 13 Oct 1998 23:42:47 -0400 (EDT) From: "Borden, Jonathan" To: "XMTP" Subject: this is a simple message Date: Tue, 13 Oct 1998 23:33:49 -0400 Message-ID: <001501bdf723$74f03fe0$d3228018@jabr.ne.mediaone.net> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_0016_01BDF701.EDDE9FE0" Importance: Normal This is a multi-part message in MIME format. ------=_NextPart_000_0016_01BDF701.EDDE9FE0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Here is the text of the message ... its being transmitted in 'HTML' format but the text is a separate part for e-mail readers that don't understand HTML. We can't assume that all valid HTML is XML so we have to escape all of the HTML ... or use a CDATA section jon ------=_NextPart_000_0016_01BDF701.EDDE9FE0 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable

Here is the text of the message ... its being transmitted in 'HTML' = format but=20 the text is a separate part for e-mail readers that don't understand = HTML. We=20 can't assume that all valid HTML is XML so we have to escape all of the HTML ... .or use a CDATA=20 section

jon

------=_NextPart_000_0016_01BDF701.EDDE9FE0-- The XMTP multipart message multipart/alternative binary Tue, 13 Oct 1998 23:33:49 -0400 "Borden, Jonathan" <jborden@mediaone.net> Normal <001501bdf723$74f03fe0$d3228018@jabr.ne.mediaone.net> 1.0 from jabr (jabr.ne.mediaone.net [24.128.34.211]) by chmls05.mediaone.net (8.8.7/8.8.7) with SMTP id XAA27071 for <test-xmtp@jabr.ne.mediaone.net>; Tue, 13 Oct 1998 23:42:47 -0400 (EDT) this is a simple message "XMTP" <test-xmtp@jabr.ne.mediaone.net> text/plain 7bit text/html binary

Here is the text of the message ... its being = transmitted in=20 'HTML' format but the text is a separate part for e-mail readers that = don't=20 understand  HTML. We can't assume that all valid HTML is XML so we = have to=20 escape all of the HTML ... or use a CDATA=20 section
      

 =20

]]>
References RFC 822 MIME XML 1.0 XML Namespaces XSLT Author Address Jonathan Borden The Open Heathcare Group Floor 5, Liongate 500 Boylston Street Boston MA 02110 jborden@mediaone.net