<?xml version="1.0" encoding="UTF-8"?>

<xsd:schema xmlns="http://tfr.com/myMusicCatalogSchema"
		xmlns:xsd="http://www.w3.org/2001/XMLSchema"
		targetNamespace="http://tfr.com/myMusicCatalogSchema">

	<xsd:annotation>
		<xsd:documentation>
			XML Schema defining the structure of my music catalog
		</xsd:documentation>
	</xsd:annotation>

	<xsd:simpleType name="YearType">
		<xsd:restriction base="xsd:integer">
			<xsd:totalDigits value="4"/>
			<xsd:maxInclusive value="2001"/>
		</xsd:restriction>
	</xsd:simpleType>
	
	<xsd:complexType name="ItemType">
  		<xsd:sequence>
			<xsd:element ref="Artist" minOccurs="1" maxOccurs="1"/>
			<xsd:element ref="Title" minOccurs="1" maxOccurs="1"/>
			<xsd:element ref="Year" minOccurs="1" maxOccurs="1"/>
			<xsd:element ref="Member" minOccurs="0" maxOccurs="unbounded"/>
		</xsd:sequence>
		<xsd:attribute name="media" type="xsd:string"/>
	</xsd:complexType> 

	<xsd:complexType name="MusicCatalogType">
		<xsd:sequence>
			<xsd:element ref="Item" minOccurs="1" maxOccurs="unbounded"/>
		</xsd:sequence>
	</xsd:complexType> 

	<xsd:element name="MusicCatalog" type="MusicCatalogType"/>
	<xsd:element name="Item" type="ItemType" /> 
	<xsd:element name="Artist" type="xsd:string" /> 
	<xsd:element name="Title" type="xsd:string" /> 
	<xsd:element name="Year" type="YearType" /> 
	<xsd:element name="Member" type="xsd:string" /> 


</xsd:schema>
