1<?xml version="1.0" encoding="UTF-8"?>
2<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
3
4	<xs:element name="name" type="xs:string"/>
5	<xs:element name="qualification" type="xs:string"/>
6	<xs:element name="born" type="xs:date"/>
7	<xs:element name="dead" type="xs:date"/>
8	<xs:element name="isbn" type="xs:integer"/>
9
10	<xs:attribute name="id" type="xs:ID"/>
11	<xs:attribute name="available" type="xs:boolean"/>
12	<xs:attribute name="lang" type="xs:language"/>
13
14	<xs:element name="title">
15		<xs:complexType>
16			<xs:simpleContent>
17				<xs:extension base="xs:string">
18					<xs:attribute ref="lang"/>
19				</xs:extension>
20			</xs:simpleContent>
21		</xs:complexType>
22	</xs:element>
23
24	<xs:element name="library">
25		<xs:complexType>
26			<xs:sequence>
27				<xs:element ref="book" maxOccurs="unbounded"/>
28			</xs:sequence>
29		</xs:complexType>
30	</xs:element>
31
32	<xs:element name="author">
33		<xs:complexType>
34			<xs:sequence>
35				<xs:element ref="name"/>
36				<xs:element ref="born"/>
37				<xs:element ref="dead" minOccurs="0"/>
38			</xs:sequence>
39			<xs:attribute ref="id"/>
40		</xs:complexType>
41	</xs:element>
42
43	<xs:element name="book">
44		<xs:complexType>
45			<xs:sequence>
46				<xs:element ref="isbn"/>
47				<xs:element ref="title"/>
48				<xs:element ref="author" minOccurs="0" maxOccurs="unbounded"/>
49				<xs:element ref="character" minOccurs="0" maxOccurs="unbounded"/>
50			</xs:sequence>
51			<xs:attribute ref="id"/>
52			<xs:attribute ref="available"/>
53		</xs:complexType>
54	</xs:element>
55
56	<xs:element name="character">
57		<xs:complexType>
58			<xs:sequence>
59				<xs:element ref="name"/>
60				<xs:element ref="born"/>
61				<xs:element ref="qualification"/>
62			</xs:sequence>
63			<xs:attribute ref="id"/>
64		</xs:complexType>
65	</xs:element>
66
67</xs:schema>
68