<?xml version="1.0" encoding="UTF-8"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2000/10/XMLSchema"
  xmlns:lib="http://my.library/rdf/syntax#"
  xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
	targetNamespace="http://my.library/rdf/syntax#"
	elementFormDefault="qualified"
	atributeFormDefault="unqualified"
>

<xsd:complexType name="rdfResource" content="empty">
	<xsd:attribute ref="rdf:resource"/>
</xsd:complexType>

<xsd:complexType name="authorType" content="mixed">
	<xsd:sequence>
		<xsd:element name="name" type="xsd:string"/>
		<xsd:element name="nickName" type="xsd:string"/>
		<xsd:element name="born" type="xsd:string"/>
		<xsd:element name="dead" type="xsd:string"/>
	</xsd:sequence>
	<xsd:attribute ref="rdf:about"/>
</xsd:complexType>

<xsd:complexType name="bookType" content="elementOnly">
	<xsd:sequence>
		<xsd:element name="isbn" type="xsd:int"/>
		<xsd:element name="title" type="xsd:string"/>
		<xsd:element name="author" type="lib:rdfResource" minOccurs="1" maxOccurs="unbounded"/>
		<xsd:element name="character" type="lib:rdfResource" minOccurs="0" maxOccurs="unbounded"/>
	</xsd:sequence>
	<xsd:attribute ref="rdf:about"/>
</xsd:complexType>

<xsd:complexType name="characterType" content="mixed">
	<xsd:sequence>
		<xsd:element name="name" type="xsd:string"/>
		<xsd:element name="since" type="xsd:string"/>
		<xsd:element name="qualification" type="xsd:string"/>
	</xsd:sequence>
	<xsd:attribute ref="rdf:about"/>
</xsd:complexType>

<xsd:element name="book" type="lib:bookType"/>
<xsd:element name="character" type="lib:characterType"/>
<xsd:element name="author" type="lib:authorType"/>

</xsd:schema>
