[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Finishing the XML-tagging discussion
On 3/16/2000 8:29 PM, Paul Hoffman / IMC wrote:
> Folks, this discussion has gotten so far away from its origin that we've
> lost track of why we are having it.
>
> The original problem is: how do I have my MIME handler automatically know
> that it should hand a body part that has an unknown tag on it to the
> generic XML processor?
>
> We have explored many, many alternatives in detail. They all have
> drawbacks, some of them severe. However, there is a simple solution that
> involves no changes to any protocol *and* will stop this discussion so we
> can move on with more interesting aspects of XML.
>
> Proposed solution: every time the MIME handler comes across an unknown
> media type, it looks in the body part and sees if it is XML. If it is XML,
> add this media type to the "hand to the generic XML processor" list. If it
> is not XML, add this media type to the "don't hand to the generic XML
> processor" list. If you are really paranoid about missing something, clear
> the latter list every so often.
>
> Done. No changes to the naming schemes needed, no hoping that if the naming
> scheme changes that all future media types follow it, no worrying about
> 'x-' names getting it wrong. Making these lists won't be that hard; there
> are only 330 types in the IANA registry now, and that includes all of the
> 'vnd.' names.
>
> Look inside and see if this media type seems to carry XML. This is what
> automated systems are good at. As for us humans, we seem to be pretty good
> at finding rat holes to go down...
This sounds like a good solution. Another solution to the general problem
of "How do I specify that a given MIME type can be handled as another
alternate MIME type?" might be to do something like:
Content-Type: application/iotp; alternate-type=text/xml
If the client doesn't have something that can handle application/iotp, it
starts going through the alternate types to see if there's another way to
handle the data. Current clients would just ignore the alternate-type.
This seems like a really general solution that would solve this particular
problem.
Dan