Skip to content

Commit 47b9c6a

Browse files
authored
Merge branch 'main' into add-json-xtype
2 parents 8bb46de + 73e12d2 commit 47b9c6a

File tree

1 file changed

+120
-75
lines changed

1 file changed

+120
-75
lines changed

DALI.tex

Lines changed: 120 additions & 75 deletions
Original file line numberDiff line numberDiff line change
@@ -580,9 +580,9 @@ \section{Data Types and Literal Values}
580580
\label{sec:xtypes}
581581
In this section we specify how values are to be expressed. These literal values
582582
are used as input or output from DAL services: as parameter values when
583-
invoking simple services, as data values in response documents (e.g. VOTable),
583+
invoking services, as data values in response documents (e.g. VOTable),
584584
etc. We define some general purpose values for the \xmlel{xtype} attribute of
585-
the VOTable \xmlel{FIELD} and \xmlel{PARAM} elements for simple
585+
the VOTable \xmlel{FIELD} and \xmlel{PARAM} elements for simple
586586
structured values: \emph{timestamp}, \emph{interval},
587587
\emph{hms}, \emph{dms},
588588
\emph{point}, \emph{circle}, \emph{range}, \emph{polygon}, \emph{moc},
@@ -594,6 +594,14 @@ \section{Data Types and Literal Values}
594594
interoperable and metadata-rich VOTable constructs can be employed
595595
instead.
596596

597+
In the following, where we say \verb|datatype="char"| we also allow the VOTable
598+
\verb|datatype="unicodeChar"|. Where we say \verb|arraysize="*"| we also allow
599+
providers to be more explicit by using a fixed size (e.g. \verb|20|) or fixed
600+
with a limit (e.g. \verb|20*|) when applicable.
601+
602+
In the following, where we say "VOTable type metadata", we mean either VOTable
603+
\xmlel{FIELD} or \xmlel{PARAM} elements.
604+
597605
Services may use non-standard \xmlel{xtype} values for non-standard datatypes, but if they
598606
do so they should include a simple prefix (a string followed by a colon
599607
followed by the non-standard xtype) so client software can easily determine
@@ -602,25 +610,23 @@ \section{Data Types and Literal Values}
602610

603611
\subsection{Numbers}
604612
Integer and real numbers must be represented in a manner consistent with the
605-
specification for numbers in VOTable \citep{2019ivoa.spec.1021O}.
613+
specification for numbers in VOTable \citep{2019ivoa.spec.1021O}. When used as
614+
values in service parameters, the serialization for \xmlel{TABLEDATA} must be used.
606615

607616
\subsection{Boolean}
608617
Boolean values must be represented in a manner consistent with the
609-
specification
610-
for Boolean in XML Schema Datatypes \citep{std:XSD2}. The values 0 and false
611-
are equivalent. The values 1 and true are equivalent.
618+
specification for boolean in VOTable \citep{2019ivoa.spec.1021O}. When used as
619+
values in service parameters, the serialization for \xmlel{TABLEDATA} must be used.
612620

613-
\begin{verbatim}
614-
FOO=1
615-
FOO=true
616-
\end{verbatim}
621+
\subsection{Timestamp}
622+
Timestamp values serialised in VOTable or described in service parameters must have
623+
the following VOTable type metadata:
617624

618625
\begin{verbatim}
619-
BAR=0
620-
BAR=false
626+
datatype="char" arraysize="*" xtype="timestamp"
621627
\end{verbatim}
622628

623-
\subsection{Timestamp}
629+
\noindent
624630
Date and time values must be represented using the convention established for
625631
FITS \citep{std:FITS} and STC \citep{2007ivoa.spec.1030R} for astronomical times:
626632

@@ -673,18 +679,29 @@ \subsection{Timestamp}
673679
\citep{std:FITS} convention for astronomical values by omitting the Z but still
674680
defaulting to UTC.
675681

676-
Timestamp values serialised on VOTable or in service parameters must have the following metadata in
677-
the \xmlel{FIELD} element: \verb|datatype="char"|, \verb|arraysize="*"|,
678-
\verb|xtype="timestamp"|; the arraysize may be set to a more specific value if it is known (e.g.
679-
\verb|arraysize="10"| for dates only).
680-
681682
\subsection{Intervals}
682683
Numeric intervals are pairs of numeric values (integer and floating-point). For floating point
683684
intervals, special values for positive and negative infinity may be used to specify open-ended intervals.
684685
Finite bounding values are included in the interval. Open-ended floating-point
685686
intervals have one or both bounding values that are infinite. Intervals with two identical values
686687
are equivalent to a scalar value but must still be serialised as a pair of values.
687688

