MIME types in DAL services

Doug Tody dtody at nrao.edu
Mon Apr 16 14:14:41 PDT 2007


Hi All -

Here is a simple, concrete issue which hopefully we can resolve easily
within this group.

An issue which has come up recently, and which affects all DAL
Services, is the MIME type (or content type) used for the query
response, which is a VOTable, and the content type used to specify
VOTable as an output data format, which is a related issue.

For years now, the query response from cone search and SIAP services
has come back with a content type of "text/xml".   This is convenient,
as we can issue simple queries in a Web browser and view the results
directly, even though the document returned is actually a VOTable.

However, the current generally accepted MIME type for VOTable documents
appears to be "application/x-votable+xml".  This is probably the most
accurate and correct content specification, and is best in cases where
the document is expected to be passed off to some application which
understands the VOTable format.

Another approach which has been played with a bit is to use
MIME-type parameterization, e.g., "text/xml;subtype=votable" (the
form "text/xml;x-votable" has also been suggested but may not be
legal syntax).  The advantage of this approach is that the base type
remains "text/xml", and any standard XML tool, such as a browser. will
be able to do something useful with this content (if a browser sees
"application/x-votable+xml" it will in general have no clue what
to do and will prompt for what you want to do with the document).
In general, MIME-type parameterization can be useful to specify
additional information about otherwise standard content, without
preventing general tools from working with the content.

See for example

     http://demo.cubewerx.com/demo/cubeserv/cubeserv.cgi?CONFIG=mars&REQUEST=GetCapabilities

or (longer version):

     http://demo.cubewerx.com/demo/cubeserv/cubeserv.cgi?CONFIG=main&REQUEST=GetCapabilities

which will return output from an OpenGIS-style getCapabilities operation.
It contains MIME-type Format specifiers such as the following:

     image/png; PhotometricInterpretation=PaletteColor
     application/x-bxml; version="0.0.8"; subtype="bxfs/0.0.1"
     text/xml; subtype="bxfs/0.0.1"

The question is what is the best approach for DAL services, most
notable in the case of VOTable (although parameterization is more
general).  My suggestion is that we use "application/x-votable+xml",
possibly with parameterization, as the FORMAT qualifier for datasets
returned by the service, and continue to use "text/xml", possibly
with parameterization, for the query response, for consistency with
existing services and so that we can continue to have the ability to
view simple queries directly in a browser.

 	- Doug



More information about the dal mailing list