<?xml version="1.0"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
  xmlns:xi="http://www.w3.org/2001/XInclude">

  <xs:include schemaLocation="common.xsd" />

  <xs:annotation>
    <xs:documentation>
      team - people working together in various capacities to achieve a common goal 
    </xs:documentation>
  </xs:annotation>
  <xs:element name="team">
    <xs:complexType>
      <xs:sequence>
        <xs:annotation>
          <xs:documentation>
            roles  - parts played by the people on the team
            people - the persons that work together on the project
          </xs:documentation>
        </xs:annotation>
        <xs:element name="roles" minOccurs="0">
          <xs:complexType>
            <xs:sequence>
              <xs:annotation>
                <xs:documentation>
                  role - part played by some person(s) on the team
                </xs:documentation>
              </xs:annotation>
              <xs:element name="role" maxOccurs="unbounded">
                <xs:complexType>
                  <xs:annotation>
                    <xs:documentation>
                      description - explanation of what the role's purpose and activities
                      name        - identification of the role, for referral purposes
                    </xs:documentation>
                  </xs:annotation>
                  <xs:sequence>
                    <xs:element name="description" type="description" minOccurs="0"/>
                  </xs:sequence>
                  <xs:attribute name="name" type="xs:ID"/>
                </xs:complexType>
              </xs:element>
            </xs:sequence>
          </xs:complexType>
        </xs:element>
        <xs:element name="people">
          <xs:complexType>
            <xs:sequence>
              <xs:annotation>
                <xs:documentation>
                  person - someone on the team
                </xs:documentation>
              </xs:annotation>
              <xs:element name="person" maxOccurs="unbounded">
                <xs:complexType>
                  <xs:annotation>
                    <xs:documentation>
                      full-name   - first and last names of the person
                      email       - e-mail address of the person
                      website     - website of the person
                      roles       - roles the person fulfills
                      stakeholder - what interest this person has in the project
                      name        - identification of the person, for referral purposes
                      fte         - amount of time the person can spend on this project
                    </xs:documentation>
                  </xs:annotation>
                  <xs:sequence>
                    <xs:element name="full-name" type="name" minOccurs="0"/>
                    <xs:element name="email" type="email" minOccurs="0"/>
                    <xs:element name="website" type="url" minOccurs="0"/>
                    <xs:element name="roles" type="xs:IDREFS" minOccurs="0"/>
                    <xs:element name="stakeholder" type="stakeholder-type" minOccurs="0"/>
                  </xs:sequence>
                  <xs:attribute name="name" type="xs:ID" use="required"/>
                  <xs:attribute name="fte" type="ratio" use="optional" default="1"/>
                </xs:complexType>
              </xs:element>
            </xs:sequence>
          </xs:complexType>
        </xs:element>
      </xs:sequence>
    </xs:complexType>
  </xs:element>
  
</xs:schema>
