/Users/lyon/j4p/src/xml/musicCatalog/MusicCatalog.xsd

1    <?xml version="1.0" encoding="UTF-8"?> 
2     
3    <xsd:schema xmlns="http://tfr.com/myMusicCatalogSchema" 
4            xmlns:xsd="http://www.w3.org/2001/XMLSchema" 
5            targetNamespace="http://tfr.com/myMusicCatalogSchema"> 
6     
7        <xsd:annotation> 
8            <xsd:documentation> 
9                XML Schema defining the structure of my music catalog 
10           </xsd:documentation> 
11       </xsd:annotation> 
12    
13       <xsd:simpleType name="YearType"> 
14           <xsd:restriction base="xsd:integer"> 
15               <xsd:totalDigits value="4"/> 
16               <xsd:maxInclusive value="2001"/> 
17           </xsd:restriction> 
18       </xsd:simpleType> 
19        
20       <xsd:complexType name="ItemType"> 
21           <xsd:sequence> 
22               <xsd:element ref="Artist" minOccurs="1" maxOccurs="1"/> 
23               <xsd:element ref="Title" minOccurs="1" maxOccurs="1"/> 
24               <xsd:element ref="Year" minOccurs="1" maxOccurs="1"/> 
25               <xsd:element ref="Member" minOccurs="0" maxOccurs="unbounded"/> 
26           </xsd:sequence> 
27           <xsd:attribute name="media" type="xsd:string"/> 
28       </xsd:complexType>  
29    
30       <xsd:complexType name="MusicCatalogType"> 
31           <xsd:sequence> 
32               <xsd:element ref="Item" minOccurs="1" maxOccurs="unbounded"/> 
33           </xsd:sequence> 
34       </xsd:complexType>  
35    
36       <xsd:element name="MusicCatalog" type="MusicCatalogType"/> 
37       <xsd:element name="Item" type="ItemType" />  
38       <xsd:element name="Artist" type="xsd:string" />  
39       <xsd:element name="Title" type="xsd:string" />  
40       <xsd:element name="Year" type="YearType" />  
41       <xsd:element name="Member" type="xsd:string" />  
42    
43    
44   </xsd:schema> 
45