-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathVOResource.tex
3449 lines (2694 loc) · 123 KB
/
VOResource.tex
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
\documentclass[11pt,a4paper]{ivoa}
\input tthdefs
\input gitmeta
% we want a bit more space so our schema definitions don't have to break
% that often
\usepackage[a4paper,hmargin={3cm,4cm},vmargin={3cm,4cm}]{geometry}
\usepackage{todonotes}
\usepackage{listings}
\lstloadlanguages{XML}
\gdef\breakmarkpre{\char'023\char'023}
\lstset{flexiblecolumns=true,tagstyle=\ttfamily, showstringspaces=False,
breaklines=true,prebreak=\breakmarkpre}
\hyphenation{stan-dard-id}
\hyphenation{Ha-nisch}
\title{VOResource: an XML Encoding Schema for Resource Metadata}
\ivoagroup{Registry}
\author[http://www.ivoa.net/twiki/bin/view/IVOA/RayPlante]{Raymond Plante}
\author[http://www.ivoa.net/twiki/bin/view/IVOA/KevinBenson]{Kevin Benson}
\author[http://www.ivoa.net/twiki/bin/view/IVOA/MarkusDemleitner]{Markus Demleitner}
\author[http://www.ivoa.net/twiki/bin/view/IVOA/MatthewGraham]{Matthew Graham}
\author[http://www.ivoa.net/twiki/bin/view/IVOA/GretchenGreene]{Gretchen Greene}
\author[http://www.ivoa.net/twiki/bin/view/IVOA/PaulHarrison]{Paul Harrison}
\author[http://www.ivoa.net/twiki/bin/view/IVOA/GerardLemson]{Gerard Lemson}
\author[http://www.ivoa.net/twiki/bin/view/IVOA/TonyLinde]{Tony Linde}
\author[http://www.ivoa.net/twiki/bin/view/IVOA/GuyRixon]{Guy Rixon}
\editor{Markus Demleitner}
\previousversion[https://ivoa.net/documents/VOResource/20230105/]{WD-1.2-20230105}
\previousversion[https://ivoa.net/documents/VOResource/20180625/]{REC-1.1}
\previousversion[http://www.ivoa.net/Documents/REC/ReR/VOResource-20080222.html]{REC-1.03}
\previousversion[http://www.ivoa.net/Documents/WD/ReR/VOResource-20060530.html]
{WD-2006-05-30}
\begin{document}
\begin{abstract}
This document describes an XML encoding standard for IVOA Resource
Metadata, referred to as VOResource. This schema is primarily
intended to support metadata exchange between
interoperable registries and resource discovery within them.
However, any application that needs to describe resources
may use this schema. In this document, we define the types and
elements that make up the schema in close alignment to the metadata terms
defined in Resource Metadata for the Virtual Observatory
\citep{2007ivoa.spec.0302H}, but also taking into account other metadata
standards as well as experiences from the operation of the VO Registry.
We also describe the general model for the
schema and explain how it is extended to add new metadata terms and
describe more specific types of resources.
\end{abstract}
\section*{Acknowledgments}
This document has been developed with support from the
National Science Foundation's
Information Technology Research Program under Cooperative Agreement
AST0122449 with The Johns Hopkins University, from the
UK Particle Physics and Astronomy
Research Council (PPARC), and from the
European Commission's Sixth
Framework Program via the
Optical Infrared Coordination Network (OPTICON). Funding for the 2016
update was provided by BMBF grant GAVO-2014, grant number 05A14VHA.
\section*{Conformance-related definitions}
The words ``MUST'', ``SHALL'', ``SHOULD'', ``MAY'', ``RECOMMENDED'', and
``OPTIONAL'' (in upper or lower case) used in this document are to be
interpreted as described in IETF standard RFC2119 \citep{std:RFC2119}.
The \emph{Virtual Observatory (VO)} is a
general term for a collection of federated resources that can be used
to conduct astronomical research, education, and outreach.
The \href{http://www.ivoa.net}{International
Virtual Observatory Alliance (IVOA)} is a global
collaboration of separately funded projects to develop standards and
infrastructure that enable VO applications.
\section*{Syntax Notation Using XML Schema}
The eXtensible Markup Language, or XML, is document syntax for marking
textual information with named tags and is defined by \citet{std:XML}.
The set of XML tag names and the syntax
rules for their use is referred to as the document schema. One way to
formally define a schema for XML documents is using the W3C standard
known as XML Schema \citep{std:XSD}.
The XML Schema of VOResource is
available from the IVOA document
repository\footnote{\url{http://www.ivoa.net/xml}} at any time.
Parts of the schema appear within the main sections of this document;
however, documentation nodes have been left out for the sake of brevity.
Where the content of the pieces of schema embedded in this text
diverges from the schema document in the IVOA document
repository, the version in the schema repository is authoritative.
References to specific elements and types defined in the VOResource
schema include the namespaces prefix \xmlel{vr} as in
\xmlel{vr:Resource} (a type defined in the VOResource schema). For more
details on the intended interpretation, refer to
sect.~\ref{sect:namespace}.
\section{Introduction}
The IVOA recommendation ``Resource Metadata for the Virtual
Observatory''
\citep{2007ivoa.spec.0302H}, hereafter referred to as the RM, defines
metadata terms for describing resources. The RM defines a resource as:
\begin{quotation}
\dots VO element that can be described in terms of who curates or
maintains it and which can be given a name and a unique identifier.
Just about anything can be a resource: it can be an abstract idea,
such as sky coverage or an instrumental setup, or it can be fairly
concrete, like an organisation or a data collection. This definition
is consistent with its use in the general Web community as
``anything that has an identity'' \citep{std:RFC3986}. We
expand on this definition by saying that it is also describable.
\end{quotation}
The resource metadata are, then, the terms and concepts that describe
a resource in general. The RM defines the terms as well as describes
reasonable or allowed values; it does not, however, describe how the
terms and values should be encoded. This is because resource metadata
may be encoded in several different formats, depending on the context.
The present document provides a concrete encoding of the resulting
metadata model on XML suitable for embedding into OAI-PMH responses.
\begin{admonition}{Note}
The term ``VOResource'' is used to denote two different concepts within
the IVOA community.
The first refers specifically to the core
XML schema defined by this document. The second refers more
broadly to the core schema plus the set of legal extensions.
In this document, use of the name ``VOResource'' corresponds to
the first meaning. Reference to the broader set of schemas
will be indicated explicitly with the annotating phrase, ``and
its legal extensions.''
\end{admonition}
In addition to concepts and structures laid down in the RM, VOResource
also acknowledges other (though mostly related) metadata schemes. Of
particular importance here is the metadata scheme employed by DataCite,
which at the time of writing is at version 4.0 \citep{std:DataCite40}.
This, in particular, concerns the alignment of the vocabularies for date
roles and relationships.
The primary intended use of VOResource is to provide an XML interchange
format for use with resource registries. A registry is a repository of
resource descriptions and is employed by users and applications to
discover resources. VOResource can be used to pass descriptions from
publishers to registries and then from registries to applications.
Another intended use is as a language for services to describe themselves
directly. VOResource may be used in other ways, in whole or in part,
using the standard XML mechanisms (e.g., import, include).
The VOResource schema provides XML encoding for core
metadata from the RM that (with a few exceptions)
can apply to all resources; however, it is recognized that a full and
useful description of a \emph{specific} resource will require
additional metadata that is relevant only to a resource of its type.
Thus, the VOResource schema has been especially designed to be
extended. The model for doing this is described in
sect.~\ref{sect:extending}.
\subsection{Role within the VO Architecture}
\label{sect:role}
\begin{figure}
\centering
\includegraphics[width=0.9\textwidth]{role_diagram.pdf}
\caption{Architecture diagram for this document}
\label{fig:archdiag}
\end{figure}
Fig.~\ref{fig:archdiag} shows the role VOResource plays within the
IVOA architecture \citep{2021ivoa.spec.1101D}.
VOResource depends on the following other IVOA standards:
\begin{description}
\item[Resource Metadata, v1.12] The RM \citep{2007ivoa.spec.0302H}
provides the central concepts and structures mapped here into an XML
schema.
\end{description}
There are relationships to the following other IVOA standards:
\begin{description}
\item[Registry Interfaces] The Registry
Interfaces \citep{2018ivoa.spec.0723D} standard
describes how registries exchange VOResource records, and it
provides a \xmlel{vr:Resource}-typed element to hold them within XML
data (VOResource itself has no global elements).
\item[VOResource extensions] VOResource lays the foundations upon which
description schemes for concrete resources are built in various
VOResource extensions. At the time of writing, recommendations have
been passed for the description of VO Standards
\citep{2012ivoa.spec.0508H}, various ``simple'' data discovery protocols
\citep{2017ivoa.spec.0530P}, generic data services
\citep{2021ivoa.spec.1102D}, and TAP services
\citep{2012ivoa.spec.0827D}. The Registry Interfaces standard also
contains a VOResource extension.
\item[RegTAP] The Registry Relational Schema \citep{2019ivoa.spec.1011D}
gives a relational mapping of the models discussed here.
\item[VOSI] The VO support interfaces \citep{2017ivoa.spec.0524G} re-use
the service model developed here to facilitate service self-description.
\item[Vocabularies] VOResource contains several controlled vocabularies
that are maintained and can be used as per \citet{2023ivoa.spec.0206D}.
\end{description}
\section{The VOResource Data Model}
\label{sect:model}
The primary use for VOResource, of course, is to describe a resource
using the metadata concepts defined in the RM. Here is an example of a
VOResource document describing an organisation, the Radio Astronomy
Imaging Group at the National Center for Supercomputing Applications.
\lstinputlisting[language=XML,numbers=left,basicstyle=\footnotesize]
{example-voresource.xml}
This example illustrates some important components of a VOResource
record:
\begin{enumerate}
\item the VOResource namespace (line 3),
\item the specific type of resource indicated by
the value of the \xmlel{xsi:type} attribute as
discussed in sect.~\ref{sect:derivedtypes} (line 2),
\item the location of the schema documents used by
this description (lines 6--9) -- this is to facilitate document
validation --,
\item values for the three main types of core metadata:
identity (lines 17--19), curation (lines 21--36), and content
(lines 38--54),
\item a reference to another resource is made by
providing that resource's IVOA identifier (line 22),
\item string values can be padded with spaces
for easier readability (e.g., lines 22--24),
\item extension metadata specific to the type of
resource (lines 56--59).
\end{enumerate}
Actual services obviously need additional metadata defining the
modalities of service access. In VOResource, such information
is typcially encapsulated in \xmlel{vr:Capa\-bility}-typed elements. This
document only provides a generic base class for them, deferring the
definition of more useful subclasses to VOResource extensions like
VODataService \citep{2021ivoa.spec.1102D} or SimpleDALRegExt
\citep{2017ivoa.spec.0530P}.
\subsection{The Schema Namespace and Location}
\label{sect:namespace}
The VOResource schema namespace is
$$\hbox{\texttt{http://www.ivoa.net/xml/VOResource/v1.0}}.$$
The namespace URI has been chosen to allow it to be resolved as a URL
to the XML Schema document that defines the VOResource schema.
Applications may assume that the namespace URI is so resolvable.
Although this schema is in version 1.2 now, the URL still ends in
\texttt{v1.0}. This is to avoid unnecessarily breaking existing clients
relying on the namespace as defined by version 1.0 of this
specification. As laid out in the IVOA schema versioning policies
\citep{2018ivoa.spec.0529H}, although minor versions should never have
been part of namespace URIs, for namespaces defined before this note
they cannot be dropped despite their potential for confusion.
Clients should in general not care about minor versions of schemas.
To cover
the rare cases in which such information is necessary, instance documents
for version 1.2 of VOResource must have a \xmlel{version} attribute
with value \texttt{1.2} on their root element (i.e., \xmlel{Resource}).
Document authors are strongly encouraged to bind this namespace to the
\xmlel{vr:} prefix. While in generic XML processing, the concrete
prefix used is irrelevant as long as the namespace URI mapped is the one
given by this specification, in the Virtual Observatory context uniform,
per-major-version prefixes are viewed as helping interoperability. This
is particularly true when prefixes appear in attribute values (e.g.,
of \xmlel{xsi:type}), as non-schema aware XML processors cannot
URI-normalize such occurrences. Also, non-XML-aware software (e.g., ADQL
engines) will use these prefixes rather than the full namespace URIs.
Authors of instance documents that use the VOResource schema may choose
to provide a location for VOResource XML Schema document using the
\xmlel{xsi:schemaLo\-cation} attribute; the choice of the location value
is the choice of the author. In general, the use of
\xmlel{xsi:schemaLocation} is recommended by this specification with
a namespace URI given as the location as illustrated in the example
above, unless the application prefers otherwise.
\begin{verbatim}
xsi:schemaLocation="http://www.ivoa.net/xml/VOResource/v1.0
http://www.ivoa.net/xml/VOResource/v1.0"
\end{verbatim}
The VOResource XML schema sets \xmlel{elementFormDefault} to
unqualified. This means that
instance documents must not bind the
empty namespace in any element containing
VOResource elements, as XML element names in VOResource must be
interpreted outside of any namespace.
Conversely, the VOResource namespace prefix must not
be used to qualify tag names of VOResource elements.
In general, namespace prefixes in VOResource are
only used to qualify type names given as values to the \xmlel{xsi:type}
attribute in VOResource (see next section). VOResource extensions
should also set \verb|elementFormDefault="unqualified"| for consistency.
\subsection{The Core Structural and Semantic Model}
\label{sect:core}
The VOResource schema only defines global types; it does not define
any global elements (often referred to as root elements). It is the
responsibility of the application to define the root element of the
VOResource-employing documents it operates on. Typically, the root
element is defined in a separate application-specific schema. The
type of an application document's root element is not assumed to be
any particular type defined in the VOResource schema (nor any of its
legal extensions). In fact, it need not be of a type from the
VOResource at all; rather, VOResource types may appear anywhere in the
document.
The IVOA Registry Interface standard \citep{2018ivoa.spec.0723D},
for example, at the time of writing includes a small schema that defines
a global element \xmlel{ri:Resource} of base type
\xmlel{vr:Resource}. It is primarily intended as the child of
\xmlel{oai:metadata} in OAI-PMH responses \citep{std:oaipmh}, the protocol
used for VOResource record exchange by Registry Interface-compliant
Registries. Note that even
\xmlel{ri:Resource}-typed elements will still use \xmlel{xsi:type} to
indicate the actual resource type.
\begin{admonition}{Note}
In the example instance
document at the beginning of section~\ref{sect:model}, the root element
\xmlel{resource} is not defined in any schema.
Nevertheless, this document is still legal and verifiable XML.
This is because the element's type is explicitly specified with
the \xmlel{xsi:type} attribute.
\end{admonition}
Applications describe a single resource using an element of the type
\xmlel{vr:Resource} or a legal derivation of it. The content of this
element is referred to as the \textbf{core VOResource
metadata} and can be grouped into four categories (corresponding to the
sections 3.1, 3.2, 3.3, and 4 of the RM):
\begin{itemize}
\item identity metadata: the \xmlel{title},
\xmlel{shortName}, and
\xmlel{identifier} elements;
\item curation metadata: the contents of the
\xmlel{curation} element;
\item general content metadata: the contents of the
\xmlel{content} element;
\item metadata quality flags: the
\xmlel{validationLevel} element.
\end{itemize}
These elements are defined in more detail in sect.~\ref{sect:metadata}.
\subsubsection{Naming Convention}
VOResource uses the following conventions for
names of elements and types:
\begin{itemize}
\item all global types it defines have names that are capitalized.
(This practice would extend to global elements, if they existed
in the VOResource.)
\item Locally defined elements begin with a lower-case character.
\item For all types and element names that are made up of multiple
words, such as \xmlel{shortName}, upper-case letters are
used demarcate the start of appended word (the ``camel''
format).
\item Names that include abbreviations, such as
\xmlel{IdentifierURI}, all letters in the abbreviation are
capitalized.
\end{itemize}
It is recommended that this convention be followed in other schemas
that either use the VOResource schema (via an \xmlel{xsd:import} or
\xmlel{xsd:include}) or extend it.
\subsubsection{String Values}
Many of the elements in VOResource that are meant to have string or
URI values are defined as being of the type \xmlel{xs:token}.
This allows authors of VOResource instance documents to pad string and
URI values with spaces and include carriage returns to improve
readability. The definition of these types will cause an XML
Schema-compliant parser to replace tab, line feed, and carriage return
characters with simple spaces, then replace multiple sequential
occurrences of spaces with a single space, and then remove all leading
and trailing spaces.
The \xmlel{description} children of resources and capabilities, on the
other hand, are of type \xmlel{xs:string}, which means that even
schema-aware processors will preserve whitespace. This is inteded to
allow simple markup like paragraphs (empty lines) in the descriptions,
which may be little texts. Since in VO practice, constructs like simple
ASCII tables sometimes appear in such descriptions, clients are
encouraged to not reflow descriptions and display them in a fixed-with
font.
\subsubsection{Language and Transliteration}
Several VOResource elements contain natural language (e.g.,
\xmlel{description} or \xmlel{title}). In order to
ensure reliable discovery, in core VOResource, these elements must
contain English text, with US spelling strongly preferred; technically,
an \xmlel{xml:lang} value of \texttt{en-US} is implied.
Registry extensions may allow \xmlel{xml:lang} attributes on elements.
If they do, such elements must be repeatable, and an element without
\xmlel{xml:lang} (and hence, \texttt{en-US} implied) should be required
for global discoverability. The requirements on \xmlel{xml:lang} from
the XML specification \citep{std:XML} apply. Additionally, in
VOResource documents BCP 47 language identifiers must be written in
lowercase.
Several VOResource elements contain names. Again, for reliable global
discoverability, such names must be given in (common) English
transliteration where their original form uses non-Latin scripts.
Latin letters with diacritics are allowed, but Registry components are
generally expected to treat them equivalent to their base letters.
\subsubsection{Dates and Times}
All VOResource elements and attributes that contain dates must be
interpreted as UTC dates and must be encoded in compliance with ISO8601
\citep{std:iso8601}
standard Date and Time Format. The \xmlel{vr:UTCTimestamp} type
provides a special restriction of the format that requires inclusion of
date and time, but enforces the use of the UTC timezone. The time
format to be used by VOResource (designed to coincide with
what the OAI-PMH transport protocol mentioned above defines)
therefore requires timestamps like
$$\hbox{\texttt{2008-02-22T12:22:34Z,}}$$
where optional fractional seconds are allowed. See the schema
documentation for the actual regular expression pattern.
For historical reasons, VOResource also allows a form without any
timezone marker. Such timestamps are to be interpreted as if they had
a trailing Z.
% GENERATED: !schemadoc VOResource-v1.2.xsd UTCTimestamp
\begin{generated}
\begingroup
\renewcommand*\descriptionlabel[1]{%
\hbox to 5.5em{\emph{#1}\hfil}}\vspace{2ex}\noindent\textbf{\xmlel{vr:UTCTimestamp} Type Schema Documentation}
\noindent{\small
A timestamp that is compliant with ISO8601 and fixes
the timezone indicator, if present, to {"}Z{"} (UTC). VOResource
writers should always include the timezone marker. VOResource
readers must interpret timestamps without a timezone marker as
UTC.
\par}
\vspace{1ex}\noindent\textbf{\xmlel{vr:UTCTimestamp} Type Schema Definition}
\begin{lstlisting}[language=XML,basicstyle=\footnotesize]
<xs:simpleType name="UTCTimestamp" >
<xs:restriction base="xs:dateTime" >
<xs:pattern
value="\d{4}-\d\d-\d\dT\d\d:\d\d:\d\d(\.\d+)?Z?" />
</xs:restriction>
</xs:simpleType>
\end{lstlisting}\endgroup
\end{generated}
% /GENERATED
Where day granularity might suffice for some instance documents,
VOResource and extensions can
employ the \xmlel{vr:UTCDateTime} type.
% GENERATED: !schemadoc VOResource-v1.2.xsd UTCDateTime
\begin{generated}
\begingroup
\renewcommand*\descriptionlabel[1]{%
\hbox to 5.5em{\emph{#1}\hfil}}\vspace{2ex}\noindent\textbf{\xmlel{vr:UTCDateTime} Type Schema Documentation}
\noindent{\small
A date stamp that can be given to a precision of either a
day (type xs:date) or seconds (type xs:dateTime). Where only a
date is given, it is to be interpreted as the span of the day
on the UTC timezone if such distinctions are relevant.
\par}
\vspace{1ex}\noindent\textbf{\xmlel{vr:UTCDateTime} Type Schema Definition}
\begin{lstlisting}[language=XML,basicstyle=\footnotesize]
<xs:simpleType name="UTCDateTime" >
<xs:union
memberTypes="xs:date vr:UTCTimestamp" />
</xs:simpleType>
\end{lstlisting}\endgroup
\end{generated}
% /GENERATED
\subsubsection{Alternate Identifiers}
\label{sect:altidform}
While registered resources should be referenced with their IVOA
identifiers in order to allow simple and uniform resolution, other
identifier schemes are frequently useful in order to have
machine-readable references to entities not registered (e.g., authors)
or also resolvable using external resolvers. Prime examples for such
identifiers are DOIs and ORCIDs.
VOResource keeps such identifiers in \xmlel{altIdentifier} elements (for
resources and creators, which can have multiple such identifiers) or
attributes (for elements of type \xmlel{vr:ResourceName}, which for
simplicity are only allowed one alternate identifier each).
In order to not bind the Registry to any single resolver, we prefer
non-http URI forms for such identifiers. Where the originators of the
identifier scheme strongly urges the use http URIs directly pointing to
a resolver, we adopt these conventions.
The following identifier schemes are recognised by VOResource in this
version:
\begin{description}
\item[doi] A digital object identifier. These always use the doi URI
schema rather the http schema. Hence, in VO resource records,
\verb|doi:10.5072/7273288| must be used rather than
\nolinkurl{https://doi.org/10.5072/7273288} or any of its variants.
\item[orcid] An open researcher and contributor id. In
accordance with ORCID's
instructions\footnote{\url{https://support.orcid.org/knowledgebase/articles/116780}}, ORCIDs must be given
as HTTPS URIs using orcid.org's infrastructure, for instance
\url{https://orcid.org/0000-0001-2345-6789}.
\item[bibcode] A bibliographic code as used by ADS and CDS. These
must be used with an ad-hoc URI scheme of \verb|bibcode|, as in
\verb|bibcode:2008ivoa.spec.0222P|.
\end{description}
Other schemes may be used in \xmlel{altIdentifier}-s.
\subsubsection{VOResource Semantics}
All VOResource types and elements have an associated semantic meaning
which is given in the first \xmlel{xsd:documentation}
node within the type or element's definition in the schema. The
meaning associated with a type is generic, indicating the kind of
information the type provides. The semantics that are delivered by a
VOResource instance document, however, are those associated with
VOResource elements. The meaning of a VOResource element can be
thought of as having two parts: the generic meaning of the set of
information it contains as defined by its type, and a specific meaning
describing the context in which that information applies. Because all
VOResource elements are locally defined (in the XML Schema
sense), they do not have an absolute meaning, but rather have a
meaning tied to the thing being described by that element as
represented by the enclosing type.
Here are three examples that illustrate the semantics communicated by
VOResource entities:
\begin{enumerate}
\item The \xmlel{vr:Curation} type describes the curation of a
resource. The \xmlel{curation} element
describes curation of the specific resource described by the
enclosing \xmlel{vr:Resource} type and identified by its
\xmlel{identifier} element.
\item The \xmlel{vr:ResourceName} type is a generic reference to
another resource. The \xmlel{publisher} element
gives a reference to the publisher of the specific resource being
described which may itself be a registered resource described
elsewhere.
\item The \xmlel{title} element gives the title of
the resource being described by the enclosing
\xmlel{vr:Resource} type and identified by its
\xmlel{identifier} element. The
\xmlel{title} element's type,
\xmlel{xs:token} (a restriction on
\xmlel{xsd:string}), has no inherent meaning associated
with it.
\end{enumerate}
Additional semantics are transmitted through the use of derived types
using the \xmlel{xsi:type} attribute. In the sample instance document
above, the use of the XSI type \verb|vr:Organisation| means that the
resource being described is specifically an organisation as defined by
the \xmlel{vr:Organisation} type. This type provides additional
metadata that are not part of the core resource metadata. The semantics
associated with the use of \xmlel{xsi:type} is described further in the
next subsection.
\subsubsection{Refined Semantics with Derived Types}
\label{sect:derivedtypes}
When a resource is described with an element explicitly of the type
\xmlel{vr:Resource}, it is being described in the most generic
sense. The metadata presented in this type, including both free text
values and controlled vocabulary, can give some sense of what
type of resource is being described and what it might be used for.
However, the most useful descriptions of resources will not explicitly
use the \xmlel{vr:Resource} type; rather, they will use types
that are derived from \xmlel{vr:Resource}.
Defining derived \xmlel{vr:Resource} types accomplishes two
things:
\begin{enumerate}
\item it sharpens the semantic meaning of the resource description by
indicating what specific type of resource it is, and
\item it \emph{may} allow additional metadata not part of the core
but specific to that type of resource.
\end{enumerate}
The VOResource schema defines two types derived from
\xmlel{vr:Resource}: \xmlel{vr:Orga\-nisation} and
\xmlel{vr:Service}. The \xmlel{vr:Organisation} adds
metadata describing the astronomical facilities such as telescopes
that are associated with the organisation it describes. The
\xmlel{vr:Service} type adds an element called
\xmlel{capability} which describes the service's interface as
well as information regarding its behavior.
Extension of the \xmlel{vr:Resource} type is a key way in which
derivation is used in VOResource to provide refined resource
descriptions. Two other important parent types in the schema are
\xmlel{vr:Capability} and \xmlel{vr:Interface}; these are
extended to provide more refined descriptions of services (see
sect.~\ref{sect:servicemodel}). The motivation for extending
these types is the same as for \xmlel{vr:Resource}: to provide
more specific semantic meaning through the derived type's name, and to
provide additional, specialized metadata that is not part of the
parent type. Note, however, that in general, a derived type need not
alter the content model of its base type. This allows derived types
to add more specific meaning without adding any additional metadata.
As described in sect.~\ref{sect:core}, it is intended that derived
\xmlel{vr:Resource}, \xmlel{vr:Capability} and \xmlel{vr:Interface}
types be invoked in instance documents using the \xmlel{xsi:type}
attribute (as illustrated in the sample document above). This method
illustrates a polymorphism for resource metadata in that any place where
an element of parent type is expected, the derived type may be inserted.
The use of \xmlel{xsi:type} illustrates both what specific type is being
inserted in as well as what it is being inserted in for. That is, as in
our example, the \emph{resource} being described is an
\emph{organisation}.
The other mechanism for polymorphism provided by XML Schema is
substitution groups. Invoking derived \xmlel{vr:Resource} types via
elements in a substitution group is discouraged because it is less
obvious from looking at the instance document that a substitution is
being made.
\subsubsection{The Service Data Model}
\label{sect:servicemodel}
The \xmlel{vr:Service} type extends the core \xmlel{vr:Resource}
metadata data by adding the \xmlel{capability} element (see
sect.~\ref{sect:serviceelements}). This element is used to describe a major
functionality of the service, usually accessible through a single
service endpoint URL. In particular, it is used to describe support for
an IVOA service standard (e.g. Simple Image Access Protocol). A service
resource record may have multiple child \xmlel{capability} elements,
each describing a different major functionality; however, these
capabilities should be related in an obvious, logical way (they would
hardly share their core VOResource metadata otherwise).
The \xmlel{capability} element, through its type \xmlel{vr:Capability},
describes the behavior of service capability and how to access it. The
latter is described by a child \xmlel{interface} element. As for the
behavior, the base \xmlel{vr:Capability} type only provides a
\xmlel{description} element that can contain human-readable text on what
this capability provides. More structured behavioral information must
be provided through specialized \xmlel{vr:Capability} extensions. In
particular, a service standard (e.g. Simple Image
Access Protocol) or an ancillary standard built upon the service
standard will define an extension of \xmlel{vr:Capability} that
adds additional metadata that can describe the service's behavior in
relation to the standard.
The added metadata can describe
limitations of the service implementation or indicate support for
optional features. As a rough guideline, whenever the standard has a
SHOULD or MAY in the sense of RFC2119 and clients have no other way to
discover the choices of a concrete service implementation, a respective
declaration should be considered for the capability or the interface
elements defined by the registry extension.
The specific \xmlel{vr:Capability} type is invoked
using the \xmlel{xsi:type} mechanism described in
sect.~\ref{sect:namespace}.
Here is an example for assigning a specialized Capability type for
a standard service capability. In this example, it is assumed that
\xmlel{ExampleCapType} extension type is defined in a separate
schema document, the target namespace of which is being bound to the
\xmlel{ex:} prefix in the capability element itself (it could, of
course, be bound in some enclosing element just as well):
\begin{lstlisting}[language=XML]
<capability xsi:type="ex:ExampleCapType"
standardID="ivo://example.com/std/exampleAccess"
xmlns:ex="http://ivoa.net/std/example-1.xsd">
...
</capability>
\end{lstlisting}
Note that the \xmlel{xsi:type} and the \xmlel{standardID} can vary
independently of each other. There is no requirement to use a given
capability type for an endpoint conforming to a certain standard, as
indicated by the capability's \xmlel{standardID}. Conversely,
it may make sense to re-use a certain capability type in a different
standard.
Historically, several VOResource extension types have had
fixed \xmlel{standardID}s. This is now discouraged, as it needlessly
limits the applicability of the encoded metadata models.
If the service capability being described does not conform to any
standard or if the standard does not require any specialized
capability metadata for describing an implementation's behavior, then
\xmlel{vr:Capability} can be used as-is, possibly with the appropriate
\xmlel{standardID}.
Each \xmlel{capability} element can contain one or more child
\xmlel{interface} elements, each describing how the capability
can be accessed. The \xmlel{interface} element's type,
\xmlel{vr:Interface}, is abstract; thus, the
\xmlel{interface} element must be accompanied by an
\xmlel{xsi:type} attribute that indicates a
\xmlel{vr:Interface} extension type. The VOResource schema
defines two \xmlel{vr:Interface} extension types:
\xmlel{vr:WebBrowser}, for describing an interface access via web
browser, and \xmlel{vr:WebService}, for accessing a service
described by a Web Service Description Language (WSDL) document. In
today's VO, the latter interface type has almost vanished with the
general move away from SOAP-based architectures. VO standard
capabilities currently typically use interface types defined in
VODataService.\footnote{Retrospectively, \xmlel{vs:ParamHTTP} should probably
have been part of VOResource itself; changing this now, however, does
not seem to be worth the migration effort.}
As an example, a simple, browser-based interface could be declared with
an untyped capability like this (this assumes the \xmlel{vr} prefix has
been bound in an ancestor element):
\begin{lstlisting}[language=XML]
<capability>
<interface xsi:type="vr:WebBrowser">
<accessURL use="full"
>http://example.org/browser-service</accessURL>
</interface>
</capability>
\end{lstlisting}
Note that for less trivial interfaces, in particular
\xmlel{vs:ParamHTTP}, the parameters accepted should be declared in the
interface element.
When a \xmlel{capability} contains more than one
\xmlel{interface}, each \xmlel{interface} should be
interpreted as an alternative interface for accessing essentially the
same underlying capability. The interfaces can differ in their
overall type (e.g. \xmlel{vr:WebBrowser},
\xmlel{vr:WebService}) or in the supported input parameters or
output products.
When a standard capability is being described (i.e., there is a
\xmlel{standardID} attribute), then at least one of the
\xmlel{interface} elements should describe an interface required
by the standard. The \xmlel{role} attribute is used to mark the
standard interfaces (typically with the value ``std'').
All other interfaces are considered non-standard
alternatives. To best support real-world discovery strategies, it is
recommended to avoid having non-standard interfaces in capabilities
with well-known \xmlel{standardID}s.
Another way \xmlel{interface}s inside the same
\xmlel{capability} element can be used is if a standard forsees
different versions of a protocol within the same capability. Different
interfaces can then be distinguished by different values of the
interface's \xmlel{version} attribute. Previous versions of this
document in effect recommended this pattern for VO standards.
While this pattern can still be employed, most VO standards that
actually have different versions distinguish their endpoints by
different standard identifiers, as described in section 4.2 of IVOA
Identifiers 2.0 \citep{2016ivoa.spec.0523D}. In these cases -- where the
\xmlel{capability}'s \xmlel{standardID} attribute already uniquely
determines the protocol spoken --, the specification of \xmlel{version}
on \xmlel{interface} elements is optional (although encouraged).
\subsection{Extending the VOResource Schema}
\label{sect:extending}
A schema made up only of global type definitions provides great
flexibility for extension. Any global type defined in the VOResource
schema may be used as the base of a derived type defined in another
schema. The schema containing the derived types must declare its own
namespace URI or default to the null namespace; it must not adopt the
VOResource namespace URI. The application must then define what
schemas, identified by their namespace URIs, are supported and/or
required.
A \textbf{VOResource extension} is an XML Schema document whose primary
purpose is to define new types derived from those defined in the
VOResource schema for use in resource descriptions. It is recommended
that VOResource extensions follow the definition styles used by the core
VOResource. In particular:
\begin{itemize}
\item \emph{Provide semantic definitions of all types and elements within
the first \xmlel{xsd:do\-cumentation} element inside
the type or element definition.} Subsequent
documentation elements may provide
additional comments or discussion.
\item \emph{Avoid the use of \xmlel{xsd:choice} elements.}
VOResource does not use the choice structure because it does
not map readily into any object-oriented software language
structure. Choices are handled instead as multiple derived
types that can be inserted in place of a parent type; for
examples, see the \xmlel{vs:VOTableType} and
\xmlel{vs:SimpleDataType} defintions in VODataService 1.1
\citep{2010ivoa.spec.1202P}. % version-sharp reference
\item \emph{Avoid the use of substitution groups}. VOResource
prefers instead the use of \xmlel{xsi:type} which are
(with a few exceptions) functionally equivalent to substitution
groups in terms of structure; however, \xmlel{xsi:type}
serves as an obvious flag in the instance document that a
substitution has been made.
\item \emph{Choose semantically meaningful names for derived
types.} When the derived type appears in the pattern
\verb|<elname xsi:type="derivedType">|,
choose a \textit{derivedType} name such that the sentence, ``a
\textit{derivedType} is a kind of \textit{elname}'' makes natural
and obvious sense. For example, ``an \textit{Organisation} is a
kind of \textit{resource}.''
\item \emph{Follow the VOResource naming conventions}.
\end{itemize}
There are two types of derivation that are particularly important to
the VOResource data model: derivation of the \xmlel{vr:Resource}
type, used to define specific types of resources, and the derivation
of service metadata elements.
\subsubsection{Defining New Resource Types}
\label{sect:definingresourcetypes}
Derivation of \xmlel{vr:Resource} to define new kinds of
resources should be done by extension (i.e. using
\xmlel{xsd:extension}) rather than restriction. It is
not required that the derived type change the content model from that
of the \xmlel{vr:Resource} base type; in this case, the purpose
of the derivation is only to sharpen the semantic meaning of the
resource description.
In VOResource itself, this mechanism is used to derive
\xmlel{vr:Organisation}
and \xmlel{vr:Service}.
\subsubsection{Defining New Service Capabilities and Interfaces}
\label{sect:serviceelements}
As described in sect.~\ref{sect:servicemodel}, a service
standard will often define a new \xmlel{vr:Capability} extension
type to allow implementations to describe how they support the
standard. This definition of the \xmlel{vr:Capability} extension
should be done in a schema document with a namespace identifier that
is dedicated to that standard (hereafter referred to as \emph{the
standard's extension schema}). The extension type should include
elements representing the applicable Capability metadata described in
section 5.2 of the RM
(e.g. \emph{Service.MaxReturnRecords}, \emph{Service.MaxReturnSize})
but can also include other concepts that are specific to that standard.
An extension schema can define new interface types, though not
necessarily in the context of any specific standard service
capability. The basic \xmlel{vr:Interface} type provides only
\xmlel{accessURL}, \xmlel{mirrorURL}, and \xmlel{security\-Method} as child
elements. A derived \xmlel{vr:Interface} type must indicate in
the documentation how the \xmlel{accessURL} should be
interpreted and used. The derived type may also include other added
metadata describing how to use the service (e.g., a description of the
input arguments). If the interface extension type is expected to be
referenced by a standard service capability, then it is recommended
that the additional metadata be optional unless the metadata is
absolutely required by clients in order to invoke the service.
Examples for extension schemas can be found in the IVOA Document
Repository.\footnote{\url{http://ivoa.net/documents}; TAPRegExt or
SimpleDALRegExt give starting points. The actual schema files are
available from \url{http://ivoa.net/xml}.}
Sect.~\ref{sect:role} enumerates the ones in Recommendation state at the
time of writing. In VOResource itself, the mechanism can be inspected
in the derivation of \xmlel{vr:WebBrowser} and \xmlel{vr:WebService}.
\section{The VOResource Metadata}
\label{sect:metadata}
This section enumerates the types and elements defined in the
VOResource schema.
\subsection{The Base Resource Type}
\label{sect:restype}
A resource, as defined by the RM, is any entity or component of a VO
application that is describable and identifiable by an IVOA Identifier.
A resource is described using VOResource by an element of the type
\xmlel{vr:Resource} or one of its legal extensions. The schema
definition (below) includes elements that encode the identity, curation,
and general content metadata for a resource (see sections 3.1 through
3.3 of the RM). The RM states that certain metadata are required in a
minimally compliant resource description; this requirement is enforced
by the VOResource schema definition.
\goodbreak
% GENERATED: !schemadoc VOResource-v1.2.xsd Resource
\begin{generated}
\begingroup
\renewcommand*\descriptionlabel[1]{%
\hbox to 5.5em{\emph{#1}\hfil}}\vspace{2ex}\noindent\textbf{\xmlel{vr:Resource} Type Schema Documentation}
\noindent{\small
Any entity or component of a VO application that is
describable and identifiable by an IVOA Identifier.
\par}
\vspace{1ex}\noindent\textbf{\xmlel{vr:Resource} Type Schema Definition}
\begin{lstlisting}[language=XML,basicstyle=\footnotesize]
<xs:complexType name="Resource" >
<xs:sequence >
<xs:element name="validationLevel" type="vr:Validation" minOccurs="0"
maxOccurs="unbounded" />
<xs:element name="title" type="xs:token" />
<xs:element name="shortName" type="vr:ShortName" minOccurs="0" />
<xs:element name="identifier" type="vr:IdentifierURI" />
<xs:element name="altIdentifier" type="xs:anyURI" minOccurs="0"
maxOccurs="unbounded" />
<xs:element name="curation" type="vr:Curation" />
<xs:element name="content" type="vr:Content" />