Hi Nigel,
--On March 28, 2005 15:36:30 +0100 Nigel Swinson
<Nigel(_dot_)Swinson(_at_)rockliffe(_dot_)com> wrote:
For example, a document with "multipart" major content type only
directly contains the text in its epilogue and prologue section;
all the user-visible data inside it is directly contained in
documents with MIME types other than multipart.
I don't think this is terribly clear. For one thing I think it implies
you can't have nested multipart messages, which you can (send an
attachment with alternative content type). I think it may be best
illustrated using an example. I suggest:
For example, suppose we have the following message:
From: Whomever
To: Someone
Date: Whenever
Subject: whatever
Content-Type: multipart/alternative; boundary=1234
This is a multi-part message in MIME format.
--1234
Content-Type: text/plain; charset="us-ascii"
Hello
--1234
Content-Type: text/html; charset="us-ascii"
<html><body>Hello</body></html>
--1234--
If the body test was used with :content specification "multipart",
then we would find the string "This is a multi-part message", but we
would not find "Hello", as Hello is in the direct contents of the
text/plain and text/html body parts, but only indirectly in the
content of the multipart/alternative body part.
How about using an example like the following for extra clarification
(copying the approach from rfc2015 PGP/MIME):
----
Example:
From: Whomever
To: Someone
Date: Whenever
Subject: whatever
Content-Type: multipart/alternative; boundary=1234
& This is a multi-part message in MIME format.
&
--1234
Content-Type: text/plain; charset="us-ascii"
$ Hello
$
--1234
Content-Type: text/html; charset="us-ascii"
% <html><body>Hello</body></html>
%
--1234--
&
& This is the end of the MIME multipart.
In the above example, the '&', '$' and '%' characters at the start of a
line are used to illustrate what portions of the example message are used
in tests:
- the lines starting with '&' are the ones that are tested when a 'body
:content "multipart/alternative" :contains "MIME"' test is executed.
- the lines starting with '$' are the ones that are tested when a 'body
:content "text/plain" :contains "Hello"' test is executed.
- the lines starting with '%' are the ones that are tested when a 'body
:content "text/html" :contains "Hello"' test is executed.
- the lines starting with '$' or '%' are the ones that are tested when a
'body :content "text" :contains "Hello"' test is executed.
----
--
Cyrus Daboo