<?xml version="1.0"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" attributeFormDefault="unqualified" version="1.1" xml:lang="en">
	<xsd:annotation>
		<xsd:documentation>UNISlim: UNIMARC XML Schema prepared by National Library of Russia and National Library of Florence based on MarcXchange (ISO 25577) - the general XML schema for MARC formatted records.		</xsd:documentation>
		<xsd:documentation>This schema allows XML markup of UNIMARC records as specified in the UNIMARC documentation (see http://www.ifla.org/VI/3/p1996-1/sec-uni.htm). This schema accommodates UNIMARC records and allows the embedded fields technique. Implementation of the embedded fields technique in the Schema follows UNIMARCSLIM Schema prepared by Giovanni Bergamin and Detlev Schumacher (http://www.bncf.firenze.sbn.it/unimarc/slim/documentation/unimarcslim.xsd)		</xsd:documentation>
	</xsd:annotation>
	<xsd:element name="collection" type="collectionType" nillable="true" id="collection.e">
		<xsd:annotation>
			<xsd:documentation>collection is a top level container element for 0 or many records</xsd:documentation>
		</xsd:annotation>
	</xsd:element>
	<xsd:element name="record" type="recordType" nillable="true" id="record.e">
		<xsd:annotation>
			<xsd:documentation>record is a top level container element for all of the field elements which compose the record</xsd:documentation>
		</xsd:annotation>
	</xsd:element>
	<xsd:complexType name="collectionType" id="collection.ct">
		<xsd:sequence minOccurs="0" maxOccurs="unbounded">
			<xsd:element ref="record"/>
		</xsd:sequence>
		<xsd:attribute name="id" type="idDataType" use="optional"/>
	</xsd:complexType>
	<xsd:complexType name="recordType" id="record.ct">
		<xsd:sequence minOccurs="0">
			<xsd:element name="leader" type="leaderFieldType"/>
			<xsd:element name="controlfield" type="controlFieldType" minOccurs="0" maxOccurs="unbounded"/>
			<xsd:element name="datafield" type="dataFieldType" minOccurs="0" maxOccurs="unbounded"/>
		</xsd:sequence>
		<xsd:attribute name="format" type="xsd:NMTOKEN" use="optional"/>
		<xsd:attribute name="type" type="xsd:NMTOKEN" use="optional"/>
		<xsd:attribute name="id" type="idDataType" use="optional"/>
	</xsd:complexType>
	<xsd:complexType name="leaderFieldType" id="leader.ct">
		<xsd:annotation>
			<xsd:documentation>UNIMARC Record Label, 24 octets</xsd:documentation>
		</xsd:annotation>
		<xsd:simpleContent>
			<xsd:extension base="leaderDataType">
				<xsd:attribute name="id" type="idDataType" use="optional"/>
			</xsd:extension>
		</xsd:simpleContent>
	</xsd:complexType>
	<xsd:simpleType name="leaderDataType" id="leader.st">
		<xsd:restriction base="xsd:string">
			<xsd:whiteSpace value="preserve"/>
			<xsd:pattern value="\d{5}\p{IsBasicLatin}\p{IsBasicLatin}{4}\d\d\d{5}\p{IsBasicLatin}{3}\d\d\d\p{IsBasicLatin}"/>
		</xsd:restriction>
	</xsd:simpleType>
	<xsd:complexType name="controlFieldType" id="controlfield.ct">
		<xsd:annotation>
			<xsd:documentation>UNIMARC Fields 001-009</xsd:documentation>
		</xsd:annotation>
		<xsd:simpleContent>
			<xsd:extension base="controlDataType">
				<xsd:attribute name="id" type="idDataType" use="optional"/>
				<xsd:attribute name="tag" type="controltagDataType" use="required"/>
			</xsd:extension>
		</xsd:simpleContent>
	</xsd:complexType>
	<xsd:simpleType name="controlDataType" id="controlfield.st">
		<xsd:restriction base="xsd:string">
			<xsd:whiteSpace value="preserve"/>
		</xsd:restriction>
	</xsd:simpleType>
	<xsd:simpleType name="controltagDataType" id="controltag.st">
		<xsd:restriction base="xsd:string">
			<xsd:whiteSpace value="preserve"/>
			<xsd:pattern value="00[1-9A-Za-z]"/>
		</xsd:restriction>
	</xsd:simpleType>
	<xsd:complexType name="dataFieldType" id="datafield.ct">
		<xsd:annotation>
			<xsd:documentation>UNIMARC Variable Data Fields 010-999</xsd:documentation>
		</xsd:annotation>
		<xsd:choice>
			<xsd:annotation>
				<xsd:documentation>UNIMARC field can be composed by standard subfields (strings) or by "s1" subfields with embedded tags indicators and subfields ex. g.: 4xx or 604 tags</xsd:documentation>
			</xsd:annotation>
			<xsd:sequence maxOccurs="unbounded">
				<xsd:element name="subfield" type="subfieldatafieldType"/>
			</xsd:sequence>
			<xsd:sequence maxOccurs="unbounded">
				<xsd:element name="s1" type="s1Type"/>
			</xsd:sequence>
		</xsd:choice>
		<xsd:attribute name="id" type="idDataType" use="optional"/>
		<xsd:attribute name="tag" type="tagDataType" use="required"/>
		<xsd:attribute name="ind1" type="indicatorDataType" use="optional"/>
		<xsd:attribute name="ind2" type="indicatorDataType" use="optional"/>
		<xsd:attribute name="ind3" type="indicatorDataType" use="optional"/>
		<xsd:attribute name="ind4" type="indicatorDataType" use="optional"/>
		<xsd:attribute name="ind5" type="indicatorDataType" use="optional"/>
		<xsd:attribute name="ind6" type="indicatorDataType" use="optional"/>
		<xsd:attribute name="ind7" type="indicatorDataType" use="optional"/>
		<xsd:attribute name="ind8" type="indicatorDataType" use="optional"/>
		<xsd:attribute name="ind9" type="indicatorDataType" use="optional"/>
		</xsd:complexType>
	<xsd:simpleType name="tagDataType" id="tag.st">
		<xsd:restriction base="xsd:string">
			<xsd:whiteSpace value="preserve"/>
			<xsd:pattern value="(00[1-9A-Za-z]|0[1-9A-Za-z][0-9A-Za-z]|[1-9A-Za-z][0-9A-Za-z]{2})"/>
		</xsd:restriction>
	</xsd:simpleType>
	<xsd:simpleType name="indicatorDataType" id="ind.st">
		<xsd:restriction base="xsd:string">
			<xsd:whiteSpace value="preserve"/>
			<xsd:pattern value="\p{IsBasicLatin}{1}"/>
		</xsd:restriction>
	</xsd:simpleType>
	<xsd:complexType name="subfieldatafieldType" id="subfield.ct">
		<xsd:simpleContent>
			<xsd:extension base="subfieldDataType">
				<xsd:attribute name="id" type="idDataType" use="optional"/>
				<xsd:attribute name="code" type="subfieldcodeDataType" use="required"/>
			</xsd:extension>
		</xsd:simpleContent>
	</xsd:complexType>
	<xsd:simpleType name="subfieldDataType" id="subfield.st">
		<xsd:restriction base="xsd:string">
			<xsd:whiteSpace value="preserve"/>
		</xsd:restriction>
	</xsd:simpleType>
	<xsd:simpleType name="subfieldcodeDataType" id="code.st">
		<xsd:restriction base="xsd:string">
			<xsd:whiteSpace value="preserve"/>
			<xsd:pattern value="(\p{IsBasicLatin}|\p{IsLatin-1Supplement}){0,8}"/>
		</xsd:restriction>
	</xsd:simpleType>
	<xsd:simpleType name="idDataType" id="id.st">
		<xsd:restriction base="xsd:ID"/>
	</xsd:simpleType>
	<xsd:complexType name="s1Type" id="s1.ct">
		<xsd:annotation>
			<xsd:documentation>The embedded fields technique  introduced by s1 tag</xsd:documentation>
		</xsd:annotation>
		<xsd:sequence>
			<xsd:element name="controlfield" type="controlFieldType" minOccurs="0" maxOccurs="unbounded"/>
			<xsd:element name="datafield" type="dataFieldType" minOccurs="0" maxOccurs="unbounded"/>
		</xsd:sequence>
	</xsd:complexType>
	</xsd:schema>