689+
Floating point interval values serialised in VOTable or described in service parameters must have
690+
the following VOTable type metadata:
691+
692+
\begin{verbatim}
693+
datatype="double" arraysize="2" xtype="interval"
694+
\end{verbatim}
695+
\noindent where \verb|float| is also permitted.
696+
697+
Integer interval values serialised in VOTable or described in service parameters must have the
698+
following VOTable type metadata:
699+
700+
\begin{verbatim}
701+
datatype="int" arraysize="2" xtype="interval"
702+
\end{verbatim}
703+
\noindent where \verb|short| or \verb|long| are also permitted.
704+
688705
The representation of an interval uses the numeric array serialisation from
689706
VOTable. For example:
690707

@@ -706,53 +723,51 @@ \subsection{Intervals}
706723

707724
\noindent are all legal integer interval values.
708725

709-
Floating point interval values serialised in VOTable or service parameters must have the following metadata in the
710-
\xmlel{FIELD} element: \verb|datatype="double"| or \verb|datatype="float"|,
711-
\verb|arraysize="2"|, \verb|xtype="interval"|.
712-
713-
Integer interval values serialised in VOTable or service parameters must have the following metadata in the
714-
\xmlel{FIELD} element: \verb|datatype="short"| or \verb|datatype="int"| or
715-
\verb|datatype="long"|, \verb|arraysize="2"|, \verb|xtype="interval"|.
716-
717-
Interval values serialised in VOTable (\xmlel{FIELD}) or service parameters
718-
(\xmlel{PARAM}) with this xtype may include additional metadata like minimum
726+
Interval values serialised in VOTable or described in service parameters
727+
with this xtype may include additional metadata like minimum
719728
or maximum value. These are specified using the standard scalar \verb|MIN| and
720729
\verb|MAX| child elements to describe the (minimum) lower bound and (maximum)
721730
upper bound of interval(s) respectively.
722731

723732
\subsection{Sexagesimal Coordinates}
724-
Coordinate values expressed in sexagesimal form can be described using the following
725-
xtypes in both VOTable \xmlel{FIELD} and \xmlel{PARAM} elements:
726-
727-
\begin{itemize}
728-
\item right ascension: \verb|datatype="char"| \verb|arraysize="*"| \verb|xtype="hms"|
729-
\item declination: \verb|datatype="char"| \verb|arraysize="*"| \verb|xtype="dms"|
730-
\end{itemize}
733+
Coordinate values expressed in sexagesimal form can be described using the
734+
following VOTable type metadata. For right ascension:
731735

732-
\noindent
733-
(the arraysize may also be a fixed length or variable length with limit).
736+
\begin{verbatim}
737+
datatype="char" arraysize="*" xtype="hms"
738+
\end{verbatim}
739+
\noindent and for declination:
740+
\begin{verbatim}
741+
datatype="char" arraysize="*" xtype="dms"
742+
\end{verbatim}
734743

735744
For \verb|xtype="hms"|, the values are serialised as hours:minutes:seconds where hours
736745
and minutes are integer values and seconds is a real value. For \verb|xtype="dms"|, the values
737-
are serialised as degrees:minutes:seconds where degrees and minutes are integer
746+
are serialised as degrees:minutes:seconds where degrees and minutes (of arc) are integer
738747
values and seconds is a real value. All hours must fall within [0,24], degrees
739748
(latitude) must fall within [-90,90], minutes must fall within [0,60), and seconds
740-
must fall within [0,60). Valid values for \verb|xtype="hms"| are from 0:0:0 to 24:0:0.
741-
Valid values for \verb|xtype="dms"| are from -90:0:0 to 90:0:0; an optional + sign at
742-
the start is allowed (e.g. +10:20:30) but not required. The upper bound on minutes
743-
and seconds is not part of the valid range; for example 12:34:60 is not allowed and must
749+
must fall within [0,60). Leading zeros are permitted so that values of minutes and the integer
750+
part of seconds can be expressed as 2-digit numbers. Valid values for \verb|xtype="hms"| are
751+
from 00:00:00 to 24:00:00.
752+
Valid values for \verb|xtype="dms"| are from -90:00:00 to 90:00:00; an optional + sign at
753+
the start is allowed (e.g. +10:20:30) but not required. The upper bound on minutes
754+
and seconds is not part of the valid range; for example 12:34:60 is not allowed and must
744755
be expressed as 12:35:00 instead.
745756

