<?xml version="1.0" encoding="UTF-8"?>
<xsd:schema targetNamespace="http://www.annotation.dlese" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://www.annotation.dlese" elementFormDefault="qualified" attributeFormDefault="unqualified" version="0.1.01">
	<xsd:annotation>
		<xsd:documentation>***  SCHEMA PURPOSE  ****
		This schema defines item-level metadata for the annotation framework in the Digital Library for Earrth System Education (DLESE).
		Annotation data includes comments, opinions on use or context, evaluation information or posibly associating educational standards with resources.
		The annotation information also includes information on the status of the annotation, the type of annotation, and the annotating service.
		The name of an individual annotator may or may not be indicated.
		The annotation information indicates when the annotated item is part of the DLESE Reviewed Collection. 
		Unless an explicit indication is made, all annotated iterm are considered to be part of the DLESE Broad Collection.
		</xsd:documentation>
	</xsd:annotation>
	<xsd:annotation>
		<xsd:documentation>***  SCHEMA EXPLANATION  ****
		This is the MAIN schema for the DLESE annotation item-level metadata framework. 
		This MAIN schema may call other CATEGORY schemas to create the metadata framework structure. 
		CATEGORY schemas may call other CATEGORY schemas or VOCABULARY schemas in building the metadata structure.
		</xsd:documentation>
	</xsd:annotation>
	<xsd:annotation>
		<xsd:documentation>***  NAMESPACES  ********    
		The chameleon approach to namespace conventions is used in the CATEGORY and VOCABULARY schemas.
		Only this MAIN schema has a target namespace, http://www.annotation.dlese 
		The CATEGORY and VOCABULARY schemas do not have target namespaces (allows for plug-n-play components and vocabularies).
		</xsd:documentation>
	</xsd:annotation>
	<xsd:annotation>
		<xsd:documentation>***  ROOT ELEMENT  *****  
		The root element of this schema is annotationRecord.
		</xsd:documentation>
	</xsd:annotation>
	<xsd:annotation>
		<xsd:documentation>***  SCHEMA DEVELOPMENT  *****       
		The Venetian Blind approach is used for this MAIN schema and all other CATEGORY and VOCABULARY schemas.
		Elements within all schemas are used for fields (quantities) of the annotation metadata framework.
		When elements have controlled vocabularies that are hierarchal, the vocabularies appear in the element as a colon separated text string.
		Attributes are used when additional information is required for the content of an element or if two pieces of information are required. 
		</xsd:documentation>
	</xsd:annotation>
	<xsd:annotation>
		<xsd:documentation>*** DEFINING COMPLEX and SIMPLE TYPES  *******    
		Since the metadata framework uses Venetian Blind schema development, most metadata fields are defined as complex or simple types.
		This improves re-use for other frameworks developed at the DLESE Program Center (DPC) or within the DLESE community.
		As such, each schema has a complex and simple type section. Built-in simple types are defined when an elment is defined. 
		Derived simple types are used when a metadata field appears more than once in a CATEGORY schema or if restrictions are needed on element content. 
		</xsd:documentation>
	</xsd:annotation>
	<xsd:annotation>
		<xsd:documentation>*** LICENSE INFORMATION *****
		Copyright 2002, 2003 DLESE Program Center
		University Corporation for Atmospheric Research (UCAR)
		P.O. Box 3000, Boulder, CO 80307, United States of America
		email: support@dlese.org. 
