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