<?xml version="1.0" encoding="UTF-8"?>

<!-- 
	This XML Schema defines the content for PDT People pages.
	
	Change Log:
	
	2005-05-08: Arthur Ryman <ryman@ca.ibm.com>
	- Added the people element for the contributor list and person index.
	
	2005-05-02: Arthur Ryman <ryman@ca.ibm.com>
	- Created.
-->

<schema xmlns="http://www.w3.org/2001/XMLSchema"
	targetNamespace="http://eclipse.org/webtools/person"
	xmlns:tns="http://eclipse.org/webtools/person"
	elementFormDefault="qualified">

	<element name="person">

		<annotation>
			<documentation>
				person is the root element for documents that describe
				individual people for contribute to PDT. The people
				folder should contain one document for each contributor,
				e.g. if Alan Turing was a contributor, then there should
				be a turing.xml document to describe him and his
				contributions.
			</documentation>
		</annotation>

		<complexType>
			<sequence>
				<element name="name">
					<complexType>
						<sequence>
							<element name="given-name" type="string" />
							<element name="family-name" type="string" />
						</sequence>
					</complexType>
				</element>
				<element name="affiliation">
					<annotation>
						<documentation>
							affiliation contents the name and link to
							your company, educational institution, or
							organisation.
						</documentation>
					</annotation>
					<complexType>
						<simpleContent>
							<extension base="string">
								<attribute name="href" type="anyURI" />
							</extension>
						</simpleContent>
					</complexType>
				</element>
				<element name="e-mail" type="tns:EMailType" />
				<element name="biography" type="tns:DocumentationType" />
				<element name="contribution">
					<complexType>
						<complexContent>
							<extension base="tns:DocumentationType">
								<attribute name="role"
									type="tns:RoleType" />

							</extension>
						</complexContent>
					</complexType>
				</element>
				<element name="home-page" minOccurs="0">
					<complexType>
						<attribute name="href" type="anyURI" />
					</complexType>
				</element>
				<element name="large-photo" type="tns:ImageType"
					minOccurs="0" />
				<element name="small-photo" type="tns:ImageType"
					minOccurs="0" />
			</sequence>
		</complexType>
	</element>

	<complexType name='DocumentationType' mixed='true'>
		<annotation>
			<documentation>
				DocumentationType is used for elements that contain
				XHTML content.
			</documentation>
		</annotation>
		<sequence>
			<any processContents='lax' minOccurs='0'
				maxOccurs='unbounded' />
		</sequence>
	</complexType>

	<simpleType name="EMailType">
		<annotation>
			<documentation>
				EMailType is used for e-mail addresses. A simple regular
				express is used to match strings of that form
				name@domain.
			</documentation>
		</annotation>
		<restriction base="string">
			<pattern value="[^@]+@[^@]+" />
		</restriction>
	</simpleType>

	<simpleType name="RoleType">
		<annotation>
			<documentation>
				RoleType is an enumeration used to describe the types of
				role a person can play in PDT.
			</documentation>
		</annotation>
		<restriction base="string">
			<enumeration value="contributor" />
			<enumeration value="committer" />
            <enumeration value="component-lead" />
			<enumeration value="pmc-member" />
			<enumeration value="past-contributor" />
			<enumeration value="past-committer" />
            <enumeration value="past-component-lead" />
			<enumeration value="past-pmc-member" />
            <enumeration value="pmc-lead" />
		</restriction>
	</simpleType>

	<complexType name="ImageType">
		<annotation>
			<documentation>
				ImageType describes images. The attributes are like
				those for the HTML img tag.
			</documentation>
		</annotation>
		<attribute name="width" type="positiveInteger" />
		<attribute name="height" type="positiveInteger" />
		<attribute name="href" type="anyURI" />
	</complexType>

	<element name="people">
		<annotation>
			<documentation>
				people is the root element for the people list which is
				used to create the contributor page and the index.
			</documentation>
		</annotation>
		<complexType>
			<sequence minOccurs="0" maxOccurs="unbounded">
				<element name="contributor">
                    <annotation>
                    	<documentation>contributor adds an individual to the people list.</documentation>
                    </annotation>
                    <complexType>
						<attribute name="href" type="anyURI">
							<annotation>
								<documentation>
									href is a link to the person page
									for this individual, typical a
									person document in the people
									folder.
								</documentation>
							</annotation>
						</attribute>
						<attribute name="activity-level"
							type="tns:ActivityLevelType">
							<annotation>
								<documentation>
									activity-level is an indicator of
									the effort this individual is making
									on PDT as determined by the PMC and
									component leads.
								</documentation>
							</annotation>
						</attribute>
					</complexType>
				</element>
			</sequence>
		</complexType>
	</element>

	<simpleType name="ActivityLevelType">
		<restriction base="string">
			<enumeration value="extremely-active">
				<annotation>
					<documentation>
						A full-time leader or committer, or someone on
						their way to becoming a committer.
					</documentation>
				</annotation>
			</enumeration>
			<enumeration value="very-active">
				<annotation>
					<documentation>
						A frequent contributor of bug reports, patches,
						articles, dicussions, or advice.
					</documentation>
				</annotation>
			</enumeration>
			<enumeration value="active">
				<annotation>
					<documentation>
						Someone who occasionally makes valuable
						contributions.
					</documentation>
				</annotation>
			</enumeration>
			<enumeration value="inactive">
				<annotation>
					<documentation>
						Someone who has made valuable contributions in
						the past, but has moved on to other projects.
					</documentation>
				</annotation>
			</enumeration>
		</restriction>
	</simpleType>

</schema>