ietf-822
[Top] [All Lists]

Re: How we are planning to embed HTML in messages

1995-05-17 12:25:30
Chris,

Does one really need to make multiple passes because of Multipart/
Related's start parameter?  I didn't think so.  The situation that
comes to mind where that *might* be the case occurs when you process
the MIME entity on the fly.  I would use the paradigm below and,
after describing it, I'll say why it introduces no *additional*
complexity.

On Wed, 17 May 1995 12:05:59 EDT Chris Newman wrote:
I'm aware of multipart/related, and feel the optional "start"
parameter makes it unnecessarily complex.  In order to parse a
multipart/related with a start parameter, you need to make multiple
passes across the message.

First, start scanning the Multipart/Related's body parts recording the
beginning of each part and, if present, its content-id.  If the current
part is not the first start part go on to the next part.  If it is,
feed it to the application and then check if the next start part has
already been encountered.  If it has, feed it to the application and
repeat; if not go on to the next part.  Continue until all the start
elements have been found.   The remaining details are left as an
exercise.  Note: "feed it to the application" can take many forms,
including appending to a temporary file until all the start parts have
been found.

In effect one only needs to make a single pass.  In fact, one must
always do that because Multipart/Related means that the MIME user
agent (mua) must scan the entire entity before invoking the application.
The mua has no idea of what the proper processing sequence is, that is
embedded in the data itself.  It implies a random access of the the
constituent MIME entities.  One must have the location of each
body part before the application can be invoked.  Hence there is no
additional complexity or pass for the start parameter.

Multipart/Related is, I'll agree, more complex than the other
multipart types (mixed, parallel, alternate, and digest).  I argue
that the complexity is inherent in the application and can't be
avoided.  I think it would work well for an HTML document with
embedded images; we will use it for mimesgml.

This explanation may address some of your concerns.  I expect you to
have others and I'd like to know what they are as well as where my
thinking may be off the mark.

Best.../Ed