<?xml version="1.0" encoding="UTF-8"?>
<!-- vim: set ts=1 : -->
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" attributeFormDefault="unqualified">
	<xs:element name="FictionBook">
		<xs:complexType>
			<xs:sequence>
				<xs:element name="description">
					<xs:complexType>
						<xs:sequence>
							<xs:element name="title-info">
								<xs:complexType>
									<xs:sequence>
										<xs:element name="genre" type="xs:string"/>
										<xs:element name="author" type="authorType" maxOccurs="unbounded"/>
										<xs:element name="book-title" type="xs:string"/>
										<xs:element name="annotation" type="annotationType" minOccurs="0"/>
										<xs:element name="keywords" type="xs:string" minOccurs="0"/>
										<xs:element name="date" type="dateType" minOccurs="0"/>
										<xs:element name="coverpage" minOccurs="0">
											<xs:complexType>
												<xs:sequence>
													<xs:element name="image" type="imageType" maxOccurs="unbounded"/>
												</xs:sequence>
											</xs:complexType>
										</xs:element>
										<xs:element name="src-lang" type="xs:string" minOccurs="0"/>
										<xs:element name="translators" minOccurs="0">
											<xs:complexType>
												<xs:sequence>
													<xs:element name="author" type="authorType" maxOccurs="unbounded"/>
												</xs:sequence>
											</xs:complexType>
										</xs:element>
									</xs:sequence>
								</xs:complexType>
							</xs:element>
							<xs:element name="document-info" minOccurs="0">
								<xs:complexType>
									<xs:sequence>
										<xs:element name="author" type="authorType" maxOccurs="unbounded"/>
										<xs:element name="program-used" type="xs:string"/>
										<xs:element name="date" type="dateType"/>
										<xs:element name="src-url" type="xs:string"/>
										<xs:element name="src-ocr" type="xs:string" minOccurs="0"/>
									</xs:sequence>
								</xs:complexType>
							</xs:element>
							<xs:element name="publish-info" minOccurs="0">
								<xs:complexType>
									<xs:sequence>
										<xs:element name="book-name" type="xs:string"/>
										<xs:element name="publisher" type="xs:string"/>
										<xs:element name="city" type="xs:string"/>
										<xs:element name="year" type="xs:string"/>
									</xs:sequence>
								</xs:complexType>
							</xs:element>
							<xs:element name="custom-info" minOccurs="0" maxOccurs="unbounded">
								<xs:complexType>
									<xs:simpleContent>
										<xs:extension base="xs:string">
											<xs:attribute name="info-type" type="xs:string" use="required"/>
										</xs:extension>
									</xs:simpleContent>
								</xs:complexType>
							</xs:element>
						</xs:sequence>
					</xs:complexType>
				</xs:element>
				<xs:element name="body">
					<xs:complexType>
						<xs:sequence>
							<xs:element name="title" type="titleType" minOccurs="0"/>
							<xs:element name="epigraph" type="epigraphType" minOccurs="0"/>
							<xs:element name="section" type="sectionType" maxOccurs="unbounded"/>
						</xs:sequence>
					</xs:complexType>
				</xs:element>
				<xs:element name="binary" minOccurs="0" maxOccurs="unbounded">
					<xs:complexType>
						<xs:simpleContent>
							<xs:extension base="xs:base64Binary">
								<xs:attribute name="name" type="xs:string" use="required"/>
							</xs:extension>
						</xs:simpleContent>
					</xs:complexType>
				</xs:element>
			</xs:sequence>
		</xs:complexType>
	</xs:element>
	<xs:complexType name="authorType">
		<xs:sequence>
			<xs:element name="first-name" type="xs:string"/>
			<xs:element name="middle-name" type="xs:string" minOccurs="0"/>
			<xs:element name="last-name" type="xs:string"/>
		</xs:sequence>
	</xs:complexType>
	<xs:complexType name="dateType">
		<xs:simpleContent>
			<xs:extension base="xs:string">
				<xs:attribute name="value" type="xs:date" use="optional"/>
			</xs:extension>
		</xs:simpleContent>
	</xs:complexType>
	<xs:complexType name="titleType">
		<xs:sequence>
			<xs:element name="p" type="pType"/>
			<xs:choice minOccurs="0" maxOccurs="unbounded">
				<xs:element name="p" type="pType"/>
				<xs:element name="empty-line"/>
			</xs:choice>
		</xs:sequence>
	</xs:complexType>
	<xs:complexType name="imageType">
		<xs:attribute name="name" type="xs:string" use="required"/>
	</xs:complexType>
	<xs:complexType name="pType" mixed="true">
		<xs:choice minOccurs="0" maxOccurs="unbounded">
			<xs:element name="strong">
				<xs:complexType mixed="1">
					<xs:sequence>
						<xs:element name="emphasis" type="xs:string" minOccurs="0" maxOccurs="unbounded"/>
					</xs:sequence>
				</xs:complexType>
			</xs:element>
			<xs:element name="style">
				<xs:complexType>
					<xs:simpleContent>
						<xs:extension base="xs:string">
							<xs:attribute name="name" type="xs:string" use="required"/>
						</xs:extension>
					</xs:simpleContent>
				</xs:complexType>
			</xs:element>
			<xs:element name="emphasis">
				<xs:complexType mixed="1">
					<xs:sequence>
						<xs:element name="strong" type="xs:string" minOccurs="0" maxOccurs="unbounded"/>
					</xs:sequence>
				</xs:complexType>
			</xs:element>
			<xs:element name="note" type="noteType"/>
		</xs:choice>
	</xs:complexType>
	<xs:complexType name="citeType">
		<xs:sequence>
			<xs:choice>
				<xs:element name="p" type="pType"/>
				<xs:element name="poem" type="poemType"/>
			</xs:choice>
			<xs:choice minOccurs="0" maxOccurs="unbounded">
				<xs:element name="p" type="pType"/>
				<xs:element name="poem" type="poemType"/>
				<xs:element name="empty-line"/>
			</xs:choice>
			<xs:element name="text-author" type="xs:string" minOccurs="0" maxOccurs="unbounded"/>
		</xs:sequence>
	</xs:complexType>
	<xs:complexType name="poemType">
		<xs:sequence>
			<xs:element name="title" type="titleType" minOccurs="0"/>
			<xs:element name="epigraph" type="epigraphType" minOccurs="0"/>
			<xs:choice maxOccurs="unbounded">
				<xs:element name="stanza">
					<xs:complexType>
						<xs:sequence>
							<xs:element name="v" type="pType" maxOccurs="unbounded"/>
						</xs:sequence>
					</xs:complexType>
				</xs:element>
				<xs:element name="v" type="pType"/>
			</xs:choice>
			<xs:element name="date" type="dateType" minOccurs="0"/>
		</xs:sequence>
		<xs:attribute name="title" type="xs:string" use="optional"/>
	</xs:complexType>
	<xs:complexType name="epigraphType">
		<xs:sequence>
			<xs:choice>
				<xs:element name="p" type="pType"/>
				<xs:element name="poem" type="poemType"/>
				<xs:element name="cite" type="citeType"/>
			</xs:choice>
			<xs:choice minOccurs="0" maxOccurs="unbounded">
				<xs:element name="p" type="pType"/>
				<xs:element name="poem" type="poemType"/>
				<xs:element name="cite" type="citeType"/>
				<xs:element name="empty-line"/>
			</xs:choice>
			<xs:element name="text-author" type="xs:string" minOccurs="0"/>
		</xs:sequence>
	</xs:complexType>
	<xs:complexType name="annotationType">
		<xs:sequence>
			<xs:choice>
				<xs:element name="p" type="pType"/>
				<xs:element name="poem" type="poemType"/>
				<xs:element name="cite" type="citeType"/>
			</xs:choice>
			<xs:choice minOccurs="0" maxOccurs="unbounded">
				<xs:element name="p" type="pType"/>
				<xs:element name="poem" type="poemType"/>
				<xs:element name="cite" type="citeType"/>
				<xs:element name="empty-line"/>
			</xs:choice>
		</xs:sequence>
	</xs:complexType>
	<xs:complexType name="sectionType">
		<xs:sequence minOccurs="0">
			<xs:element name="title" type="titleType" minOccurs="0"/>
			<xs:element name="image" type="imageType" minOccurs="0"/>
			<xs:element name="epigraph" type="epigraphType" minOccurs="0" maxOccurs="unbounded"/>
			<xs:element name="annotation" type="annotationType" minOccurs="0"/>
			<xs:choice>
				<xs:element name="section" type="sectionType" maxOccurs="unbounded"/>
				<xs:sequence>
					<xs:choice>
						<xs:element name="p" type="pType"/>
						<xs:element name="poem" type="poemType"/>
						<xs:element name="subtitle" type="xs:string"/>
						<xs:element name="cite" type="citeType"/>
					</xs:choice>
					<xs:choice minOccurs="0" maxOccurs="unbounded">
						<xs:element name="p" type="pType"/>
						<xs:element name="image" type="imageType"/>
						<xs:element name="poem" type="poemType"/>
						<xs:element name="subtitle" type="xs:string"/>
						<xs:element name="cite" type="citeType"/>
						<xs:element name="empty-line"/>
					</xs:choice>
				</xs:sequence>
			</xs:choice>
		</xs:sequence>
		<xs:attribute name="title" type="xs:string" use="required"/>
	</xs:complexType>
	<xs:complexType name="noteType">
		<xs:sequence>
			<xs:choice>
				<xs:element name="p" type="pType"/>
				<xs:element name="poem" type="poemType"/>
				<xs:element name="cite" type="citeType"/>
			</xs:choice>
			<xs:choice minOccurs="0" maxOccurs="unbounded">
				<xs:element name="p" type="pType"/>
				<xs:element name="poem" type="poemType"/>
				<xs:element name="cite" type="citeType"/>
				<xs:element name="empty-line"/>
			</xs:choice>
		</xs:sequence>
		<xs:attribute name="name" type="xs:string" use="required"/>
	</xs:complexType>
</xs:schema>
