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