This is a Note. The first release of this document was 25 November 2003.
This is an IVOA Note expressing suggestions from and opinions of the authors. It is intended to share best practices, possible approaches, or other perspectives on interoperability with the Virtual Observatory. It should not be referenced or otherwise interpreted as a standard specification. A list of current IVOA Recommendations and other technical documents can be found at http://www.ivoa.net/Documents/.
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, and from the UK Particle Physics and Astronomy Research Council (PPARC).
- Note:
- While the XML Schemas are based on the RM document, they are differences. In particular:
- Some terms defined in RM may not (yet) appear in the VOResource family of schemas.
- Not all metadata term names are identical.
The reason for this difference is that RM makes no assumptions about the restrictions or capabilities of the encoding format (e.g. XML, FITS, Java properties, etc.) used; RM recognizes that it may be appropriate to alter the names when adapting to a particular format. In the case of XML, the schemas take advantage of the hierarchical, object-oriented data model; in some cases, names have been altered to reflect this model. Regardless, the definitions for the concepts described in both are identical.
The RM document is intended primarily for schema developers: those interested in mapping the metadata terms into new metadata formats, or those who wish to propose modifications to the schema. VOResource users should prefer this document for information on creating and handling XML descriptions.
Each of the above schemas are defined within their own namespace, separating the metadata into logical sub-sets. This is done for three reasons:
There are some additional files you should now about. Two of the schemas above have associated files that they include (much like a software source file includes an "include" file):
VOResourceRelType-v0.2.xsd
defines types of resource relationships (e.g. "mirror-of",
"derived-from"). If we later add a new relationship type, the core
VOResource schema is not affected, nor are any XML
instances
that previously conformed to VOResource. The essential difference
between importing and including is in that the
namespace of the included definitions is the same as for the file that
does the including.
<?xml version="1.0" encoding="UTF-8"?>
1 <VOResource xmlns="http://www.ivoa.net/xml/VOResource/v0.9"
xmlns:vc="http://www.ivoa.net/xml/VOCommunity/v0.2"
xmlns:vr="http://www.ivoa.net/xml/VOResource/v0.9">
<!-- A minimal example description of an organisation -->
2 <vc:Organisation>
3 <Identifier>
<AuthorityID>NCSA.Astro</AuthorityID>
<ResourceKey>RAI</ResourceKey>
</Identifier>
<Title>NCSA Radio Astronomy Imaging Group</Title>
<Summary>
<Description>
The Radio Astronomy Imaging Group is focused on applying
high-performance computing to astronomical research. Our
projects include the NCSA Astronomy Digital Image Library,
the BIMA Data Archive, the BIMA Image Pipeline, and AIPS++.
</Description>
<ReferenceURL>http://rai.ncsa.uiuc.edu/</ReferenceURL>
</Summary>
4 <Curation>
<Publisher>
<Title>NCSA Radio Astronomy Imaging</Title>
</Publisher>
<Contact>
<Name>Dr. Raymond Plante</Name>
</Contact>
</Curation>
5 </vc:Organisation>
</VOResource>
The first thing you might notice in this example (if you are reading
this on-line) is that all the element names are highlighted as links.
Following one of these links will take you to a definition of the term
in a hypertext metadata dictionary. These links are used throughout
this document. Now let's look at a few things in detail:
As the root element, we include in it a declaration of the schemas that are used to validate the document using the xmlns attribute. The first use declares all elements without a namespace prefix belong to the VOResource schema, identified by the schema's namespace URI. The second attribute says that elements with the "vc" namespace prefix belongs to the VOCommunity schema. The third associates "vr" with our default namespace. Our example doesn't actually use "vr", but its a good habit to include it anyway for cases when we do need it.
Note that for IVOA schemas, the namespace URIs resolve to the actual XML Schema document. This is not required by the XML Schema standard; however, many parsers will use the URL to get the schema by default. More about retrieving schemas is discussed in the section, Using Namespaces.
Most elements in the VOResource family of schemas can be used as a root element, by virtue of being defined as global elements. Which element "should" be the root is completely a choice of the application. This allows the schema to be used in many different ways. For example, a Web Service may wish simply to pass only contact information and, thus, use Contact as the root element.
Registry applications generally use either VOResource or VODescription as the root element.
Metadata Dictionaries:
*the commonly-used namespace prefix; use of this prefix is not required.Element Index: Click on the name to see element description.
http://www.ivoa.net/Documents/WD/WD-RM.htm