<?xml version="1.0" encoding="UTF-8"?>
<!--W3C Schema generated by XMLSPY v5 rel. 4 U (http://www.xmlspy.com)-->
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
	<!--ST (Standalone Thesaurus) XML format. Ceri Binding, University of Glamorgan-->
	<!--term relationship-->
	<xs:complexType name="relationship">
		<xs:attribute name="idref" type="xs:string" use="required"/>
	</xs:complexType>
	<!--definition of term label-->
	<xs:element name="label" type="xs:string"/>
	<!--preferred terms element group-->
	<xs:group name="pt">
		<xs:sequence>
			<xs:element ref="label" minOccurs="1" maxOccurs="1"/>	
			<xs:choice minOccurs="1" maxOccurs="unbounded">
				<xs:element name="bt" type="relationship"/>
				<xs:element name="nt" type="relationship"/>				
			</xs:choice>
			<xs:choice minOccurs="0" maxOccurs="unbounded">
				<xs:element name="rt" type="relationship"/>
				<xs:element name="uf" type="relationship"/>
				<xs:element name="alt" type="relationship"/>
			</xs:choice>
			<xs:element name="sn" type="xs:string" minOccurs="0" maxOccurs="1"/>
			<xs:element name="hn" type="xs:string" minOccurs="0" maxOccurs="1"/>							
		</xs:sequence>
	</xs:group>
	<!--nonpreferred terms element group-->
	<xs:group name="npt">
		<xs:sequence>
			<xs:element ref="label" minOccurs="1" maxOccurs="1"/>
			<xs:element name="use" type="relationship" minOccurs="1" maxOccurs="unbounded"/>
		</xs:sequence>
	</xs:group>
	<!--term type is either preferred or nonpreferred-->
	<xs:complexType name="termtype">
		<xs:choice>
			<xs:group ref="pt"/>
			<xs:group ref="npt"/>
		</xs:choice>
		<!--either way, each term has unique ID (which may just be the term itself)-->
		<xs:attribute name="id" type="xs:string" use="required"/>		
	</xs:complexType>
	<!--main root element - 'terms' is an unbounded sequence of 'term'-->
	<xs:element name="terms">
		<xs:complexType>
			<xs:sequence>
				<xs:element name="term" type="termtype" maxOccurs="unbounded"/>
			</xs:sequence>
		</xs:complexType>
	</xs:element>
</xs:schema>

