@@ -580,9 +580,9 @@ \section{Data Types and Literal Values}
580
580
\label {sec:xtypes }
581
581
In this section we specify how values are to be expressed. These literal values
582
582
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),
584
584
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
586
586
structured values: \emph {timestamp }, \emph {interval },
587
587
\emph {hms }, \emph {dms },
588
588
\emph {point }, \emph {circle }, \emph {range }, \emph {polygon }, \emph {moc },
@@ -594,6 +594,14 @@ \section{Data Types and Literal Values}
594
594
interoperable and metadata-rich VOTable constructs can be employed
595
595
instead.
596
596
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
+
597
605
Services may use non-standard \xmlel {xtype} values for non-standard datatypes, but if they
598
606
do so they should include a simple prefix (a string followed by a colon
599
607
followed by the non-standard xtype) so client software can easily determine
@@ -602,25 +610,23 @@ \section{Data Types and Literal Values}
602
610
603
611
\subsection {Numbers }
604
612
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.
606
615
607
616
\subsection {Boolean }
608
617
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.
612
620
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:
617
624
618
625
\begin {verbatim }
619
- BAR=0
620
- BAR=false
626
+ datatype="char" arraysize="*" xtype="timestamp"
621
627
\end {verbatim }
622
628
623
- \subsection { Timestamp }
629
+ \noindent
624
630
Date and time values must be represented using the convention established for
625
631
FITS \citep {std:FITS } and STC \citep {2007ivoa.spec.1030R } for astronomical times:
626
632
@@ -673,18 +679,29 @@ \subsection{Timestamp}
673
679
\citep {std:FITS } convention for astronomical values by omitting the Z but still
674
680
defaulting to UTC.
675
681
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
-
681
682
\subsection {Intervals }
682
683
Numeric intervals are pairs of numeric values (integer and floating-point). For floating point
683
684
intervals, special values for positive and negative infinity may be used to specify open-ended intervals.
684
685
Finite bounding values are included in the interval. Open-ended floating-point
685
686
intervals have one or both bounding values that are infinite. Intervals with two identical values
686
687
are equivalent to a scalar value but must still be serialised as a pair of values.
687
688
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
+
688
705
The representation of an interval uses the numeric array serialisation from
689
706
VOTable. For example:
690
707
@@ -706,53 +723,51 @@ \subsection{Intervals}
706
723
707
724
\noindent are all legal integer interval values.
708
725
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
719
728
or maximum value. These are specified using the standard scalar \verb |MIN | and
720
729
\verb |MAX | child elements to describe the (minimum) lower bound and (maximum)
721
730
upper bound of interval(s) respectively.
722
731
723
732
\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:
731
735
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 }
734
743
735
744
For \verb |xtype="hms" |, the values are serialised as hours:minutes:seconds where hours
736
745
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
738
747
values and seconds is a real value. All hours must fall within [0,24], degrees
739
748
(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
744
755
be expressed as 12:35:00 instead.
745
756
746
757
\subsection {Point }
747
758
Geometry values are two-dimensional; although they are usually longitude and
748
759
latitude values in spherical coordinates this is specified in the coordinate
749
760
metadata and not in the values.
750
761
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:
756
771
757
772
\begin {verbatim }
758
773
12.3 45.6
@@ -770,9 +785,12 @@ \subsection{Point}
770
785
specific services may define something that is applicable in a more limited context.
771
786
772
787
\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
+
776
794
The values are ordered as a point followed by a radius. For example:
777
795
778
796
\begin {verbatim }
@@ -796,9 +814,13 @@ \subsection{Circle}
796
814
more limited context.
797
815
798
816
\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
802
824
as two pairs of coordinate values: min-coordinate1 max-coordinate1 min-coordinate2 max-coordinate2.
803
825
For example:
804
826
@@ -829,9 +851,14 @@ \subsection{Range}
829
851
more limited context.
830
852
831
853
\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
+
835
862
The array holds a sequence of vertices (points) (e.g. longitude latitude longitude
836
863
latitude ...) with an even number of values and at least three (3) points (six
837
864
(6) numeric values). A polygon is always implicitly closed: there is an implied edge from
@@ -862,20 +889,29 @@ \subsection{Polygon}
862
889
more limited context.
863
890
864
891
\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
869
900
The value is the ascii serialisation of a MOC specified in \citet {2022ivoa.spec.0727F }
870
901
section 4.3.2 and may be a one- or two-dimension (spatial) MOC.
871
902
872
903
Note: explicit time MOC and space-time MOC xtypes may be added in a future version.
873
904
874
905
\subsection {Multi-Polygon }
875
906
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
879
915
The array holds a sequence of non-overlapping polygon(s) separated by a pair of \verb |NaN | values
880
916
(a NaN point). For example:
881
917
@@ -892,9 +928,13 @@ \subsection{Multi-Polygon}
892
928
for polygon above, except that the maximum value may be a multipolygon.
893
929
894
930
\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
898
938
The value is a polymorphic shape made up of a type label (equivalent to an existing simple
899
939
geometric xtype and the string serialisation of the value as described above.
900
940
@@ -954,16 +994,20 @@ \subsection{Shape}
954
994
more limited context.
955
995
956
996
\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 }
961
1003
962
1004
\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 }
967
1011
968
1012
UUID values \citep {std:RFC4122 } are serialised using the canonical ascii (hex)
969
1013
representation, for example: e0b895ca-2ee4-4f0f-b595-cbd83be40b04.
@@ -1535,12 +1579,13 @@ \section{Changes}
1535
1579
1536
1580
\subsection {PR-DALI-1.2 }
1537
1581
\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
1539
1583
MAXREC
1540
1584
\item added new xtypes: hms, dms, moc, multipolygon, range, shape, uri,
1541
1585
uuid, json
1542
1586
\item changed VOSI-availability to optional
1543
1587
\item changed VOSI-capability so it is only required for registered services
1588
+ \item clarified use of VOTable serialisation for numbers and boolean
1544
1589
\end {itemize }
1545
1590
1546
1591
\subsection {PR-DALI-1.1-20170412 }
0 commit comments