[TAP] draft 0.42 (cleanup toward 0.5)

Patrick Dowler patrick.dowler at nrc-cnrc.gc.ca
Fri May 15 16:16:31 PDT 2009


OK, now I had to go read the RFC on a sunny friday afternoon :-(

http://tools.ietf.org/html/rfc3023   (note: it's not 3032 :-)

Section 7 talks about the +xml naming convention for new XML-based media types 
and, as Mark pointed out, A.6 (most of A in fact) comes down against 
parameterising to describe sub-type, mainly because MIME dispatch does not 
take parameters into account. 

So, it looks to me that text/x-votable+xml would be the best choice; see below 
for reasons.

Pat

On Friday 15 May 2009 13:13:43 you wrote:
> Hi Mark, Pat -
>
> I must have missed this earlier.  I am pretty sure that the
> parameterized syntax is legal, although it is less commonly seen (I
> have also seen this in OpenGIS for example).  The advantage is that
> if we parameterize text/xml to specify the type of content in the XML
> then it is still a text/xml document, and can be processed as such by
> common applications such as browsers, which will typically render and

My interpretation of the RFC is that this should be true of text/something+xml 
as well... the whole intent of the +xml suffix is to enable generic xml 
processing not anticipated for the specific type.

> Hence in an interface like SSA text/xml with a votable subformat is
> used for the query response, but application/x-votable+xml is used
> for the spectrum if it is returned as a VOTable.


> In the case of TAP there is no such distinction and no compelling
> case to go either way.  If we care about directly viewing the VOTable
> XML in a browser, text/xml would be preferred.  If we are happy

The RFC also suggests text base type if the content can be plausibly viewed by 
generic software (xml browsers, xml or text editors, etc). VOTable is viewable 
enough to qualify :-)

> to have the browser merely save the output to a file (or possibly
> display it in an application if the MIME type is configured), then
> the application MIME type would be preferred.

There's the catch: if you use text/xml;content=x-votable the claim in the rfc 
is that mime dispatch will (should) ignore the parameter and dispatch to the 
app responsible for text/xml, but if you use text/x-votable+xml then it will 
dispatch to the app configured for that mimetype, and can dispatch to a generic 
XML app if no specific one is known. 

That's what it says anyway... If I look at the mime config of my browser, there 
are quite afew examples under application/ which use +xml naming convention, 
and a few under text, eg application/atom+xml, application/rdf+xml, 
application/rss+xml, as well as things like image/svg+xml.



> On Fri, 15 May 2009, Patrick Dowler wrote:
> > On Wednesday 29 April 2009 05:49:15 Mark Taylor wrote:
> > > Sec 2.7.1 and Sec 2.9:
> > >    The usual MIME type for VOTable is "application/x-votable+xml"
> > >    or maybe "text/x-votable+xml", not "text/xml; content=x-votable".
> > >    "content" is not listed in the text/xml MIME type registration
> > >    (RFC3023) as a mandatory or optional parameter of the text/xml
> > >    MIME type.  RFC3032 also explicitly considers and rejects the
> > >    idea of using a parameter like this to specify XML subformats -
> > >    see Appendix A.6.
> >
> > Which of "application/x-votable+xml" and "text/x-votable+xml" is
> > considered the best choice for TAP? For IVOA services in general? Are
> > there good reasons to chose one over the other?


-- 

Patrick Dowler
Tel/Tél: (250) 363-0044
Canadian Astronomy Data Centre
National Research Council Canada
5071 West Saanich Road
Victoria, BC V9E 2M7

Centre canadien de donnees astronomiques
Conseil national de recherches Canada
5071, chemin West Saanich
Victoria (C.-B.) V9E 2M7
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.ivoa.net/pipermail/dal/attachments/20090515/8ef4ed5a/attachment-0003.html>


More information about the dal mailing list