Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
58 changes: 39 additions & 19 deletions VOTable.tex
Original file line number Diff line number Diff line change
Expand Up @@ -2195,6 +2195,7 @@ \subsection{Attribute Summary}
\clearpage
\section{MIME Type}
\label{sec:mime}

A VOTable document should be introduced by a
Multipurpose Internet Mail Extensions media type, or MIME type.
MIME type syntax is described in RFC 2045 section 5.1, and
Expand All @@ -2203,45 +2204,59 @@ \section{MIME Type}
(an application or a web browser) to launch the desired application
({\em e.g.} a visualisation tool).

In the HTTP protocol (RFC 2616), the MIME type is the value specified by the
In the HTTP protocol (RFC 9110), the MIME type is the value specified by the
{\textsf{Content-Type:}} header. The recommended MIME type describing
a VOTable document is {\literalvalue{\textsf{application/x-votable+xml}}}:
the {\bf x-} prefix indicates an experimental type, and
is required for non-registered media types; and the
{\bf+xml} suffix (defined by RFC 3023 section 7)
{\bf+xml} suffix (defined by RFC 7303 section 4.2)
indicates that the type describes a specialization of XML.
This type may be accompanied by an optional parameter
{\literalvalue{\textsf{serialization}}}
with a value specifying the serialization type used for table data within the
document, one of TABLEDATA, FITS, BINARY or BINARY2,
interpreted case-insensitively.
The following optional parameters are defined for use with
this MIME type:
\begin{description}
\item[{\tt serialization}]
If provided, this parameter must have one of the values
TABLEDATA, BINARY, BINARY2 or FITS,
interpreted case-insensitively,
and specifying the serialization type used for table data within the document.
In the absence of this parameter, any of the serializations may be
encountered. If multiple different serializations are used in the same
document, this parameter must not be used.

\item[{\tt content}]
This parameter may be used to provide information about the
form or semantics of the VOTable.
Its possible values are not discussed here,
but may be defined by other documents.
Unless otherwise specified, the value is assumed to be case-sensitive.

\item[{\tt charset}]
This parameter is defined by RFC 7303 and MAY be used
to specify a character encoding for the XML.
However, in line with that document it is RECOMMENDED NOT to use
this parameter, and that VOTables are encoded using UTF-8 without a BOM.
\end{description}

Alternatively the {\literalvalue{\textsf{text/xml}}} MIME type is acceptable
for services delivering data which are expected to be
visualized by humans in a browser; this MIME type
would preferably be associated with an XSL style sheet,
for a presentation of well-formatted tables. It is expected
that a few typical XSL style sheets will be accessible from
the IVOA site.
Note that use of the {\em text} top-level media type means that
for a presentation of well-formatted tables.
Note that use of the \literalvalue{\textsf{text}}
top-level media type means that
line breaks must be represented as a CRLF sequence
(RFC 2046, section 4.1.1).

For both of these MIME types, RFC 3023 also defines the optional
parameter {\literalvalue{\textsf{charset}}}.
If this parameter is not supplied, US-ASCII is assumed.
The optional \texttt{charset} parameter is also defined for this
MIME type with the same comments as above.

Any of the following Content-Type header values may therefore be used
by a service producing VOTables with the TABLEDATA serialization:
by a service producing VOTables with the TABLEDATA serialization
and considered to contain datalink content:
\begin{itemize}
\item {\textsf{text/xml}}
\item {\textsf{text/xml; charset={"}iso-8859-1"}}
\item {\textsf{application/x-votable+xml}}
\item {\textsf{APPLICATION/X-VOTABLE+XML; CONTENT=datalink}}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did you change the case here on purpose just to alert people to the media type's unfortunate case policy?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn't think it was worth spelling out the case-insensitivity explicitly - I don't want to replicate the syntax rules from RFC 2045 here - but since we have examples here anyway I thought I'd take the opportunity to give an idea of the range of possible representations.

\item {\textsf{application/x-votable+xml; serialization=tabledata}}
\item {\textsf{application/x-votable+xml; serialization=TABLEDATA; charset=iso-8859-1}}
\item {\textsf{application/x-votable+xml; serialization=TABLEDATA; content=datalink}}
\end{itemize}


Expand Down Expand Up @@ -2400,6 +2415,11 @@ \subsection{Differences Between Versions 1.5 and 1.6}
\item Related to the above, the \attr{width} attribute now has a meaning
for character data, namely field length in characters
(as opposed to code units).
\item The {\tt content} parameter is defined for the
{\tt application/x-votable+xml} MIME type (\Aref{sec:mime}).
\item Advice about character encoding is modernised: use UTF-8
without a {\tt charset} MIME parameter (\Aref{sec:mime}).

\end{itemize}

% NOTE: IVOA recommendations must be cited from docrepo.bib
Expand Down