<?xml version="1.0" encoding="UTF-8"?>
<xs:schema targetNamespace="http://nvoss.org/VOResource"
           xmlns:res="http://nvoss.org/VOResource"
           xmlns:xs="http://www.w3.org/2001/XMLSchema"
           elementFormDefault="qualified">

   <xs:simpleType name="Type">
      <xs:annotation>
         <xs:documentation> 
            a set of named types of resources
         </xs:documentation>
      </xs:annotation>

      <xs:restriction base="xs:string">
         <xs:enumeration value="Archive" >
            <xs:annotation>
               <xs:documentation>
                  Collection of pointed observations
               </xs:documentation>
            </xs:annotation>
         </xs:enumeration>

         <xs:enumeration value="Catalog" >
            <xs:annotation>
               <xs:documentation>
                  Collection of pointed observations
               </xs:documentation>
            </xs:annotation>
         </xs:enumeration>

         <xs:enumeration value="Organisation" >
            <xs:annotation>
               <xs:documentation>
                  Collection of pointed observations
               </xs:documentation>
            </xs:annotation>
         </xs:enumeration>
      </xs:restriction>
   </xs:simpleType>

   <xs:complexType name="Resource">
      <xs:annotation>
         <xs:documentation> 
           Any entity or component of a VO application that is
           describable and identifiable by a IVOA Identifier. 
         </xs:documentation>
      </xs:annotation>

      <xs:sequence>

         <xs:element name="title" type="xs:string" >
            <xs:annotation>
               <xs:documentation>
                  the full name given to the resource
               </xs:documentation>
            </xs:annotation>
         </xs:element>

         <xs:element name="referenceURL" type="xs:anyURI" minOccurs="0">
            <xs:annotation>
               <xs:documentation>
                  URL pointing to a human-readable document describing this 
                  resource.   
               </xs:documentation>
            </xs:annotation>
         </xs:element>

         <xs:element name="type" type="res:Type"
                     minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
               <xs:documentation>
                  Nature or genre of the content of the resource
               </xs:documentation>
            </xs:annotation>
         </xs:element>

      </xs:sequence>

      <xs:attribute name="created" type="xs:dateTime" >
         <xs:annotation>
            <xs:documentation>
              The date this resource metadata description was created.
            </xs:documentation>
         </xs:annotation>
      </xs:attribute>

   </xs:complexType>

   <xs:element name="resource" type="res:Resource" >
      <xs:annotation>
         <xs:documentation> 
           a description of a VO resource
         </xs:documentation>
      </xs:annotation>
   </xs:element>

</xs:schema>
