3 ms·
> what precisely is the mimetype supposed to signify? The meaning of the document you're returning. > XML already allows you declare a schema for validation p
by masklinn 15y ago
> what precisely is the mimetype supposed to signify?
The meaning of the document you're returning.
> XML already allows you declare a schema for validation purposes.
But XML does not let you tag documents with arbitrary schemas. As far as I know, there is no way to include a RelaxNG or Schematron schema reference in an XML document in a standardized manner. Using specialized vendor mime types lets you provide this information: the mime type maps onto (among other things) the schema for the meta-type.
> It appears to me, if you really care about the content of your resource, then you should use the schema facilities provided by your encoding
There is nothing saying they can't go hand in hand. Indeed, it's quite the opposite: the vendor mime type you get maps directly to a corresponding schema for validation (the client generally should not validate what it gets, really, though it can).
> Historically, mimetypes (afaik) have never made any assumptions about the content of a resource, other than it adheres structurally to whatever the mimetype declares.
That's very much incorrect. See: application/xhtml+xml, application/svg+xml, model/x3d+vrml, application/soap+xml. And on the vendor-specific side of things, application/vnd.google-earth.kml+xml.