<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<!--W3C Schema generated by XMLSpy v2006 sp2 U (http://www.altova.com)-->
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" version="1.0">
	<xs:element name="Templates" type="TemplatesType">
		<xs:unique name="Template_id">
			<xs:selector xpath="Template"/>
			<xs:field xpath="@id"/>
		</xs:unique>
	</xs:element>
	<xs:complexType name="AnnotationType">
		<xs:sequence>
			<xs:any namespace="##any" processContents="skip" maxOccurs="unbounded"/>
		</xs:sequence>
	</xs:complexType>
	<xs:complexType name="DomainListType">
		<xs:sequence>
			<xs:element name="domain" type="DomainListDomainType" maxOccurs="unbounded"/>
		</xs:sequence>
	</xs:complexType>
	<xs:complexType name="StatusFlagType">
		<xs:sequence>
			<xs:element name="value" type="ValueType" maxOccurs="unbounded"/>
		</xs:sequence>
	</xs:complexType>
	<xs:complexType name="TemplateType">
		<xs:sequence>
			<xs:element name="ChangeHistory" type="AnnotationType" minOccurs="0" maxOccurs="unbounded"/>
			<xs:element name="comments">
				<xs:complexType mixed="true">
					<xs:sequence>
						<xs:any namespace="##any" processContents="lax" maxOccurs="unbounded"/>
					</xs:sequence>
				</xs:complexType>
			</xs:element>
			<xs:element name="parentModel" type="ParentModelType">
				<xs:unique name="domain_id">
					<xs:selector xpath="domain"/>
					<xs:field xpath="@id"/>
				</xs:unique>
			</xs:element>
			<xs:element name="id" maxOccurs="unbounded">
				<xs:simpleType>
					<xs:restriction base="xs:string">
						<xs:pattern value="[A-Z]{4}_[A-Z]{2}[0-9]{6}(UK|GB)[0-9]{2}"/>
					</xs:restriction>
				</xs:simpleType>
			</xs:element>
		</xs:sequence>
		<xs:attribute name="id" use="required">
			<xs:simpleType>
				<xs:restriction base="xs:string">
					<xs:pattern value="NPFIT-[0-9]{6}#[a-zA-Z]+"/>
				</xs:restriction>
			</xs:simpleType>
		</xs:attribute>
		<xs:attribute name="derivedFrom" use="optional">
			<xs:simpleType>
				<xs:restriction base="xs:string">
					<xs:pattern value="NPFIT-[9][0-9]{5}#[a-zA-Z]+"/>
				</xs:restriction>
			</xs:simpleType>
		</xs:attribute>
		<xs:attribute name="version" type="TemplateVersionList" use="required"/>
		<xs:attribute name="status" type="StatusList" use="required"/>
	</xs:complexType>
	<xs:complexType name="TemplatesType">
		<xs:sequence>
			<xs:element name="ChangeHistory" type="AnnotationType" maxOccurs="unbounded"/>
			<xs:element name="DomainList" type="DomainListType">
				<xs:unique name="DomainList_domain">
					<xs:selector xpath="domain"/>
					<xs:field xpath="@id"/>
				</xs:unique>
			</xs:element>
			<xs:element name="StatusFlag" type="StatusFlagType">
				<xs:unique name="value">
					<xs:selector xpath="value"/>
					<xs:field xpath="@id"/>
				</xs:unique>
			</xs:element>
			<xs:element name="Template" type="TemplateType" maxOccurs="unbounded">
				<xs:unique name="modelId">
					<xs:selector xpath="id"/>
					<xs:field xpath="."/>
				</xs:unique>
			</xs:element>
		</xs:sequence>
		<xs:attribute name="version" use="required">
			<xs:simpleType>
				<xs:restriction base="xs:decimal"/>
			</xs:simpleType>
		</xs:attribute>
		<xs:attribute name="title" use="required">
			<xs:simpleType>
				<xs:restriction base="xs:string"/>
			</xs:simpleType>
		</xs:attribute>
	</xs:complexType>
	<xs:complexType name="TemplateDomainType" mixed="true">
		<xs:sequence>
			<xs:element name="id" maxOccurs="unbounded">
				<xs:simpleType>
					<xs:restriction base="xs:string">
						<xs:pattern value="[A-Z]{4}_[A-Z]{2}[0-9]{6}(UK|GB)[0-9]{2}"/>
					</xs:restriction>
				</xs:simpleType>
			</xs:element>
		</xs:sequence>
		<xs:attribute name="id" type="DomainLIst" use="required"/>
	</xs:complexType>
	<xs:complexType name="DomainListDomainType" mixed="true">
		<xs:attribute name="id" type="DomainLIst" use="required"/>
	</xs:complexType>
	<xs:simpleType name="DomainLIst">
		<xs:restriction base="xs:string">
			<xs:enumeration value="DIS"/>
			<xs:enumeration value="EDT"/>
			<xs:enumeration value="HLP"/>
			<xs:enumeration value="NUL"/>
			<xs:enumeration value="OPS"/>
			<xs:enumeration value="SES"/>
			<xs:enumeration value="TEM"/>
			<xs:enumeration value="OOH"/>
			<xs:enumeration value="ADM"/>
			<xs:enumeration value="HSC"/>
			<xs:enumeration value="ABM"/>
			<xs:enumeration value="DIG"/>
			<xs:enumeration value="MHS"/>
			<xs:enumeration value="NHD"/>
			<xs:enumeration value="TEL"/>
			<xs:enumeration value="ABS"/>
			<xs:enumeration value="CHC"/>
			<xs:enumeration value="HDN"/>
			<xs:enumeration value="NCD"/>
			<xs:enumeration value="NHP"/>
			<xs:enumeration value="EOL"/>
			<xs:enumeration value="CSS"/>
			<xs:enumeration value="CPI"/>
		</xs:restriction>
	</xs:simpleType>
	<xs:simpleType name="StatusList">
		<xs:restriction base="xs:string">
			<xs:enumeration value="A"/>
			<xs:enumeration value="D"/>
			<xs:enumeration value="P"/>
		</xs:restriction>
	</xs:simpleType>
	<xs:simpleType name="TemplateVersionList">
		<xs:restriction base="xs:decimal"/>
	</xs:simpleType>
	<xs:complexType name="ParentModelType">
		<xs:sequence>
			<xs:element name="domain" type="TemplateDomainType" maxOccurs="unbounded">
				<xs:unique name="domainModelId">
					<xs:selector xpath="id"/>
					<xs:field xpath="."/>
				</xs:unique>
			</xs:element>
		</xs:sequence>
	</xs:complexType>
	<xs:complexType name="ValueType" mixed="true">
		<xs:attribute name="id" type="StatusList" use="required"/>
	</xs:complexType>
</xs:schema>
