[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: well-formedness error




In general, the more specific the mime type is, the better. This allows those that care about such things to be able make routing decisions without peeking into the content. A web browser, for example, can use the content type to determine if the page is a PDF document, and load the proper plugin.

A web browser does like at the namespace the elemnets are in though. XHTML documents can be read in 'text/xml', 'application/xml', 'application/xhtml+xml' and probably also when send as 'application/mathml+xml' in the future (when Mozilla supports that MIME).



Of course, life is rarely simple: the above pretty much presumes a single purpose for every document. Some people have found it useful to have a feed be displayable in a web browser (along with some helpful usage information) as well as being consumable by a feed reader. In such cases, the more specific "application/atom+xml" mime type is not appropriate, and the more general "application/xml" should be used.

Actually, we call that a browser bug. And coding to bugs in browsers is something you shouldn't do.



-- Anne van Kesteren <http://annevankesteren.nl/>