<?xml version="1.0" encoding="UTF-8"?>
<xs:schema targetNamespace="http://www.ivoa.net/xml/prop/VOOrg/v0.1" 
           xmlns:xs="http://www.w3.org/2001/XMLSchema" 
           xmlns:vr="http://www.ivoa.net/xml/prop/VOResource/v0.8.1" 
           xmlns:vo="http://www.ivoa.net/xml/prop/VOOrg/v0.1" 
           xmlns:vm="http://www.ivoa.net/xml/prop/VOMetadata"
           elementFormDefault="qualified" attributeFormDefault="unqualified">

   <xs:annotation>
     <xs:appinfo>
       <vm:SchemaName>VOOrg</vm:SchemaName>
       <vm:schemaPrefix>xs</vm:schemaPrefix>
       <vm:targetPrefix>vo</vm:targetPrefix>
       <vm:version>0.1</vm:version>
     </xs:appinfo>
     <xs:documentation>
        Version 0.8
      </xs:documentation>
      <xs:documentation>
        An extension to the core resource metadata (VOResource) for 
	describing organizations and projects.
      </xs:documentation>
   </xs:annotation>

   <xs:import namespace="http://www.ivoa.net/xml/prop/VOResource/v0.8.1"
         schemaLocation="http://www.ivoa.net/internal/IVOA/IVOARegWp03/VOResource-v0.8.1.xsd"/>

   <xs:element name="Organisation" type="vo:OrganisationType" 
               substitutionGroup="vr:ManagedResource">
      <xs:annotation>
         <xs:documentation>
	   A group or person that manages data or services for VO applications.
	 </xs:documentation>
      </xs:annotation>
   </xs:element>
   <xs:complexType name="OrganisationType">
     <xs:complexContent>
        <xs:extension base="vr:ManagedResourceType">
	   <xs:sequence>
	      <xs:element ref="vo:Manages" minOccurs="0"/>
	   </xs:sequence>
        </xs:extension>
     </xs:complexContent>
   </xs:complexType>

   <xs:element name="Project" type="vo:ProjectType" 
               substitutionGroup="vr:ManagedResource">
      <xs:annotation>
         <xs:documentation>
	   An organization with a focused set of data and services that it 
	   maintains.  
	 </xs:documentation>
      </xs:annotation>
   </xs:element>
   <xs:complexType name="ProjectType">
     <xs:complexContent>
        <xs:extension base="vo:OrganisationType"/>
     </xs:complexContent>
   </xs:complexType>

   <xs:element name="Manages" type="vo:ManagesType">
      <xs:annotation>
         <xs:documentation>
	   A listing of references to resources that are managed by an
	   organisation, project, or person.
	 </xs:documentation>
      </xs:annotation>
   </xs:element>
   <xs:complexType name="ManagesType">
     <xs:sequence>
       <xs:element ref="vr:OrgRef" minOccurs="0" maxOccurs="unbounded"/>
       <xs:element ref="vr:ProjectRef" minOccurs="0" maxOccurs="unbounded"/>
       <xs:element ref="vr:DataCollRef" minOccurs="0" maxOccurs="unbounded"/>
       <xs:element ref="vr:ServiceRef" minOccurs="0" maxOccurs="unbounded"/>
     </xs:sequence>
   </xs:complexType>

</xs:schema>
