Chris Lilley wrote:
a) application/xml for xml files. All are required to be well
formed,as
per the XML specification, otherwise it is a fatal error.
b) application/xml-epe for external parsed entities which are not
themselves well-formed instances
MURATA Makoto replied:
Point of clarification. I have an external parsed entity. I use
it only as an external parsed entity. Incidentally, it also parses
as an XML document, but this was never intended. Which one should
I use?
Chris Lilley wrote:
The algorithm is as follows:
Is it well formed instance
Yes: use a)
No: use b)
This is not an appropriate algorithm. The choice of the MIME type
to use for a communication depends on the intent of the communication
as well as the nature of the body of the communication. It might
be appropriate to use text/plain, for example, if you intend for
the recipient to read the actual XML rather than interpret it,
and it might be appropriate to use application/octet-stream if you
want no interpretation at all.
The point is that the general question of "this message body, which
MIME type should I use" can always have multiple answers (since
application/octet-stream usually applies, for example).
The XHTML group got caught up in this, since there are some XHTML
bodies for which 'text/html' are appropriate and others that are not.
Don't try to construct a functional one-to-one mapping from
message body content to MIME type, because you can and will get
multiple values.