<?xml version="1.0" encoding="utf-8"?>
<!-- openEHR Release 1.0.2 Resource XML schema -->
<!-- Authored by Ocean Informatics 2008.12.22  -->
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
		   xmlns="http://schemas.openehr.org/v2" targetNamespace="http://schemas.openehr.org/v2" elementFormDefault="qualified"
		   id="Resources.xsd" version="v1.4">
	<!-- dependencies -->
	<xs:include schemaLocation="../../RM/Release-1.0.2/BaseTypes.xsd"/>
	<xs:include schemaLocation="../../RM/Release-1.0.2/DataTypes.xsd"/>
	<xs:include schemaLocation="../../RM/Release-1.0.2/Common.xsd"/>

	<xs:complexType name="AUTHORED_RESOURCE" abstract="true">
		<xs:sequence>
			<xs:element name="original_language" type="CODE_PHRASE"/>
			<xs:element name="is_controlled" type="xs:boolean" minOccurs="0"/>
			<xs:element name="description" type="RESOURCE_DESCRIPTION" minOccurs="0"/>
			<xs:element name="translations" type="TRANSLATION_DETAILS" minOccurs="0"
				maxOccurs="unbounded"/>
			<xs:element name="revision_history" type="REVISION_HISTORY" minOccurs="0"/>
		</xs:sequence>
	</xs:complexType>
	<xs:complexType name="TRANSLATION_DETAILS">
		<xs:sequence>
			<xs:element name="language" type="CODE_PHRASE"/>
			<xs:element name="author" type="StringDictionaryItem" minOccurs="1"
				maxOccurs="unbounded"/>
			<xs:element name="accreditation" type="xs:string" minOccurs="0"/>
			<xs:element name="other_details" type="StringDictionaryItem" minOccurs="0"
				maxOccurs="unbounded"/>
		</xs:sequence>
	</xs:complexType>
	<xs:complexType name="RESOURCE_DESCRIPTION">
		<xs:sequence>
			<xs:element name="original_author" type="StringDictionaryItem" maxOccurs="unbounded"/>
			<xs:element name="other_contributors" type="xs:string" minOccurs="0"
				maxOccurs="unbounded"/>
			<xs:element name="lifecycle_state" type="xs:string"/>
			<xs:element name="resource_package_uri" type="xs:string" minOccurs="0"/>
			<xs:element name="other_details" type="StringDictionaryItem" minOccurs="0"
				maxOccurs="unbounded"/>
			<xs:element name="details" type="RESOURCE_DESCRIPTION_ITEM"
				maxOccurs="unbounded"/>
			<xs:element name="parent_resource" type="AUTHORED_RESOURCE" minOccurs="0"/>
		</xs:sequence>
	</xs:complexType>
	<xs:complexType name="RESOURCE_DESCRIPTION_ITEM">
		<xs:sequence>
			<xs:element name="language" type="CODE_PHRASE"/>
			<xs:element name="purpose" type="xs:string"/>
			<xs:element name="keywords" type="xs:string" minOccurs="0" maxOccurs="unbounded"/>
			<xs:element name="use" type="xs:string" minOccurs="0"/>
			<xs:element name="misuse" type="xs:string" minOccurs="0"/>
			<xs:element name="copyright" type="xs:string" minOccurs="0"/>
			<xs:element name="original_resource_uri" type="StringDictionaryItem" minOccurs="0"
				maxOccurs="unbounded"/>
			<xs:element name="other_details" type="StringDictionaryItem" minOccurs="0"
				maxOccurs="unbounded"/>
		</xs:sequence>
	</xs:complexType>
	<xs:complexType name="StringDictionaryItem">
		<xs:simpleContent>
			<xs:extension base="xs:string">
				<xs:attribute name="id" type="xs:string" use="required"/>
			</xs:extension>
		</xs:simpleContent>
	</xs:complexType>
</xs:schema>
