<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:dli="http://www.dli.eu"
		   elementFormDefault="qualified" targetNamespace="http://www.dli.eu">
	<xs:element name="dliObject" type="dli:dliEntity">
		<xs:annotation>
			<xs:documentation>
				The Data Literature Interlinking entity. It contains the following main entities
				(sub-entities): artifact/inscription, visual representation, documental manifestation, trismegistos card.
				Such entities share some common properties like resource identifier in D-Net aggregation system,
				provenance and original identifier information, Intellectual property right statement.
			</xs:documentation>
		</xs:annotation>
	</xs:element>

	<xs:complexType name="dliEntity">
		<xs:sequence>
			<xs:element maxOccurs="1" minOccurs="1" name="dnetResourceIdentifier" type="xs:string">
				<xs:annotation>
					<xs:documentation>
						Unique resource identifier internal to D-Net infrastructure.
						This property is obtained by concatenating the content CP Acronym and the
						MD5 of local record ID to the identifier. (CP_ACRONYM::MD5(LOCAL_IDENTIFIER))
					</xs:documentation>
				</xs:annotation>
			</xs:element>
			<xs:element maxOccurs="1" minOccurs="1" name="localIdentifier" type="dli:identifier">
				<xs:annotation>
					<xs:documentation>
						The local identifier of the record
					</xs:documentation>
				</xs:annotation>
			</xs:element>
			<xs:element name="title" type="xs:string" minOccurs="0" maxOccurs="unbounded"/>
			<xs:element name="date" type="xs:string"/>
			<xs:element name="objectType" maxOccurs="1" minOccurs="1" type="dli:objectType"/>

			<xs:element name="authors">
				<xs:complexType>
					<xs:sequence>
						<xs:element name="author" type="dli:authorType" maxOccurs="unbounded"/>
					</xs:sequence>
				</xs:complexType>
			</xs:element>

			<xs:element name="relations">
				<xs:complexType>
					<xs:sequence>
						<xs:element name="relation" type="dli:realtionType" maxOccurs="unbounded"/>
					</xs:sequence>
				</xs:complexType>
			</xs:element>

		</xs:sequence>
	</xs:complexType>

	<xs:simpleType name="objectType">
		<xs:restriction base="xs:string">
			<xs:enumeration value="publication"/>
			<xs:enumeration value="dataset"/>
		</xs:restriction>
	</xs:simpleType>


	<xs:complexType name="realtionType">
		<xs:sequence>
			<xs:element name="entitytype" type="dli:objectType"></xs:element>
			<xs:element name="pid" type="dli:identifier" minOccurs="1" maxOccurs="1"/>
			<xs:element name="resolvedURL" type="xs:string" maxOccurs="1"/>
			<xs:element name="typeOfRelation" maxOccurs="1">
				<xs:simpleType>
					<xs:restriction base="xs:string">
						<xs:enumeration value="relatedTo"/>
					</xs:restriction>
				</xs:simpleType>
			</xs:element>
		</xs:sequence>
	</xs:complexType>


	<xs:complexType name="authorType">
		<xs:sequence>
			<xs:element name="fullname" type="xs:string" minOccurs="1" maxOccurs="1"/>
			<xs:element name="localIdentifier" type="xs:string" maxOccurs="1"/>
			<xs:element name="typeOfIdentifier" type="xs:string" maxOccurs="1"/>
		</xs:sequence>

	</xs:complexType>


	<xs:complexType name="identifier">
		<xs:simpleContent>
			<xs:extension base="xs:string">
				<xs:attribute name="type" type="xs:string" use="required"/>
			</xs:extension>
		</xs:simpleContent>
	</xs:complexType>


</xs:schema>
