<?xml version="1.0" encoding="UTF-8"?>
<!-- edited with XMLSPY v2004 rel. 4 U (http://www.xmlspy.com) by Jagan (W3C) -->
<!-- edited with XMLSpy v2005 U (http://www.xmlspy.com) by Sriganesh Madhvanath (W3C) -->
<!-- edited with oxygen7.2 by Louis Vuurpijl (iUF) and Don Willems (NICI)-->
<!-- UPX Schema for representation of Online Pen Input Datasets. Version 0.9.5 Published October 2006 -->
<xsd:schema targetNamespace="http://unipen.nici.ru.nl/upx" elementFormDefault="qualified"
	attributeFormDefault="unqualified" xmlns="http://unipen.nici.ru.nl/upx"
	xmlns:xsd="http://www.w3.org/2001/XMLSchema">
	<!--when ink ml schema is available we should move to it and define hwTraces using the traceref defined in the ink ml schema. <xsd:include schemaLocation="inkml.xsd"/>-->
	<xsd:include schemaLocation="inkml.xsd"/>
	<xsd:element name="upx" type="upxType">
		<xsd:annotation>
			<xsd:documentation>Root element of each document that comprises the Dataset. The Dataset
				is comprised of multiple InkML and UPX documents organized in a directory structure,
				with perhaps common information stored in a separate UPX document and referred to by
				other UPX documents. </xsd:documentation>
		</xsd:annotation>
	</xsd:element>
	<xsd:complexType name="upxType">
		<xsd:sequence>
			<xsd:element name="datasetInfo">
				<xsd:annotation>
					<xsd:documentation>Specifies metadata related to the dataset as a whole, a
						high-level characterization of the Dataset. </xsd:documentation>
				</xsd:annotation>
				<xsd:complexType>
					<xsd:complexContent>
						<xsd:extension base="datasetInfoType"/>
					</xsd:complexContent>
				</xsd:complexType>
			</xsd:element>
			<xsd:element name="datasetDefs" type="datasetDefsType">
				<xsd:annotation>
					<xsd:documentation>Definitions block containing information about writers,
						sources of annotation and annotation hierarchies referred to in this
						document [OPEN: Model for sharing definitions across Dataset]
					</xsd:documentation>
				</xsd:annotation>
			</xsd:element>
			<xsd:element name="hwData" maxOccurs="unbounded">
				<xsd:annotation>
					<xsd:documentation>Detailed labeling of digital ink traces, organized in a
						customizable hierarchy. Gestures and other notations can also be
						accommodated in the same structure. </xsd:documentation>
				</xsd:annotation>
				<xsd:complexType>
					<xsd:complexContent>
						<xsd:extension base="hwDataType"/>
					</xsd:complexContent>
				</xsd:complexType>
			</xsd:element>
		</xsd:sequence>
		<xsd:attribute name="schemaVersion" type="xsd:decimal" default="0.9.5">
			<xsd:annotation>
				<xsd:documentation>Version of schema (format) used in this document, of the form
					X.Y, where X is the major version and Y the minor version. Backward
					compatability between major versions is not guaranteed. </xsd:documentation>
			</xsd:annotation>
		</xsd:attribute>
	</xsd:complexType>
	<xsd:complexType name="datasetInfoType">
		<xsd:sequence>
			<xsd:element name="name" type="xsd:string" default="Anonymous" minOccurs="0">
				<xsd:annotation>
					<xsd:documentation>Name of the dataset. Used to refer to the dataset, for
						example the "IUF-train_r01_v07" collection.</xsd:documentation>
				</xsd:annotation>
			</xsd:element>
			<xsd:element name="category" type="xsd:string" default="8" minOccurs="0">
				<xsd:annotation>
					<xsd:documentation>High-level category of dataset similar to InkML
						contentCategory. Examples: 1. text/language [/script][/sub-category] (e.g.,
						text/jpn/Kanji, text/en/ssn) 2. drawing [/sub-category] Sub-category can be
						similar to Unipen categorization (numerals, isolated characters, words etc)
						or correspond to semantic categories such as SSN. [OPEN: Standardization of
						syntax. Also how to handle documents wherein multiple scripts or in general
						multiple (sub)categories are represented] </xsd:documentation>
				</xsd:annotation>
			</xsd:element>
			<xsd:element name="version" minOccurs="0">
				<xsd:annotation>
					<xsd:documentation>Dataset version number of the form X.Y, where X is the major
						version and Y the minor version. </xsd:documentation>
				</xsd:annotation>
				<xsd:complexType>
					<xsd:simpleContent>
						<xsd:extension base="xsd:decimal">
							<xsd:attribute name="pubDate" type="xsd:date">
								<xsd:annotation>
									<xsd:documentation>Date of publication of dataset in format
										YYYY-MM-DD</xsd:documentation>
								</xsd:annotation>
							</xsd:attribute>
						</xsd:extension>
					</xsd:simpleContent>
				</xsd:complexType>
			</xsd:element>
			<xsd:element name="contact" type="xsd:string" default="Abc, abc@def.xyz" minOccurs="0">
				<xsd:annotation>
					<xsd:documentation>Contact info for dataset related queries, such as name,
						email, address etc.</xsd:documentation>
				</xsd:annotation>
			</xsd:element>
			<xsd:element name="source" type="xsd:string" minOccurs="0">
				<xsd:annotation>
					<xsd:documentation>Name of the organization where the data came
					from</xsd:documentation>
				</xsd:annotation>
			</xsd:element>
			<xsd:element name="setup" minOccurs="0">
				<xsd:annotation>
					<xsd:documentation>Description of data collection recording setup and conditions
						[OPEN: Are there standard bits of information we would like to capture here,
						and should we have corresponding subelements ?] </xsd:documentation>
				</xsd:annotation>
				<xsd:complexType>
					<xsd:simpleContent>
						<xsd:extension base="xsd:string">
							<xsd:attribute name="inkSourceRef" type="xsd:anyURI" use="required">
								<xsd:annotation>
									<xsd:documentation>Reference to inkSource element from InkML,
										describing the device used for capture.</xsd:documentation>
								</xsd:annotation>
							</xsd:attribute>
						</xsd:extension>
					</xsd:simpleContent>
				</xsd:complexType>
			</xsd:element>
			<xsd:element name="dataInfo" type="dataInfoType" minOccurs="1">
				<xsd:annotation>
					<xsd:documentation>Nature and structure of the data as a whole. The dataInfo
						element gives details about the data such as quality of writing, groundTruth
						of what is captured, the data collection methodology,etc.
					</xsd:documentation>
				</xsd:annotation>
			</xsd:element>
		</xsd:sequence>
		<xsd:attribute name="href" type="xsd:anyURI">
			<xsd:annotation>
				<xsd:documentation>Reference to datasetInfo element defined elsewhere (e.g., in a
					common location). This is overridden by any information provided as
					sub-elements. </xsd:documentation>
			</xsd:annotation>
		</xsd:attribute>
		<xsd:attribute name="id" type="xsd:string">
			<xsd:annotation>
				<xsd:documentation>Identifier of datasetInfo element that can be used in
				references</xsd:documentation>
			</xsd:annotation>
		</xsd:attribute>
		<xsd:attribute name="datasetId" type="xsd:string">
			<xsd:annotation>
				<xsd:documentation>Unique identifier for this dataset, derived from its
				name.</xsd:documentation>
			</xsd:annotation>
		</xsd:attribute>
	</xsd:complexType>
	<xsd:complexType name="dataInfoType">
		<xsd:sequence>
			<xsd:element name="contentDesc" type="xsd:string">
				<xsd:annotation>
					<xsd:documentation>General top-level description of content of dataset,
						including information about script(s) used, writing styles, quality of
						writing. This is only meant to provide a brief consolidated picture of the
						data in the dataset, and is not a substitute for detailed annotation of ink.
					</xsd:documentation>
				</xsd:annotation>
			</xsd:element>
			<xsd:element name="numWriters" type="xsd:positiveInteger" minOccurs="0">
				<xsd:annotation>
					<xsd:documentation>Number of writers contributing data</xsd:documentation>
				</xsd:annotation>
			</xsd:element>
			<xsd:element name="quality" minOccurs="0">
				<xsd:annotation>
					<xsd:documentation>Overall quality of the handwriting data captured in the
						dataset</xsd:documentation>
				</xsd:annotation>
				<xsd:simpleType>
					<xsd:restriction base="xsd:string">
						<xsd:enumeration value="poor"/>
						<xsd:enumeration value="average"/>
						<xsd:enumeration value="good"/>
						<xsd:enumeration value="unknown"/>
					</xsd:restriction>
				</xsd:simpleType>
			</xsd:element>
			<xsd:element name="style" minOccurs="0">
				<xsd:annotation>
					<xsd:documentation>Overall writing style of the handwriting data captured in the
						dataset, an enumeration of discrete, cursive,mixed, unknown. In addition,
						style labels may be specified as annotation of ink.</xsd:documentation>
				</xsd:annotation>
				<xsd:simpleType>
					<xsd:restriction base="xsd:string">
						<xsd:enumeration value="discrete"/>
						<xsd:enumeration value="cursive"/>
						<xsd:enumeration value="mixed"/>
						<xsd:enumeration value="unknown"/>
					</xsd:restriction>
				</xsd:simpleType>
			</xsd:element>
			<xsd:element name="groundTruth" minOccurs="0">
				<xsd:annotation>
					<xsd:documentation>Contains a verbatim transcription of the reference text.
						Alternatively, Describes the corpus/source from where the data-list was
						created. e.g. TDIL corpus, EMILLE corpus, manually generated
					data-list.</xsd:documentation>
				</xsd:annotation>
				<xsd:complexType>
					<xsd:attribute name="truthRef" type="xsd:anyURI">
						<xsd:annotation>
							<xsd:documentation>Reference to file containing transcription of the
								referenced text.</xsd:documentation>
						</xsd:annotation>
					</xsd:attribute>
					<xsd:attribute name="desc" type="xsd:string">
						<xsd:annotation>
							<xsd:documentation>Brief description of groundTruth.</xsd:documentation>
						</xsd:annotation>
					</xsd:attribute>
				</xsd:complexType>
			</xsd:element>
		</xsd:sequence>
	</xsd:complexType>
	<xsd:complexType name="datasetDefsType">
		<xsd:sequence>
			<xsd:element name="writerDefs" minOccurs="0">
				<xsd:annotation>
					<xsd:documentation>Profiles of writers who contributed data to the
					dataset</xsd:documentation>
				</xsd:annotation>
				<xsd:complexType>
					<xsd:complexContent>
						<xsd:extension base="writerDefsType">
							<xsd:attribute name="href" type="xsd:anyURI">
								<xsd:annotation>
									<xsd:documentation>Reference to block of writer definitions
										stored elsewhere. In general, writer information is
										collected at the time of data collection and stored in a
										common place.</xsd:documentation>
								</xsd:annotation>
							</xsd:attribute>
							<xsd:attribute name="id" type="xsd:string">
								<xsd:annotation>
									<xsd:documentation>Identifier for this block of writer
										definitons (may be useful for defining groups of
									writers)</xsd:documentation>
								</xsd:annotation>
							</xsd:attribute>
						</xsd:extension>
					</xsd:complexContent>
				</xsd:complexType>
			</xsd:element>
			<xsd:element name="labelSrcDefs" minOccurs="0">
				<xsd:annotation>
					<xsd:documentation>Profiles of sources of labels (human or machine) used for
						annotating the dataset</xsd:documentation>
				</xsd:annotation>
				<xsd:complexType>
					<xsd:complexContent>
						<xsd:extension base="labelSrcDefsType"/>
					</xsd:complexContent>
				</xsd:complexType>
			</xsd:element>
			<!--		<xsd:element name="hierarchyDefs" type="hierarchyDefsType">
				<xsd:annotation>
					<xsd:documentation>Declarations of various levels of hierarchy</xsd:documentation>
				</xsd:annotation>
			</xsd:element>-->
			<xsd:element name="annotationDefs" type="annotationDefsType" minOccurs="0">
				<xsd:annotation>
					<xsd:documentation>Definitions of various annotation schemes used in the dataset
						[OPEN: Would we need more than one ?]</xsd:documentation>
				</xsd:annotation>
			</xsd:element>
		</xsd:sequence>
	</xsd:complexType>
	<xsd:complexType name="writerDefsType">
		<xsd:sequence minOccurs="0">
			<xsd:element name="writer" type="writerType" maxOccurs="unbounded">
				<xsd:annotation>
					<xsd:documentation>Information about each writer whose writing samples appear in
						the dataset</xsd:documentation>
				</xsd:annotation>
			</xsd:element>
		</xsd:sequence>
	</xsd:complexType>
	<xsd:complexType name="writerType">
		<xsd:sequence>
			<xsd:element name="personal" type="personaIType" minOccurs="0">
				<xsd:annotation>
					<xsd:documentation>Personal profile of writer (relevant to
					writing)</xsd:documentation>
				</xsd:annotation>
			</xsd:element>
			<xsd:element name="skillDevice" maxOccurs="unbounded">
				<xsd:annotation>
					<xsd:documentation>Familiarity with different types of capture devices used
						(Possible values: Poor, Average, Good)</xsd:documentation>
				</xsd:annotation>
				<xsd:complexType>
					<xsd:simpleContent>
						<xsd:extension base="xsd:string">
							<xsd:attribute name="deviceType">
								<xsd:annotation>
									<xsd:documentation>Type of device, e.g. TabletPC, PDA used for
										data capture, used to retrieve the skill of the user on a
										specific device [OPEN: Should we have an explicit reference
										to specific InkML captureDevice ?]</xsd:documentation>
								</xsd:annotation>
							</xsd:attribute>
						</xsd:extension>
					</xsd:simpleContent>
				</xsd:complexType>
			</xsd:element>
			<xsd:element name="skillContent">
				<xsd:complexType>
					<xsd:choice maxOccurs="unbounded">
						<xsd:element name="skillText" type="skillTextType" maxOccurs="unbounded">
							<xsd:annotation>
								<xsd:documentation>Familiarity with different scripts featured in
									data collection</xsd:documentation>
							</xsd:annotation>
						</xsd:element>
						<xsd:element name="skillDrawing" type="skillDrawingType"
							maxOccurs="unbounded">
							<xsd:annotation>
								<xsd:documentation>Familiarity of the writer with
								drawing</xsd:documentation>
							</xsd:annotation>
						</xsd:element>
						<xsd:element name="skillMusic" type="skillMusicType" maxOccurs="unbounded">
							<xsd:annotation>
								<xsd:documentation>Familiarity with entering music
								scores</xsd:documentation>
							</xsd:annotation>
						</xsd:element>
						<xsd:element name="skillMath" type="skillMathType" maxOccurs="unbounded">
							<xsd:annotation>
								<xsd:documentation>Familiarity with mathematics
								notation</xsd:documentation>
							</xsd:annotation>
						</xsd:element>
						<xsd:element name="skillChemistry" type="skillChemistryType"
							maxOccurs="unbounded">
							<xsd:annotation>
								<xsd:documentation>Familiarity with chemistry
								notation</xsd:documentation>
							</xsd:annotation>
						</xsd:element>
					</xsd:choice>
				</xsd:complexType>
			</xsd:element>
		</xsd:sequence>
		<xsd:attribute name="id" type="xsd:ID">
			<xsd:annotation>
				<xsd:documentation>The unique identifier of this writer
				definition.</xsd:documentation>
			</xsd:annotation>
		</xsd:attribute>
		<xsd:attribute name="writerId" type="xsd:string">
			<xsd:annotation>
				<xsd:documentation>The identifier of this writer (typically, unique within a
					dataset).</xsd:documentation>
			</xsd:annotation>
		</xsd:attribute>
	</xsd:complexType>
	<xsd:complexType name="personaIType">
		<xsd:sequence>
			<xsd:element name="hand" default="right">
				<xsd:annotation>
					<xsd:documentation>Handedness: R for Right Handed and L for Left
					Handed</xsd:documentation>
				</xsd:annotation>
				<xsd:simpleType>
					<xsd:restriction base="xsd:string">
						<xsd:enumeration value="left"/>
						<xsd:enumeration value="right"/>
						<xsd:enumeration value="unknown"/>
						<xsd:enumeration value="unspecified"/>
					</xsd:restriction>
				</xsd:simpleType>
			</xsd:element>
			<xsd:element name="educationLevel">
				<xsd:annotation>
					<xsd:documentation>Highest level of formal education</xsd:documentation>
				</xsd:annotation>
				<xsd:simpleType>
					<xsd:restriction base="xsd:string">
						<xsd:enumeration value="primary school"/>
						<xsd:enumeration value="high school"/>
						<xsd:enumeration value="college graduate"/>
						<xsd:enumeration value="post graduate"/>
						<xsd:enumeration value="unknown"/>
						<xsd:enumeration value="unspecified"/>
					</xsd:restriction>
				</xsd:simpleType>
			</xsd:element>
			<xsd:element name="gender">
				<xsd:annotation>
					<xsd:documentation>Writer gender</xsd:documentation>
				</xsd:annotation>
				<xsd:simpleType>
					<xsd:restriction base="xsd:string">
						<xsd:enumeration value="male"/>
						<xsd:enumeration value="female"/>
						<xsd:enumeration value="unknown"/>
						<xsd:enumeration value="unspecified"/>
					</xsd:restriction>
				</xsd:simpleType>
			</xsd:element>
			<xsd:element name="profession" type="xsd:string">
				<xsd:annotation>
					<xsd:documentation>Profession of the writer [OPEN: Should this be a closed list
						such as standard occupation codes ?]</xsd:documentation>
				</xsd:annotation>
			</xsd:element>
			<xsd:element name="region" type="xsd:string">
				<xsd:annotation>
					<xsd:documentation>Native region of the writer. The convention is
						Country/State/[City,Town,Village]</xsd:documentation>
				</xsd:annotation>
			</xsd:element>
			<xsd:choice>
				<xsd:element name="dateOfBirth" type="dateType">
					<xsd:annotation>
						<xsd:documentation> Date of birth of the writer in format YYYY[-MM[-DD]?]?
							Examples: 2006-09-20, 2002, 1986-12. </xsd:documentation>
					</xsd:annotation>
				</xsd:element>
				<xsd:element name="age" type="xsd:duration">
					<xsd:annotation>
						<xsd:documentation> The age of the writer in duration format. Examples: P24Y
							(24 years), P12Y2M12D (12 years, 2 months and 12 days), P453M (453
							months), P243DT9H26M12S (243 days, 9 hours, 26 minutes and 12 seconds),
							or PT315784938472610300S (315784938472610300 seconds).
						</xsd:documentation>
					</xsd:annotation>
				</xsd:element>
			</xsd:choice>
		</xsd:sequence>
	</xsd:complexType>
	<xsd:simpleType name="dateType">
		<xsd:annotation>
			<xsd:documentation> A date that can be restricted to only year, years and months, or
				years, months, and days. Examples: 2006-09-20, 2002, 1986-12. </xsd:documentation>
		</xsd:annotation>
		<xsd:restriction base="xsd:string">
			<xsd:pattern
				value="[0-9][0-9][0-9][0-9](-((1[0-2])|(0[1-9]))(-((3[0-1])|(0[1-9])|([1-2][0-9])))?)?"
			/>
		</xsd:restriction>
	</xsd:simpleType>
	<xsd:complexType name="skillTextType">
		<xsd:sequence>
			<xsd:element name="style">
				<xsd:annotation>
					<xsd:documentation>Style of writing [OPEN: Are more styles needed
					?]</xsd:documentation>
				</xsd:annotation>
				<xsd:simpleType>
					<xsd:restriction base="xsd:string">
						<xsd:enumeration value="discrete"/>
						<xsd:enumeration value="cursive"/>
						<xsd:enumeration value="mixed"/>
						<xsd:enumeration value="unknown"/>
						<xsd:enumeration value="unspecified"/>
					</xsd:restriction>
				</xsd:simpleType>
			</xsd:element>
			<xsd:element name="usageFreq">
				<xsd:annotation>
					<xsd:documentation>Frequency of the usage of the script over last
					year</xsd:documentation>
				</xsd:annotation>
				<xsd:simpleType>
					<xsd:restriction base="xsd:string">
						<xsd:enumeration value="every day"/>
						<xsd:enumeration value="once a week"/>
						<xsd:enumeration value="once a month"/>
						<xsd:enumeration value="rarely"/>
						<xsd:enumeration value="unknown"/>
						<xsd:enumeration value="unspecified"/>
					</xsd:restriction>
				</xsd:simpleType>
			</xsd:element>
			<xsd:element name="proficiency">
				<xsd:annotation>
					<xsd:documentation>Level of skill of the writer in writing particular
					script</xsd:documentation>
				</xsd:annotation>
				<xsd:simpleType>
					<xsd:restriction base="xsd:string">
						<xsd:enumeration value="poor"/>
						<xsd:enumeration value="average"/>
						<xsd:enumeration value="good"/>
						<xsd:enumeration value="unknown"/>
						<xsd:enumeration value="unspecified"/>
					</xsd:restriction>
				</xsd:simpleType>
			</xsd:element>
		</xsd:sequence>
		<xsd:attribute name="language" type="xsd:string" use="required">
			<xsd:annotation>
				<xsd:documentation>Whether native writer of this script</xsd:documentation>
			</xsd:annotation>
		</xsd:attribute>
		<xsd:attribute name="script" type="xsd:string" use="required">
			<xsd:annotation>
				<xsd:documentation>Name of the script [OPEN: Naming convention such as
				ISO-15924]</xsd:documentation>
			</xsd:annotation>
		</xsd:attribute>
		<xsd:attribute name="native" type="xsd:boolean" use="required">
			<xsd:annotation>
				<xsd:documentation>Whether native writer of this script</xsd:documentation>
			</xsd:annotation>
		</xsd:attribute>
	</xsd:complexType>
	<xsd:complexType name="skillDrawingType">
		<xsd:sequence>
			<xsd:element name="usageFreq">
				<xsd:annotation>
					<xsd:documentation>Frequency of the usage of drawing.</xsd:documentation>
				</xsd:annotation>
				<xsd:simpleType>
					<xsd:restriction base="xsd:string">
						<xsd:enumeration value="everyday"/>
						<xsd:enumeration value="once a week"/>
						<xsd:enumeration value="once a month"/>
						<xsd:enumeration value="rarely"/>
						<xsd:enumeration value="unknown"/>
						<xsd:enumeration value="unspecified"/>
					</xsd:restriction>
				</xsd:simpleType>
			</xsd:element>
			<xsd:element name="proficiency">
				<xsd:annotation>
					<xsd:documentation>Level of skill of the writer in drawing.</xsd:documentation>
				</xsd:annotation>
				<xsd:simpleType>
					<xsd:restriction base="xsd:string">
						<xsd:enumeration value="poor"/>
						<xsd:enumeration value="average"/>
						<xsd:enumeration value="good"/>
						<xsd:enumeration value="unknown"/>
						<xsd:enumeration value="unspecified"/>
					</xsd:restriction>
				</xsd:simpleType>
			</xsd:element>
		</xsd:sequence>
	</xsd:complexType>
	<xsd:complexType name="skillMusicType">
		<xsd:sequence> </xsd:sequence>
	</xsd:complexType>
	<xsd:complexType name="skillMathType">
		<xsd:sequence> </xsd:sequence>
	</xsd:complexType>
	<xsd:complexType name="skillChemistryType">
		<xsd:sequence> </xsd:sequence>
	</xsd:complexType>
	<xsd:complexType name="labelSrcDefsType">
		<xsd:sequence minOccurs="0">
			<xsd:element name="labelSrc" type="labelSrcType" minOccurs="0" maxOccurs="unbounded">
				<xsd:annotation>
					<xsd:documentation>Contains descriptions of annotators (human or machine) of the
						Dataset. Each labelSrc element captures information regarding the origin of
						a particular set of labels, type of labels or other meta-information
						associated with annotations contained in the dataset.</xsd:documentation>
				</xsd:annotation>
			</xsd:element>
		</xsd:sequence>
		<xsd:attribute name="href" type="xsd:anyURI">
			<xsd:annotation>
				<xsd:documentation>Reference to block of label source definitions stored elsewhere.
					In general, information about label sources is stored in a common place. This is
					overridden by any information provided as subelements.</xsd:documentation>
			</xsd:annotation>
		</xsd:attribute>
		<xsd:attribute name="id" type="xsd:string">
			<xsd:annotation>
				<xsd:documentation>Identifier for this block of label source
				definitions</xsd:documentation>
			</xsd:annotation>
		</xsd:attribute>
	</xsd:complexType>
	<xsd:complexType name="labelSrcType">
		<xsd:sequence>
			<xsd:element name="name" type="xsd:string">
				<xsd:annotation>
					<xsd:documentation>Name of label source</xsd:documentation>
				</xsd:annotation>
			</xsd:element>
			<xsd:element name="source" type="xsd:string">
				<xsd:annotation>
					<xsd:documentation>Organization that label source represents</xsd:documentation>
				</xsd:annotation>
			</xsd:element>
			<xsd:element name="contact" type="xsd:string">
				<xsd:annotation>
					<xsd:documentation>Contact information for label source: Name, email,
					etc</xsd:documentation>
				</xsd:annotation>
			</xsd:element>
			<xsd:element name="desc" type="xsd:string">
				<xsd:annotation>
					<xsd:documentation>General description of the label source (more suitable fo
						rmachine sources)</xsd:documentation>
				</xsd:annotation>
			</xsd:element>
		</xsd:sequence>
		<xsd:attribute name="id" type="xsd:ID" use="required">
			<xsd:annotation>
				<xsd:documentation>Identifier for this label source, refered to by
				label</xsd:documentation>
			</xsd:annotation>
		</xsd:attribute>
		<xsd:attribute name="type" use="required">
			<xsd:annotation>
				<xsd:documentation>Type of annotator: machine or human</xsd:documentation>
			</xsd:annotation>
			<xsd:simpleType>
				<xsd:restriction base="xsd:string">
					<xsd:enumeration value="human"/>
					<xsd:enumeration value="machine"/>
					<xsd:enumeration value="unknown"/>
					<xsd:enumeration value="unspecified"/>
				</xsd:restriction>
			</xsd:simpleType>
		</xsd:attribute>
	</xsd:complexType>
	<xsd:complexType name="labelTypesType">
		<xsd:sequence>
			<xsd:element name="labelName" maxOccurs="unbounded">
				<xsd:annotation>
					<xsd:documentation>Type of label provided by label source [OPEN: Should this be
						a closed list ?]</xsd:documentation>
				</xsd:annotation>
				<xsd:complexType>
					<xsd:simpleContent>
						<xsd:extension base="xsd:string">
							<xsd:attribute name="labelFormat" type="xsd:string" use="required">
								<xsd:annotation>
									<xsd:documentation>Encoding used for labels of this type (e.g.
										UNICODE, ISCII, etc.)</xsd:documentation>
								</xsd:annotation>
							</xsd:attribute>
						</xsd:extension>
					</xsd:simpleContent>
				</xsd:complexType>
			</xsd:element>
		</xsd:sequence>
	</xsd:complexType>
	<xsd:complexType name="annotationDefsType">
		<xsd:sequence minOccurs="0">
			<xsd:element name="annotationScheme" maxOccurs="unbounded">
				<xsd:annotation>
					<xsd:documentation>Description of annotation scheme</xsd:documentation>
				</xsd:annotation>
				<xsd:complexType>
					<xsd:complexContent>
						<xsd:extension base="annotationSchemeType"/>
					</xsd:complexContent>
				</xsd:complexType>
			</xsd:element>
		</xsd:sequence>
		<xsd:attribute name="href" type="xsd:anyURI">
			<xsd:annotation>
				<xsd:documentation>Reference to block of annotation definitions stored elsewhere. In
					general, annotation hierarchies are defined once and stored in a common
				place.</xsd:documentation>
			</xsd:annotation>
		</xsd:attribute>
		<xsd:attribute name="id" type="xsd:ID">
			<xsd:annotation>
				<xsd:documentation>Identifier for this block of annotation
				definitions</xsd:documentation>
			</xsd:annotation>
		</xsd:attribute>
	</xsd:complexType>
	<xsd:complexType name="annotationSchemeType">
		<xsd:sequence>
			<xsd:element name="annotationLevel" type="annotationLevelType" maxOccurs="unbounded">
				<xsd:annotation>
					<xsd:documentation>Description of levels of the annotation hierarchy, now
						supports heterogenous hierarchies, wherein each node can have children of
						different types.[OPEN: Do we require to explicitly specify parent-child relationships?]</xsd:documentation>
				</xsd:annotation>
			</xsd:element>
		</xsd:sequence>
		<xsd:attribute name="id" type="xsd:ID" use="required">
			<xsd:annotation>
				<xsd:documentation>Identifier of the annotationScheme</xsd:documentation>
			</xsd:annotation>
		</xsd:attribute>
		<xsd:attribute name="desc" type="xsd:string" use="optional"/>
		<xsd:attribute name="refDoc" type="xsd:anyURI" use="optional"/>
	</xsd:complexType>
	<xsd:complexType name="hwDataType">
		<xsd:sequence>
			<!--	<xsd:choice> -->
			<xsd:element name="hLevel" type="hLevelType" minOccurs="0" maxOccurs="unbounded">
				<xsd:annotation>
					<xsd:documentation>hLevel specifies a collection of ink traces at a certain
						hierarchy level specified in the corresponding annotationScheme. Each hLevel
						can refer to a different annotation scheme, uiInfo/imgInfo, writerDef,.. for
						even more flexibility.</xsd:documentation>
				</xsd:annotation>
			</xsd:element>
			<!--		<xsd:element name="hwtraces" type="hwTracesType"/>
			</xsd:choice> -->
			<xsd:element name="uiInfo" type="uiInfoType" minOccurs="0">
				<xsd:annotation>
					<xsd:documentation>Description of the writing area or field used to capture ink.
						All measurements are in writing area's resolution [OPEN: Completely OPEN
					!]</xsd:documentation>
				</xsd:annotation>
			</xsd:element>
			<xsd:element name="imgInfo" type="imgInfoType" minOccurs="0">
				<xsd:annotation>
					<xsd:documentation>Background image information.</xsd:documentation>
				</xsd:annotation>
			</xsd:element>
		</xsd:sequence>
		<xsd:attribute name="desc" type="xsd:string" use="optional">
			<xsd:annotation>
				<xsd:documentation>Description of hwData block</xsd:documentation>
			</xsd:annotation>
		</xsd:attribute>
		<xsd:attribute name="annotationSchemeRef" type="xsd:anyURI" use="required">
			<xsd:annotation>
				<xsd:documentation>Reference to the annotation scheme used</xsd:documentation>
			</xsd:annotation>
		</xsd:attribute>
		<xsd:attribute name="id" type="xsd:string" use="required">
			<xsd:annotation>
				<xsd:documentation
					source="This attribute captures the Trial ID for the handwriting sample that is being collected"
					>Identifier for hwData block</xsd:documentation>
			</xsd:annotation>
		</xsd:attribute>
	</xsd:complexType>
	<xsd:complexType name="hLevelType">
		<xsd:sequence>
			<xsd:element name="label" maxOccurs="unbounded">
				<xsd:annotation>
					<xsd:documentation>Labels describing the ink in this block. Each label is of a
						specific type (e.g. segm, truth, quality, etc) and from a specific label
						source defined earlier. Labels are in general overridden by labels at lower
						levels (sub-blocks). A label of type "segm" refers to the block structure
						(itself the result of segmentation/annotation). [OPEN: Alternative ways of
						representing alternative block structures from different label
					sources]</xsd:documentation>
				</xsd:annotation>
				<xsd:complexType>
					<xsd:complexContent>
						<xsd:extension base="labelType"/>
					</xsd:complexContent>
				</xsd:complexType>
			</xsd:element>
			<xsd:element name="uiInfo" type="uiInfoType" minOccurs="0">
				<xsd:annotation>
					<xsd:documentation>Description of the writing area or field used to capture ink.
						All measurements are in writing area's resolution [OPEN: Completely OPEN
					!]</xsd:documentation>
				</xsd:annotation>
			</xsd:element>
			<xsd:element name="imgInfo" type="imgInfoType" minOccurs="0">
				<xsd:annotation>
					<xsd:documentation>Background image information.</xsd:documentation>
				</xsd:annotation>
			</xsd:element>
			<xsd:element name="hwTraces" type="hwTracesType" minOccurs="1" maxOccurs="unbounded">
				<xsd:annotation>
					<xsd:documentation>Leaf-level references to digital ink traces (list of InkML
						tracerefs)</xsd:documentation>
				</xsd:annotation>
			</xsd:element>
			<xsd:element name="hLevel" type="hLevelType" minOccurs="0" maxOccurs="unbounded"/>
		</xsd:sequence>
		<xsd:attribute name="id" type="xsd:ID">
			<xsd:annotation>
				<xsd:documentation>Identifier for block</xsd:documentation>
			</xsd:annotation>
		</xsd:attribute>
		<xsd:attribute name="href" type="xsd:anyURI">
			<xsd:annotation>
				<xsd:documentation>Reference to hLevel defined elsewhere. [NOTE: In order for
					parsers/validators to extract information regarding, e.g., writer, dataset
					definitions, or annotation scheme, the referenced hLevel context should be
					considered.]</xsd:documentation>
			</xsd:annotation>
		</xsd:attribute>
		<xsd:attribute name="writerRef" type="xsd:string" use="optional">
			<xsd:annotation>
				<xsd:documentation>Reference to writer of ink in block (overridden by writer
					references at lower levels)</xsd:documentation>
			</xsd:annotation>
		</xsd:attribute>
		<xsd:attribute name="level" type="xsd:string" use="required"/>
	</xsd:complexType>
	<xsd:complexType name="labelType">
		<xsd:annotation>
			<xsd:documentation>Type corresponding to basic unit of annotation</xsd:documentation>
		</xsd:annotation>
		<xsd:sequence>
			<xsd:element name="alternate" maxOccurs="unbounded">
				<xsd:annotation>
					<xsd:documentation>Alternative label values with rank and score. Alternates can
						be generated from a recognizer (in semi-automated labeling) or can be
						specified manually</xsd:documentation>
				</xsd:annotation>
				<xsd:complexType>
					<xsd:simpleContent>
						<xsd:extension base="xsd:string">
							<xsd:attribute name="rank" type="xsd:positiveInteger" use="optional">
								<xsd:annotation>
									<xsd:documentation>specifies the rank of the annotation
									</xsd:documentation>
								</xsd:annotation>
							</xsd:attribute>
							<xsd:attribute name="score" type="xsd:float" use="optional">
								<xsd:annotation>
									<xsd:documentation>Refers to machine annotation. A measure of
										the confidence of the annotator on the
									annotation.</xsd:documentation>
								</xsd:annotation>
							</xsd:attribute>
						</xsd:extension>
					</xsd:simpleContent>
				</xsd:complexType>
			</xsd:element>
		</xsd:sequence>
		<xsd:attribute name="id" type="xsd:ID" use="required">
			<xsd:annotation>
				<xsd:documentation>Unique ID for label</xsd:documentation>
			</xsd:annotation>
		</xsd:attribute>
		<xsd:attribute name="labelSrcRef" type="xsd:anyURI" use="required">
			<xsd:annotation>
				<xsd:documentation>Reference to label source defined previously</xsd:documentation>
			</xsd:annotation>
		</xsd:attribute>
		<xsd:attribute name="labelType" use="required">
			<xsd:annotation>
				<xsd:documentation>Category of label, e.g. segm, truth, quality, stype. Must be one
					of the categories of labels generated by this label source.</xsd:documentation>
			</xsd:annotation>
			<xsd:simpleType>
				<xsd:restriction base="xsd:string"/>
			</xsd:simpleType>
		</xsd:attribute>
		<xsd:attribute name="timestamp" type="xsd:dateTime" use="optional">
			<xsd:annotation>
				<xsd:documentation>Timestamp of annotation event. Useful for generating history of
					annotation. The format is UTC</xsd:documentation>
			</xsd:annotation>
		</xsd:attribute>
	</xsd:complexType>
	<xsd:complexType name="hwTracesType">
		<xsd:sequence>
			<!--	<xsd:element name="traceref" type="xsd:string" maxOccurs="unbounded">
				<xsd:annotation>
					<xsd:documentation>Reference to a trace (or list of traces, or part of a trace) in an inkML document - see InkML spec</xsd:documentation>
				</xsd:annotation>
			</xsd:element> -->
			<xsd:element name="traceView" type="inkml:traceViewType" maxOccurs="unbounded"/>
		</xsd:sequence>
	</xsd:complexType>
	<xsd:complexType name="uiInfoType">
		<xsd:annotation>
			<xsd:documentation>The uiInfo element is used to capture the User Interface information
				of the data collection software. The xOrigin and yOrigin</xsd:documentation>
		</xsd:annotation>
		<xsd:sequence>
			<xsd:element name="hLines" type="xsd:string" minOccurs="0">
				<xsd:annotation>
					<xsd:documentation>Positions of horizontal guidelines, such as a baseline,
						topline etc (each position separated by a comma)</xsd:documentation>
				</xsd:annotation>
			</xsd:element>
			<xsd:element name="vLines" type="xsd:string" minOccurs="0">
				<xsd:annotation>
					<xsd:documentation>Position of vertical guidelines such as box boundaries, comb
						lines ( positions separated by commas)</xsd:documentation>
				</xsd:annotation>
			</xsd:element>
		</xsd:sequence>
		<xsd:attribute name="xOrigin" type="xsd:integer" use="optional">
			<xsd:annotation>
				<xsd:documentation>X-coordinate of top-left corner of the writing field, in ink
					coordinate system</xsd:documentation>
			</xsd:annotation>
		</xsd:attribute>
		<xsd:attribute name="yOrigin" type="xsd:integer" use="optional">
			<xsd:annotation>
				<xsd:documentation>Y-coordinate of top-left corner of the writing field, in ink
					coordinate system.</xsd:documentation>
			</xsd:annotation>
		</xsd:attribute>
		<xsd:attribute name="xDim" type="xsd:decimal" use="optional">
			<xsd:annotation>
				<xsd:documentation>Width of field (using the resolution of the input device, not
					that of the display)</xsd:documentation>
			</xsd:annotation>
		</xsd:attribute>
		<xsd:attribute name="yDim" type="xsd:decimal" use="optional">
			<xsd:annotation>
				<xsd:documentation>Height of field (using the resolution of the input device, not
					that of the display)</xsd:documentation>
			</xsd:annotation>
		</xsd:attribute>
		<xsd:attribute name="topBorder" type="xsd:boolean" use="optional"/>
		<xsd:attribute name="bottomBorder" type="xsd:boolean" use="optional"/>
		<xsd:attribute name="rightBorder" type="xsd:boolean" use="optional"/>
		<xsd:attribute name="leftBorder" type="xsd:boolean" use="optional"/>
	</xsd:complexType>
	<xsd:complexType name="imgInfoType">
		<xsd:sequence>
			<xsd:element name="roi" type="roiType" minOccurs="0" maxOccurs="unbounded">
				<xsd:annotation>
					<xsd:documentation>Defines a region of interest (roi) that contains the
						corresponding ink traces.[OPEN: Do we need attributes like originX, originY, orientationX, orientationY ? This may be required for processors to map ink trajectories on image regions.]</xsd:documentation>
				</xsd:annotation>
			</xsd:element>
			<xsd:element name="imgPrepro" type="imgPreproType" minOccurs="0">
				<xsd:annotation>
					<xsd:documentation>Defines a sequence of operations performed on the image
						before it was displayed to the user. Images may be cropped, rotated, or
						scaled.</xsd:documentation>
				</xsd:annotation>
			</xsd:element>
		</xsd:sequence>
		<xsd:attribute name="id" type="xsd:ID" use="required">
			<xsd:annotation>
				<xsd:documentation>An identifier for the image information contained in this
					element.</xsd:documentation>
			</xsd:annotation>
		</xsd:attribute>
		<xsd:attribute name="imgSrc" type="xsd:anyURI" use="required">
			<xsd:annotation>
				<xsd:documentation>A URI to the image source data.</xsd:documentation>
			</xsd:annotation>
		</xsd:attribute>
		<xsd:attribute name="labelSrcRef" type="xsd:anyURI" use="required">
			<xsd:annotation>
				<xsd:documentation>A reference to the label source, i.e., the program or person who
					makes the link between online trajectories and roi
				information.</xsd:documentation>
			</xsd:annotation>
		</xsd:attribute>
	</xsd:complexType>
	<xsd:complexType name="roiType">
		<xsd:attribute name="id" type="xsd:ID" use="required">
			<xsd:annotation>
				<xsd:documentation>An identifier for the image information contained in this
					element.</xsd:documentation>
			</xsd:annotation>
		</xsd:attribute>
		<xsd:attribute name="points" type="polygonType" use="required">
			<xsd:annotation>
				<xsd:documentation>The points defining the roi-polygon.</xsd:documentation>
			</xsd:annotation>
		</xsd:attribute>
	</xsd:complexType>
	<xsd:complexType name="imgPreproType">
		<xsd:choice maxOccurs="unbounded" minOccurs="0">
			<xsd:element name="crop">
				<xsd:complexType>
					<xsd:attribute name="boundingBox" type="polygonType" use="required">
						<xsd:annotation>
							<xsd:documentation>The bounding box of the crop process in image
								coordinates.</xsd:documentation>
						</xsd:annotation>
					</xsd:attribute>
				</xsd:complexType>
			</xsd:element>
			<xsd:element name="scale">
				<xsd:complexType>
					<xsd:attribute name="xFactor" type="xsd:float" use="optional" default="1">
						<xsd:annotation>
							<xsd:documentation>The scaling factor in the x coordinates of the image.
								If this attribute is not present, a default value of 1 will be
								assumed.</xsd:documentation>
						</xsd:annotation>
					</xsd:attribute>
					<xsd:attribute name="yFactor" type="xsd:float" use="optional" default="1">
						<xsd:annotation>
							<xsd:documentation>The scaling factor in the y coordinates of the image.
								If this attribute is not present, a default value of 1 will be
								assumed.</xsd:documentation>
						</xsd:annotation>
					</xsd:attribute>
				</xsd:complexType>
			</xsd:element>
			<xsd:element name="rotate">
				<xsd:complexType>
					<xsd:attribute name="angle" type="xsd:float" use="required">
						<xsd:annotation>
							<xsd:documentation>The rotation angle (anti-clockwise) in
							radians.</xsd:documentation>
						</xsd:annotation>
					</xsd:attribute>
					<xsd:attribute name="pivot" type="pointType" use="optional" default="0 0">
						<xsd:annotation>
							<xsd:documentation>The pivot (rotation point) in image coordinates, If
								this attribute is not present a pivot at (0,0) is
							assumed</xsd:documentation>
						</xsd:annotation>
					</xsd:attribute>
				</xsd:complexType>
			</xsd:element>
		</xsd:choice>
		<xsd:attribute name="id" type="xsd:ID" use="required">
			<xsd:annotation>
				<xsd:documentation>An identifier for the image preprocessing sequence contained in
					this element.</xsd:documentation>
			</xsd:annotation>
		</xsd:attribute>
	</xsd:complexType>
	<xsd:simpleType name="pointType">
		<xsd:annotation>
			<xsd:documentation> A two dimensional coordinate. Examples: "0 0", "-12.32 23.11".
			</xsd:documentation>
		</xsd:annotation>
		<xsd:restriction base="xsd:string">
			<xsd:pattern value="(\+|-)?([0-9]+(.[0-9]+)?)"/>
		</xsd:restriction>
	</xsd:simpleType>
	<xsd:simpleType name="polygonType">
		<xsd:annotation>
			<xsd:documentation> Defines a list of coordinates defining a polygon. Examples "0 0 5.2
				8.2 9.3 3.5 5.8 -2.4". </xsd:documentation>
		</xsd:annotation>
		<xsd:list itemType="pointType"/>
	</xsd:simpleType>
	<xsd:complexType name="annotationLevelType">
		<xsd:sequence>
			<xsd:element name="labelTypes">
				<xsd:annotation>
					<xsd:documentation>List of label types (e.g. segm, truth, style, quality,
						script, etc.) produced by label source</xsd:documentation>
				</xsd:annotation>
				<xsd:complexType>
					<xsd:complexContent>
						<xsd:extension base="labelTypesType"/>
					</xsd:complexContent>
				</xsd:complexType>
			</xsd:element>
		</xsd:sequence>
		<xsd:attribute name="name" type="xsd:string" use="required"/>
		<xsd:attribute name="desc" type="xsd:string" use="optional"/>
	</xsd:complexType>
</xsd:schema>

