diff --git a/VOTable.tex b/VOTable.tex index fbd4bb9..a3afe98 100644 --- a/VOTable.tex +++ b/VOTable.tex @@ -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 @@ -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}} \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} @@ -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