These schemas are free software; you can redistribute them and/or modify them under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.  These schemas are distributed in the hope that they will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this project; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA  
		</xsd:documentation>
	</xsd:annotation>
	<xsd:annotation>
		<xsd:documentation>***********************  Other CATEGORY schemas to include  ********************************</xsd:documentation>
	</xsd:annotation>
	<xsd:annotation>
		<xsd:documentation>************************  VOCABULARY schemas to include  ***********************************</xsd:documentation>
	</xsd:annotation>
	<xsd:include schemaLocation="vocabs/pathway.xsd"/>
	<xsd:include schemaLocation="vocabs/roleAnnotation.xsd"/>
	<xsd:include schemaLocation="vocabs/nameTitle.xsd"/>
	<xsd:include schemaLocation="vocabs/status.xsd"/>
	<xsd:include schemaLocation="vocabs/type.xsd"/>
	<xsd:annotation>
		<xsd:documentation>*****************************************    ROOT element      *****************************************</xsd:documentation>
	</xsd:annotation>
	<xsd:element name="annotationRecord" type="annotationType"/>
	<xsd:annotation>
		<xsd:documentation>annotationType is complex</xsd:documentation>
	</xsd:annotation>
	<xsd:annotation>
		<xsd:documentation>************************  Complex Types  (alpha order) *****************************
		
				annotationType			ROOT type
				contentType				is part of itemType
				contributorType			is part of contributorsType
				contributorsType			is part itemType
				dateType					is part of serviceType
				itemType					is part of annotationType
				organizationType			is part of contributorType
				person	Type				is part of contributorType
				serviceType				is part of annotationType
				statusOf					is part of itemType
				
		</xsd:documentation>
	</xsd:annotation>
	<xsd:complexType name="annotationType">
		<xsd:annotation>
			<xsd:documentation>
				***************************************  annotationType  *****************************************************
				The root type of this annotation metadata framework.
				These elements have the following types or schema associated with them.
				
				service 				is complex - information about the annotation service
				item					is complex - information about the item being annotated
			</xsd:documentation>
		</xsd:annotation>
		<xsd:sequence>
			<xsd:element name="service" type="serviceType" minOccurs="1" maxOccurs="1"/>
			<xsd:element name="item" type="itemType" minOccurs="1" maxOccurs="1"/>
		</xsd:sequence>
	</xsd:complexType>
	<xsd:complexType name="contentType">
		<xsd:annotation>
			<xsd:documentation>
				***************************************  contentType  *********************************************************
				description		is simple - free text of the annotation
				url					is simple - url to the text of the annotation
			</xsd:documentation>
		</xsd:annotation>
		<xsd:choice>
			<xsd:element name="url" type="stringTextType" minOccurs="1" maxOccurs="1"/>
			<xsd:element name="description" type="stringTextType" minOccurs="1" maxOccurs="1"/>
		</xsd:choice>
	</xsd:complexType>
	<xsd:complexType name="contributorType">
		<xsd:annotation>
			<xsd:documentation>
				***************************************  contributorType  ******************************
				An individual person or individual ogranization making the annotation.
				These elements have the following types or schema associated with them.
				date			is a simple type attribute; should be known so required; but may only be known to the year - date the contributor made the annotation
				organization	is complex - the organization that made the annotation
				person			is complex - the individual that made the annotation
				role			is a simple type attribute; see roleAnnotation.xsd - the role of the annotator in making the annotation
			</xsd:documentation>
		</xsd:annotation>
		<xsd:choice>
			<xsd:element name="person" type="personType" maxOccurs="1"/>
			<xsd:element name="organization" type="organizationType" maxOccurs="1"/>
		</xsd:choice>
		<xsd:attribute name="role" type="roleAnnotationType" use="required"/>
		<xsd:attribute name="date" type="union.dateType" use="required"/>
	</xsd:complexType>
	<xsd:complexType name="contributorsType">
		<xsd:annotation>
			<xsd:documentation>
				***************************************  contributorsType  ******************************
				Persons or organizations making the annotation.
				These elements have the following types or schema associated with them.
				contributor				is complex - an individual person or individual ogranization making the annotation
			</xsd:documentation>
		</xsd:annotation>
		<xsd:sequence>
			<xsd:element name="contributor" type="contributorType" minOccurs="1" maxOccurs="unbounded"/>
		</xsd:sequence>
	</xsd:complexType>
	<xsd:complexType name="dateType">
		<xsd:annotation>
			<xsd:documentation>
				***************************************  dateType  *********************************************************
				Information pertaining to date the annotation record was created or modified.
				
				created		is an attribute - the date the annotation record was created
				modified		is an attribute - the data the annotation record was modified			
			</xsd:documentation>
		</xsd:annotation>
		<xsd:simpleContent>
			<xsd:extension base="xsd:string">
				<xsd:attribute name="created" type="xsd:date" use="required"/>
				<xsd:attribute name="modified" type="xsd:date" use="optional"/>
			</xsd:extension>
		</xsd:simpleContent>
	</xsd:complexType>
	<xsd:complexType name="itemType">
		<xsd:annotation>
			<xsd:documentation>
				***************************************  itemType  ***************************************************
				Information about the item being annotated.
				These elements have the following types or schema associated with them.
				title			is simple - the title of the annotation, if none exists don't use
				itemID			is simple - the record number to the individual item-level metadata record within any DLESE collection
				pathway		is complex; see pathway.xsd - the list of approved pathways to the DLESE Reviewed Collection; use this field to indicate a resource is in the DLESE Reviewed Collection
				type			is complex; see type.xsd - the type of annotation
				date 			is simple; required because contributor and statusOf are not required and need some date associated with the annotation. This date could become irrelevant if individual contributors are listed where date is required on individual contributions - the date of an annotation
				statusOf		is complex - indicates a status and date associated with the annotation information
				content		is comples - provides a URL to or free text of the annotation
				context		is simple	- provides a URL to a page in the annotated resource in order to more closed relate the annotation and the resource being annotated
				contributors 	is complex - persons or organizations making the annotation
			</xsd:documentation>
		</xsd:annotation>
		<xsd:all>
			<xsd:element name="title" type="stringTextType" minOccurs="0" maxOccurs="1"/>
			<xsd:element name="itemID" type="stringTextType" minOccurs="1" maxOccurs="1"/>
			<xsd:element name="pathway" type="pathwayType" minOccurs="0" maxOccurs="1"/>
			<xsd:element name="type" type="typeType" minOccurs="1" maxOccurs="1"/>
			<xsd:element name="date" type="union.dateType" minOccurs="1" maxOccurs="1"/>
			<xsd:element name="statusOf" type="statusOfType" minOccurs="0" maxOccurs="1"/>
			<xsd:element name="content" type="contentType" minOccurs="1" maxOccurs="1"/>
			<xsd:element name="context" type="stringTextType" minOccurs="0" maxOccurs="1"/>
			<xsd:element name="contributors" type="contributorsType" minOccurs="0" maxOccurs="1"/>
		</xsd:all>
	</xsd:complexType>

	<xsd:complexType name="organizationType">
		<xsd:annotation>
			<xsd:documentation>
				*******************************************  organizationType  ***************************************************
				The organization that made the annotation
				These elements have the following types or schema associated with them.
				instName				is simple - the name of the institution making the annotation
				instDept				is simple - the name of the institution's department that made the annotation
				instPosition			is simple - the position of the individual within an institution that made the annotation
				instUrl					is simple - the url of the institution making the annotation
				instEmail				is simple - an email address for the institution making the annotation
			</xsd:documentation>
		</xsd:annotation>
		<xsd:all>
			<xsd:element name="instName" type="stringTextType" minOccurs="1" maxOccurs="1"/>
			<xsd:element name="instDept" type="stringTextType" minOccurs="0" maxOccurs="1"/>
			<xsd:element name="instPosition" type="stringTextType" minOccurs="0" maxOccurs="1"/>
			<xsd:element name="instUrl" type="stringTextType" minOccurs="0" maxOccurs="1"/>
			<xsd:element name="instEmail" type="stringTextType" minOccurs="0" maxOccurs="1"/>
		</xsd:all>
	</xsd:complexType>
	<xsd:complexType name="personType">
		<xsd:annotation>
			<xsd:documentation>
				*******************************************  personType  ***************************************************
				The individual that made the annotation.
				These elements have the following types or schema associated with them.
				nameTitle				is simple; see nameTitle.xsd - the title of the individual
				nameFirst				is simple - the first name of the individual
				nameMiddle			is simple - the middle name of the individual
				nameLast				is simple - the last name or family name of the individual
				instName				is simple - the institutional affiliation of the individual
				instDept 				is simple - the department of the institution the individual is associated with
				emailPrimary			is simple - the email of the inidividual
			</xsd:documentation>
		</xsd:annotation>
		<xsd:all>
			<xsd:element name="nameTitle" type="nameTitleType" minOccurs="0" maxOccurs="1"/>
			<xsd:element name="nameFirst" type="stringTextType" minOccurs="1" maxOccurs="1"/>
			<xsd:element name="nameMiddle" type="stringTextType" minOccurs="0" maxOccurs="1"/>
			<xsd:element name="nameLast" type="stringTextType" minOccurs="1" maxOccurs="1"/>
			<xsd:element name="instName" type="stringTextType" minOccurs="0" maxOccurs="1" default="No institutional affiliation"/>
			<xsd:element name="instDept" type="stringTextType" minOccurs="0" maxOccurs="1"/>
			<xsd:element name="emailPrimary" type="stringTextType" minOccurs="0" maxOccurs="1"/>
		</xsd:all>
	</xsd:complexType>
	<xsd:complexType name="serviceType">
		<xsd:annotation>
			<xsd:documentation>
				***************************************  serviceType  ***************************************************
				Information about the annotation service.
				These elements have the following types or schema associated with them.
				name				is simple - the name of the annotation service; free text
				recordID			is simple - the identification number of the annotation metadata record within the annotating service
				date				is complex - information pertaining to date the annotation record was created or modified
			</xsd:documentation>
		</xsd:annotation>
		<xsd:all>
			<xsd:element name="name" type="stringTextType" minOccurs="1" maxOccurs="1"/>
			<xsd:element name="recordID" type="stringTextType" minOccurs="1" maxOccurs="1"/>
			<xsd:element name="date" type="dateType" minOccurs="1" maxOccurs="1"/>
		</xsd:all>
	</xsd:complexType>
	<xsd:complexType name="statusOfType">
		<xsd:annotation>
			<xsd:documentation>
				***************************************  statusOfType  *********************************************************
				Indicates a status and date associated with the annotation information.
				These attributes have the following types or schema associated with them.
					status			attribute; see status.xsd -  indicates a status of an annotation
					date			attribute - the date when a status of an annotation was assigned
			</xsd:documentation>
		</xsd:annotation>
		<xsd:simpleContent>
			<xsd:extension base="xsd:string">
				<xsd:attribute name="status" type="statusType" use="required"/>
				<xsd:attribute name="date" type="xsd:date" use="required"/>
			</xsd:extension>
		</xsd:simpleContent>
	</xsd:complexType>
	<xsd:annotation>
		<xsd:documentation>******************************    Simple Types (alpha order)  ********************************</xsd:documentation>
	</xsd:annotation>
	<xsd:simpleType name="stringTextType">
		<xsd:annotation>
			<xsd:documentation>
					Use this patterned string to ensure that a null tag is not valid string content.
					Note: that xsd:string allows content to be null even if the element is required.
			</xsd:documentation>
		</xsd:annotation>
		<xsd:restriction base="xsd:string">
			<xsd:pattern value=".[\S\s]*"/>
<!--			<xsd:pattern value=".*\S+[\s\S]*"/> -->
		</xsd:restriction>
	</xsd:simpleType>
	<xsd:simpleType name="union.dateType">
		<xsd:annotation>
			<xsd:documentation/>
		</xsd:annotation>
		<xsd:union memberTypes="xsd:date xsd:gYearMonth xsd:gYear"/>
	</xsd:simpleType>
</xsd:schema>

