multipart/related (was: Re: Multiple docs in 'wrapper')

Mark Birbeck Mark.Birbeck at
Sun Oct 31 16:03:25 GMT 1999

John Tigue wrote:
> Mark Birbeck wrote:
> > Anton Schoultz wrote: 
> > > Q1-Does XML support multiple document types in a file? 
> > > iow could I wrap several invoice docs, a couple of 
> > > statement docs, and a report into one file?
> > 
> > [Mark Birbeck]  
> > Take a look at the fragment interchange spec, at W3C. 
> > It's very simple but quite good. 
> [John Tigue]
> I agree with Mark. Another alternative, would involve
> "multipart/related" as defined in RFC2112:
> [snip]

I think this mixes two different levels of abstraction. I believe the
original question concerned the logical - or nodal - representation of a
number of XML 'documents' in one document, in a manner that allows them
to be broken apart again easily. Fragments is simple to use for this.
The MIME mechanism concerns 'real' documents that need to travel
together, but it is operating at a different level. Of course the
question might have meant that - in which case the answer is just Xip
them up!

I may as well make an additional point whilst we're here, concerning the
phrasing of the original question. You cannot actually 'mix' different
'document types' in one 'file'. An XML document can only have one root
node, and so is only of one document type. You could create your own
'invoice container' doc type if you wanted, which would wrap up
invoices, and then another container doc type to wrap up both the
invoices and statements. All I'm saying is that the frag spec just gives
you a useful place to start when developing a generalised solution.

> [John Tigue]
> This technology is also used over HTTP. This RFC is 
> more stable than the fragment interchange spec.

As I've said, they address different issues. But note also that the frag
spec only has about three elements in it! It's about the simplest spec
you're ever likely to see, and if you think about it's purpose it's
difficult to imagine how it will change. As the authors say, it will be
*built on* by other specs relating to the transportation of fragments,
and so on, but it's a very simple foundation.



xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev at
Archived as: and on CD-ROM/ISBN 981-02-3594-1
To unsubscribe, mailto:majordomo at the following message;
unsubscribe xml-dev
To subscribe to the digests, mailto:majordomo at the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa at

More information about the Xml-dev mailing list