<?xml version="1.0" encoding="UTF-8"?>
<xs:schema targetNamespace="http://www.ivoa.net/xml/prop/VOPerson/v0.1.1" 
           xmlns:xs="http://www.w3.org/2001/XMLSchema" 
           xmlns:vr="http://www.ivoa.net/xml/prop/VOResource/v0.8.2" 
           xmlns:vp="http://www.ivoa.net/xml/prop/VOPerson/v0.1.1" 
           xmlns:vm="http://www.ivoa.net/xml/prop/VOMetadata" 
           elementFormDefault="qualified" attributeFormDefault="unqualified"
	   version="0.1.1">
   <xs:annotation>
     <xs:appinfo>
       <vm:SchemaName>VOPerson</vm:SchemaName>
       <vm:schemaPrefix>xs</vm:schemaPrefix>
       <vm:targetPrefix>vp</vm:targetPrefix>
     </xs:appinfo>
      <xs:documentation>
        An extension to the core resource metadata (VOResource) for 
	describing people.
      </xs:documentation>
      <xs:documentation>
        This extension is a prototype to illustrate how a Person
	Resource would fit into the Resource data model.
      </xs:documentation>
      <xs:documentation>
	Diff 0.1.1-0.1: tweaked to extend VOResource v0.8.2
      </xs:documentation>
   </xs:annotation>

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

   <xs:element name="Person" type="vp:PersonType" 
	       substitutionGroup="vr:Resource">
      <xs:annotation>
         <xs:documentation>
           a person that can manage or use VO resources
         </xs:documentation>
      </xs:annotation>
   </xs:element>
   <xs:complexType name="PersonType">
      <xs:complexContent>
         <xs:extension base="vr:ResourceType">
            <xs:sequence>
               <xs:element ref="vp:Role" minOccurs="0"/>
            </xs:sequence>
         </xs:extension>
      </xs:complexContent>
   </xs:complexType>

   <xs:element name="Role" type="vp:RoleType">
      <xs:annotation>
         <xs:documentation>
           the role a person has in an organization
         </xs:documentation>
      </xs:annotation>
   </xs:element>
   <xs:complexType name="RoleType">
      <xs:sequence>
         <xs:element ref="vr:Name" minOccurs="0">
	   <xs:annotation>
	     <xs:documentation>
	       The name of the role that a person serves in within an 
	       organisation.
	     </xs:documentation>
	   </xs:annotation>
	 </xs:element>
         <xs:element ref="vr:OrgRef"/>
      </xs:sequence>
   </xs:complexType>

</xs:schema>

