<?xml version="1.0" encoding="UTF-8"?>
<!-- edited with XMLSpy v2007 sp1 (http://www.altova.com) by pagano (CNR) -->
<!--W3C Schema generated by XMLSpy v2007 sp1 (http://www.altova.com)-->
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">

	<xs:element name="RESOURCE_PROFILE">
		<xs:complexType>
			<xs:sequence>
				<xs:element name="HEADER" type="HEADERType" />
				<xs:element name="BODY" type="BODYType" />
			</xs:sequence>
		</xs:complexType>
	</xs:element>

	<xs:complexType name="HEADERType">
		<xs:all>
			<xs:element name="RESOURCE_IDENTIFIER" type="RESOURCE_IDENTIFIERType" />
			<xs:element name="RESOURCE_TYPE" type="RESOURCE_TYPEType" />
			<xs:element name="RESOURCE_KIND" type="RESOURCE_KINDType" />
			<xs:element name="RESOURCE_URI" type="RESOURCE_URIType" />
			<xs:element name="DATE_OF_CREATION" type="DATE_OF_CREATIONType" />
		</xs:all>
	</xs:complexType>

	<xs:complexType name="RESOURCE_IDENTIFIERType">
		<xs:attribute name="value" type="xs:string" use="required" />
	</xs:complexType>

	<xs:complexType name="RESOURCE_TYPEType">
		<xs:attribute name="value" use="required">
			<xs:simpleType>
				<xs:restriction base="xs:string">
					<xs:enumeration value="UserDSResourceType" />
				</xs:restriction>
			</xs:simpleType>
		</xs:attribute>
	</xs:complexType>

	<xs:complexType name="RESOURCE_KINDType">
		<xs:attribute name="value" use="required">
			<xs:simpleType>
				<xs:restriction base="xs:string">
					<xs:enumeration value="UserDSResources" />
					<xs:enumeration value="PendingDSResources"/>
				</xs:restriction>
			</xs:simpleType>
		</xs:attribute>
	</xs:complexType>

	<xs:complexType name="RESOURCE_URIType">
		<xs:attribute name="value" type="xs:string" use="required" />
	</xs:complexType>

	<xs:complexType name="DATE_OF_CREATIONType">
		<xs:attribute name="value" type="xs:string" use="required" />
	</xs:complexType>

	<xs:complexType name="BODYType">
		<xs:sequence>
			<xs:element name="CONFIGURATION" type="CONFIGURATIONType" />
			<xs:element name="STATUS" type="xs:string" />
			<xs:element name="SECURITY_PARAMETERS"
				type="SECURITY_PARAMETERSType" />
		</xs:sequence>
	</xs:complexType>

	<xs:complexType name="CONFIGURATIONType">
		<xs:sequence>
			<xs:element name="PERSONAL_INFO" type="PERSONAL_INFOType" />
			<xs:element name="COMMUNITIES" type="COMMUNITIESType" />
			<xs:element name="LAYOUT" type="LAYOUTType" />
			<xs:element name="SAVED_QUERIES" type="SAVED_QUERYType" minOccurs="0" maxOccurs="unbounded" />
			<xs:element name="RECOMMENDATION" type="RECOMMENDATIONType" />
		</xs:sequence>
	</xs:complexType>

	<xs:complexType name="SECURITY_PARAMETERSType">
		<xs:all>
			<xs:element name="SECURITY_PARAMETER" type="xs:string" />
		</xs:all>
	</xs:complexType>

	<xs:complexType name="SAVED_QUERYType">
       <xs:sequence>
           <xs:element name="query" type="QUERYType" />
           <xs:element name="hashValue" type="xs:string" minOccurs="0"
               maxOccurs="unbounded" />
           <xs:element name="alertOnChange" type="xs:boolean" />
       </xs:sequence>
   </xs:complexType>

   <xs:complexType name="QUERYType">
	   <xs:sequence>
			<xs:element name="CQL">
				<xs:complexType>
					<xs:attribute name="value" type="xs:string" />
				</xs:complexType>
			</xs:element>
			<xs:element name="COMMUNITYID" minOccurs="0" maxOccurs="unbounded">
				<xs:complexType>
					<xs:attribute name="communityId" type="xs:string"  />
				</xs:complexType>
			</xs:element>
			<xs:element name="COLLECTIONID" minOccurs="0" maxOccurs="unbounded">
				<xs:complexType>
					<xs:attribute name="collectionId" type="xs:string"  />
				</xs:complexType>
			</xs:element>
		</xs:sequence>
   </xs:complexType>

	<xs:complexType name="PERSONAL_INFOType">
		<xs:sequence>
			<xs:element name="FIRST_NAME">
				<xs:complexType>
					<xs:attribute name="value" type="xs:string" />
				</xs:complexType>
			</xs:element>
			<xs:element name="LAST_NAME">
				<xs:complexType>
					<xs:attribute name="value" type="xs:string" />
				</xs:complexType>
			</xs:element>
			<xs:element name="INSTITUTION">
				<xs:complexType>
					<xs:attribute name="value" type="xs:string" />
				</xs:complexType>
			</xs:element>
			<xs:element name="EMAIL">
				<xs:complexType>
					<xs:attribute name="value" type="xs:string" />
				</xs:complexType>
			</xs:element>
			<xs:element name="ACTIVATION_ID">
				<xs:complexType>
					<xs:attribute name="value" type="xs:string" />
				</xs:complexType>
			</xs:element>
			<xs:element name="ACTIVE">
				<xs:complexType>
					<xs:attribute name="value" type="xs:boolean" />
				</xs:complexType>
			</xs:element>
			<xs:element name="SEARCH_TEMPLATE" type="QUERYType" />
		</xs:sequence>

	</xs:complexType>

	<xs:complexType name="COMMUNITY_REGISTRATIONType">
		<xs:attribute name="communityId" type="xs:string" />
		<xs:attribute name="alertOnChange" type="xs:boolean" />
		<xs:attribute name="insertInQueries" type="xs:boolean" />
	</xs:complexType>

	<xs:complexType name="COMMUNITIESType">
		<xs:sequence>
			<xs:element name="COMMUNITY_REGISTRATION" type="COMMUNITY_REGISTRATIONType" minOccurs="0" maxOccurs="unbounded" />
		</xs:sequence>
	</xs:complexType>

	<xs:simpleType name="LAYOUTType">
		<xs:restriction base="xs:string">
			<xs:enumeration value="FULL" />
			<xs:enumeration value="BRIEF" />
		</xs:restriction>
	</xs:simpleType>

	<xs:complexType name="RECOMMENDATIONType">
		<xs:sequence>
			<xs:element name="RECOMMENDATIONS" type="RECOMMENDATIONSType"/>
		</xs:sequence>
			<xs:attribute name="SEND_EMAIL" type="xs:boolean" />
			<xs:attribute name="PERIOD" type="xs:int" />
			<xs:attribute name="LAST_NOTIFICATION" type="xs:string" />
	</xs:complexType>
	
	<xs:complexType name="RECOMMENDATIONSType">
		<xs:sequence>
			<xs:element name="RECOMMENDATION_ID" type="xs:string" minOccurs="0" maxOccurs="unbounded"/>
		</xs:sequence>
	</xs:complexType>
</xs:schema>