746757
\subsection{Point}
747758
Geometry values are two-dimensional; although they are usually longitude and
748759
latitude values in spherical coordinates this is specified in the coordinate
749760
metadata and not in the values.
750761

751-
Point values serialised in VOTable or service parameters must have the following metadata in the
752-
\xmlel{FIELD} element: \verb|datatype="double"| or \verb|datatype="float"|, \verb|arraysize="2"|,
753-
\verb|xtype="point"|. For points in a
754-
spherical coordinate system, the values are ordered as: longitude latitude. For
755-
example:
762+
Point values serialised in VOTable or described in service parameters must have following
763+
VOTable type metadata:
764+
765+
\begin{verbatim}
766+
datatype="double" arraysize="2" xtype="point"
767+
\end{verbatim}
768+
\noindent where \verb|float| is also allowed.
769+
770+
For points in a spherical coordinate system, the values are ordered as: longitude latitude. For example:
756771

757772
\begin{verbatim}
758773
12.3 45.6
@@ -770,9 +785,12 @@ \subsection{Point}
770785
specific services may define something that is applicable in a more limited context.
771786

772787
\subsection{Circle}
773-
Circle values serialised in VOTable or service parameters must have the following metadata in the
774-
\xmlel{FIELD} element: \verb|datatype="double"| or \verb|datatype="float"|, \verb|arraysize="3"|,
775-
\verb|xtype="circle"|.
788+
Circle values serialised in VOTable or described in service parameters must have the following VOTable type metadata:
789+
\begin{verbatim}
790+
datatype="double" arraysize="3" xtype="circle"
791+
\end{verbatim}
792+
\noindent where \verb|float| is also allowed.
793+
776794
The values are ordered as a point followed by a radius. For example:
777795

778796
\begin{verbatim}
@@ -796,9 +814,13 @@ \subsection{Circle}
796814
more limited context.
797815

798816
\subsection{Range}
799-
Range values serialised in VOTable or service parameters must have the following
800-
metadata in the \xmlel{FIELD} element: \verb|datatype="double"| or \verb|datatype="float"|,
801-
\verb|arraysize="4"|, \verb|xtype="range"|. A range is a coordinate bounding box specified
817+
Range values serialised in VOTable or described in service parameters must have the following VOTable type metadata:
818+
\begin{verbatim}
819+
datatype="double" arraysize="4" xtype="range"
820+
\end{verbatim}
821+
\noindent where \verb|float| is also allowed.
822+
823+
A range is a coordinate bounding box specified
802824
as two pairs of coordinate values: min-coordinate1 max-coordinate1 min-coordinate2 max-coordinate2.
803825
For example:
804826

@@ -829,9 +851,14 @@ \subsection{Range}
829851
more limited context.
830852

831853
\subsection{Polygon}
832-
Polygon values serialised in VOTable or service parameters must have the following metadata in the
833-
\xmlel{FIELD} element: \verb|datatype="double"| or \verb|datatype="float"|, \verb|arraysize="*"|, \verb|xtype="polygon"|
834-
(where arraysize may also be fixed length or variable length with limit).
854+
Polygon values serialised in VOTable or described in service parameters must have the
855+
following VOTable type metadata:
856+
857+
\begin{verbatim}
858+
datatype="double" arraysize="*" xtype="polygon"
859+
\end{verbatim}
860+
\noindent where \verb|float| is also allowed.
861+
835862
The array holds a sequence of vertices (points) (e.g. longitude latitude longitude
836863
latitude ...) with an even number of values and at least three (3) points (six
837864
(6) numeric values). A polygon is always implicitly closed: there is an implied edge from
@@ -862,20 +889,29 @@ \subsection{Polygon}
862889
more limited context.
863890

864891
\subsection{MOC}
865-
Spatial MOC (Multi Order Coverage) values serialised in VOTable or service parameters must
866-
have the following metadata in the \xmlel{FIELD} element:
867-
\verb|datatype="char"|, \verb|arraysize="*"|, \verb|xtype="moc"|
868-
(where arraysize may also be fixed length or variable length with limit).
892+
Spatial MOC (Multi Order Coverage) values serialised in VOTable or described in service parameters must
893+
have the following VOTable type metadata:
894+
895+
\begin{verbatim}
896+
datatype="char" arraysize="*" xtype="moc"
897+
\end{verbatim}
898+
899+
\noindent
869900
The value is the ascii serialisation of a MOC specified in \citet{2022ivoa.spec.0727F}
870901
section 4.3.2 and may be a one- or two-dimension (spatial) MOC.
871902

