<?xml version="1.0" encoding="Shift_JIS" ?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
	<xsd:element name="books">
		<xsd:complexType>
			<xsd:sequence>
				<xsd:element name="book" type="book_type"
					minOccurs="0" maxOccurs="unbounded" />
			</xsd:sequence>
			<xsd:attribute name="name" type="xsd:string" use="required" />
		</xsd:complexType>
	</xsd:element>
	<xsd:simpleType name="nullable">
		<xsd:restriction base="xsd:string">
			<xsd:enumeration value="" />
		</xsd:restriction>
	</xsd:simpleType>
	<xsd:simpleType name="price_int">
		<xsd:restriction base="xsd:positiveInteger">
			<xsd:maxInclusive value="10000" />
			<xsd:minInclusive value="1000" />
		</xsd:restriction>
	</xsd:simpleType>
	<xsd:complexType name="book_type">
		<xsd:sequence>
			<xsd:element name="title" type="xsd:string" />
			<xsd:element name="author" type="xsd:string" />
			<xsd:element name="published" type="xsd:string" />
			<xsd:element name="price">
				<xsd:simpleType>
					<xsd:union>
						<xsd:simpleType>
							<xsd:restriction base="nullable" />
						</xsd:simpleType>
						<xsd:simpleType>
							<xsd:restriction base="price_int" />
						</xsd:simpleType>
					</xsd:union>
				</xsd:simpleType>
			</xsd:element>
			<xsd:element name="publishDate" type="xsd:date" />
			<xsd:element name="category" type="xsd:string" />
			<xsd:element name="keywords" type="xsd:string" />
		</xsd:sequence>
		<xsd:attribute name="isbn" type="xsd:string" use="required" />
	</xsd:complexType>
</xsd:schema>