872903
Note: explicit time MOC and space-time MOC xtypes may be added in a future version.
873904

874905
\subsection{Multi-Polygon}
875906
Multi-polygon values serialised in VOTable or service parameters must have the
876-
following metadata in the \xmlel{FIELD} element: \verb|datatype="double"| or \verb|datatype="float"|,
877-
\verb|arraysize="*"|, \verb|xtype="multipolygon"|
878-
(where arraysize may also be fixed length or variable length with limit).
907+
following VOTable type metadata:
908+
909+
\begin{verbatim}
910+
datatype="double" arraysize="*" xtype="multipolygon"
911+
\end{verbatim}
912+
\noindent where \verb|float| is also allowed.
913+
914+
\noindent
879915
The array holds a sequence of non-overlapping polygon(s) separated by a pair of \verb|NaN| values
880916
(a NaN point). For example:
881917

@@ -892,9 +928,13 @@ \subsection{Multi-Polygon}
892928
for polygon above, except that the maximum value may be a multipolygon.
893929

894930
\subsection{Shape}
895-
Shape values serialised in VOTable or service parameters must have the following metadata in the
896-
\xmlel{FIELD} element: \verb|datatype="char"|, \verb|arraysize="*"|, \verb|xtype="shape"|
897-
(where arraysize may also be fixed length or variable length with limit).
931+
Shape values serialised in VOTable or described in service parameters must have the following VOTable type metadata:
932+
933+
\begin{verbatim}
934+
datatype="char" arraysize="*" xtype="shape"
935+
\end{verbatim}
936+
937+
\noindent
898938
The value is a polymorphic shape made up of a type label (equivalent to an existing simple
899939
geometric xtype and the string serialisation of the value as described above.
900940

@@ -954,16 +994,20 @@ \subsection{Shape}
954994
more limited context.
955995

956996
\subsection{URI}
957-
URI values \citep{std:RFC3986} serialised in VOTable or service parameters
958-
should have the following metadata in the \xmlel{FIELD} element: \verb|datatype="char"|,
959-
\verb|arraysize="*"|, \verb|xtype="uri"| (where arraysize may also be fixed length or
960-
variable length with limit).
997+
URI values \citep{std:RFC3986} serialised in VOTable or described in service parameters
998+
should have the type following metadata:
999+
1000+
\begin{verbatim}
1001+
datatype="char" arraysize="*" xtype="uri"
1002+
\end{verbatim}
9611003

9621004
\subsection{UUID}
963-
Universal Unique Identifier (UUID) values serialised in VOTable or service parameters
964-
should have the following metadata in the \xmlel{FIELD} element: \verb|datatype="char"|,
965-
\verb|arraysize="36"|, \verb|xtype="uuid"| (where arraysize may also be fixed length or
966-
variable length with limit).
1005+
Universal Unique Identifier (UUID) values serialised in VOTable or described in service parameters
1006+
should have the following VOTable type metadata:
1007+
1008+
\begin{verbatim}
1009+
datatype="char" arraysize="*" xtype="uuid"
1010+
\end{verbatim}
9671011

9681012
UUID values \citep{std:RFC4122} are serialised using the canonical ascii (hex)
9691013
representation, for example: e0b895ca-2ee4-4f0f-b595-cbd83be40b04.
@@ -1535,12 +1579,13 @@ \section{Changes}
15351579

15361580
\subsection{PR-DALI-1.2}
15371581
\begin{itemize}
1538-
\item Clarified that truncation indicated by OVERFLOW can occur independent of
1582+
\item clarified that truncation indicated by OVERFLOW can occur independent of
15391583
MAXREC
15401584
\item added new xtypes: hms, dms, moc, multipolygon, range, shape, uri,
15411585
uuid, json
15421586
\item changed VOSI-availability to optional
15431587
\item changed VOSI-capability so it is only required for registered services
1588+
\item clarified use of VOTable serialisation for numbers and boolean
15441589
\end{itemize}
15451590

15461591
\subsection{PR-DALI-1.1-20170412}

0 commit comments

Comments
 (0)