<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns="http://www.wipo.int/classifications/ipc/masterfiles" targetNamespace="http://www.wipo.int/classifications/ipc/masterfiles" elementFormDefault="qualified">
	<xs:include schemaLocation="inc-types_3-1.xsd"/>
	<xs:annotation>
		<xs:appinfo>ipc_illustrations_3-1.xsd</xs:appinfo>
	</xs:annotation>
	<xs:annotation>
		<xs:documentation>
			<h1>IPC Illustrations Master File</h1>
		</xs:documentation>
	</xs:annotation>
	<xs:element name="IPCIllustrations">
		<xs:annotation>
			<xs:documentation>
				<div>set of illustrations related to scheme, definitions or independent illustrations</div>
			</xs:documentation>
		</xs:annotation>
		<xs:complexType>
			<xs:sequence>
				<xs:element name="IPCIllustrationsSection" type="IPCIllustrationsSection" maxOccurs="unbounded"/>
			</xs:sequence>
			<xs:attribute name="edition" type="edition" use="required">
				<xs:annotation>
					<xs:documentation>
						<div>
							<b>mandatory</b>: date of the version in YYYYMMDD format</div>
					</xs:documentation>
				</xs:annotation>
			</xs:attribute>
		</xs:complexType>
	</xs:element>
	<xs:complexType name="IPCIllustrationsSection">
		<xs:annotation>
			<xs:documentation>
				<div>illustrations related to a certain section</div>
			</xs:documentation>
		</xs:annotation>
		<xs:sequence>
			<xs:element name="IPCIllustrationsClass" type="IPCIllustrationsClass" maxOccurs="unbounded">
				<xs:annotation>
					<xs:documentation>
						<div/>
					</xs:documentation>
				</xs:annotation>
			</xs:element>
		</xs:sequence>
		<xs:attribute name="symbol" type="section" use="required">
			<xs:annotation>
				<xs:documentation>
					<div>
						<b>mandatory</b>: valid IPC section symbol</div>
				</xs:documentation>
			</xs:annotation>
		</xs:attribute>
		<xs:attribute name="illustrationsNo" type="xs:nonNegativeInteger" use="required">
			<xs:annotation>
				<xs:documentation>
					<div>number of illustrations that belong to the "section" but do not belong to any of its "classes"</div>
				</xs:documentation>
			</xs:annotation>
		</xs:attribute>
	</xs:complexType>
	<xs:complexType name="IPCIllustrationsClass">
		<xs:annotation>
			<xs:documentation>
				<div>illustrations related to a certain class</div>
			</xs:documentation>
		</xs:annotation>
		<xs:sequence>
			<xs:element name="illustrations" type="illustrations" minOccurs="0">
				<xs:annotation>
					<xs:documentation>
						<div>
							<b>optional</b>: illustrations that belong to the "class" but do not belong to any of its "subclasses"</div>
					</xs:documentation>
				</xs:annotation>
			</xs:element>
			<xs:element name="IPCIllustrationsSubclass" type="IPCIllustrationsSubclass" minOccurs="0" maxOccurs="unbounded">
				<xs:annotation>
					<xs:documentation>
						<div>IPCIllustrationSubclass contains illustrations that belong to a subclass within the owning class</div>
					</xs:documentation>
				</xs:annotation>
			</xs:element>
		</xs:sequence>
		<xs:attribute name="symbol" type="class" use="required">
			<xs:annotation>
				<xs:documentation>
					<div>
						<b>mandatory</b>: valid IPC class symbol (in A99 format)</div>
				</xs:documentation>
			</xs:annotation>
		</xs:attribute>
		<xs:attribute name="illustrationsNo" type="xs:nonNegativeInteger" use="required">
			<xs:annotation>
				<xs:documentation>
					<div>number of illustrations that belong to the "class" but do not belong to any of its "subclasses"</div>
				</xs:documentation>
			</xs:annotation>
		</xs:attribute>
	</xs:complexType>
	<xs:complexType name="IPCIllustrationsSubclass">
		<xs:annotation>
			<xs:documentation>
				<div>illustrations related to a certain subclass</div>
			</xs:documentation>
		</xs:annotation>
		<xs:sequence>
			<xs:element name="illustrations" type="illustrations" minOccurs="0">
				<xs:annotation>
					<xs:documentation>
						<div>
							<b>optional</b>: illustrations that belong to the "subclass" but do not belong to its "maingroups"</div>
					</xs:documentation>
				</xs:annotation>
			</xs:element>
			<xs:element name="IPCIllustrationsMaingroup" type="IPCIllustrationsMaingroup" minOccurs="0" maxOccurs="unbounded">
				<xs:annotation>
					<xs:documentation>
						<div>IPCIllustrationMaingroup contains illustrations that belong to a main group within the owning subclass</div>
					</xs:documentation>
				</xs:annotation>
			</xs:element>
		</xs:sequence>
		<xs:attribute name="symbol" type="subclass" use="required">
			<xs:annotation>
				<xs:documentation>
					<div>
						<b>mandatory</b>: valid IPC subclass symbol (in A99A format)</div>
				</xs:documentation>
			</xs:annotation>
		</xs:attribute>
		<xs:attribute name="illustrationsNo" type="xs:nonNegativeInteger" use="required">
			<xs:annotation>
				<xs:documentation>
					<div>number of illustrations that belong to the "subclass" but do not belong to any of its "maingroups"</div>
				</xs:documentation>
			</xs:annotation>
		</xs:attribute>
	</xs:complexType>
	<xs:complexType name="IPCIllustrationsMaingroup">
		<xs:annotation>
			<xs:documentation>
				<div>illustrations related to a certain maingroup</div>
			</xs:documentation>
		</xs:annotation>
		<xs:sequence>
			<xs:element name="illustrations" type="illustrations" minOccurs="0">
				<xs:annotation>
					<xs:documentation>
						<div>
							<b>optional</b>: illustrations that belong to the "maingroup" denoted by the symbol but do not belong to any to its "groups"</div>
					</xs:documentation>
				</xs:annotation>
			</xs:element>
			<xs:element name="IPCIllustrationsGroup" type="IPCIllustrationsGroup" minOccurs="0" maxOccurs="unbounded">
				<xs:annotation>
					<xs:documentation>
						<div>
							<b>optional</b>: illustrationGroup contains illustrations that belong to a subgroup within the owning main group; list of groups is flat</div>
					</xs:documentation>
				</xs:annotation>
			</xs:element>
		</xs:sequence>
		<xs:attribute name="symbol" type="symbol" use="required">
			<xs:annotation>
				<xs:documentation>
					<div>
						<b>mandatory</b>: valid IPC maingroup symbol (in A99AZZZM000000 format)</div>
				</xs:documentation>
			</xs:annotation>
		</xs:attribute>
		<xs:attribute name="illustrationsNo" type="xs:nonNegativeInteger" use="required">
			<xs:annotation>
				<xs:documentation>
					<div>number of illustrations that belong to the "maingroup" but do not belong to any of its "groups"</div>
				</xs:documentation>
			</xs:annotation>
		</xs:attribute>
	</xs:complexType>
	<xs:complexType name="IPCIllustrationsGroup">
		<xs:annotation>
			<xs:documentation>
				<div>illustrations related to a certain group</div>
				<div>hierarchy of groups is not maintained in this file!</div>
			</xs:documentation>
		</xs:annotation>
		<xs:sequence>
			<xs:element name="illustrations" type="illustrations" minOccurs="1">
				<xs:annotation>
					<xs:documentation>
						<div>
							<b>at least 1</b>: illustration(s) that belong to the IPC group denoted by the symbol attribute</div>
					</xs:documentation>
				</xs:annotation>
			</xs:element>
		</xs:sequence>
		<xs:attribute name="symbol" type="symbol" use="required">
			<xs:annotation>
				<xs:documentation>
					<div>
						<b>mandatory</b>: valid IPC subgroup symbol (in A99AZZZMGGZZZZ format</div>
				</xs:documentation>
			</xs:annotation>
		</xs:attribute>
		<xs:attribute name="illustrationsNo" type="xs:nonNegativeInteger" use="required">
			<xs:annotation>
				<xs:documentation>
					<div>number of illustrations that belong to the group denoted by the symbol</div>
				</xs:documentation>
			</xs:annotation>
		</xs:attribute>
	</xs:complexType>
	<xs:complexType name="illustrations">
		<xs:annotation>
			<xs:documentation>
				<div>wrapper for a sequence of illustration elements</div>
			</xs:documentation>
		</xs:annotation>
		<xs:sequence>
			<xs:element name="illustration" type="illustration" maxOccurs="unbounded"/>
		</xs:sequence>
	</xs:complexType>
	<xs:complexType name="illustration">
		<xs:annotation>
			<xs:documentation>
				<div>data for a single illustration</div>
				<div>There can be more files associated to the illustration in different formats, they are contained by the illustrationversion elements.</div>
				<div>The src attribute defines the default illustration file.</div>
			</xs:documentation>
		</xs:annotation>
		<xs:sequence>
			<xs:element name="illustrationversion" type="illustrationversion" minOccurs="0" maxOccurs="unbounded"/>
		</xs:sequence>
		<xs:attribute name="label" type="illustrationLabel" use="required">
			<xs:annotation>
				<xs:documentation>
					<div>a readable label</div>
				</xs:documentation>
			</xs:annotation>
		</xs:attribute>
		<xs:attribute name="src" type="illustrationSrc" use="required">
			<xs:annotation>
				<xs:documentation>
					<div>default file (GIF, JPG or PNG)</div>
				</xs:documentation>
			</xs:annotation>
		</xs:attribute>
	</xs:complexType>
	<xs:complexType name="illustrationversion">
		<xs:annotation>
			<xs:documentation>
				<div>a single illustration file</div>
			</xs:documentation>
		</xs:annotation>
		<xs:attribute name="format" type="illustrationFormat" use="required">
			<xs:annotation>
				<xs:documentation>
					<div>free format specifier, typically an extension of the file</div>
				</xs:documentation>
			</xs:annotation>
		</xs:attribute>
		<xs:attribute name="src" type="illustrationAltSrc" use="required">
			<xs:annotation>
				<xs:documentation>
					<div/>
				</xs:documentation>
			</xs:annotation>
		</xs:attribute>
	</xs:complexType>
	<xs:simpleType name="illustrationFormat">
		<xs:annotation>
			<xs:documentation>
				<div>format of a particular illustration</div>
				<div>free format 3 or 4 letters file extension</div>
			</xs:documentation>
		</xs:annotation>
		<xs:restriction base="xs:NMTOKEN">
			<xs:pattern value="[a-z]{3,4}"/>
		</xs:restriction>
	</xs:simpleType>
	<xs:simpleType name="illustrationSrc">
		<xs:annotation>
			<xs:documentation>
				<div>file name</div>
				<div>Format: symbol_number.extension, where:</div>
				<ul>
					<li>symbol: to which the owning illustration belongs</li>
					<li>number: the sequence number of the illustration element to which the file belongs</li>
					<li>extension: according to the format of the file which must be compatible with most of web browsers</li>
				</ul>
			</xs:documentation>
		</xs:annotation>
		<xs:restriction base="xs:string">
			<xs:pattern value="[A-H]([0-9][1-9]([A-Z])?)?([0-9][0-9][0-9][1-9][0-9]{6})?_[0-9]+\.(gif|jpg|png)"/>
			<xs:pattern value="[A-H]([0-9][1-9]([A-Z])?)?([0-9][0-9][1-9][0-9][0-9]{6})?_[0-9]+\.(gif|jpg|png)"/>
			<xs:pattern value="[A-H]([0-9][1-9]([A-Z])?)?([0-9][1-9][0-9][0-9][0-9]{6})?_[0-9]+\.(gif|jpg|png)"/>
			<xs:pattern value="[A-H]([0-9][1-9]([A-Z])?)?([1-9][0-9][0-9][0-9][0-9]{6})?_[0-9]+\.(gif|jpg|png)"/>
			<xs:pattern value="[A-H]([1-9][0-9]([A-Z])?)?([0-9][0-9][0-9][1-9][0-9]{6})?_[0-9]+\.(gif|jpg|png)"/>
			<xs:pattern value="[A-H]([1-9][0-9]([A-Z])?)?([0-9][0-9][1-9][0-9][0-9]{6})?_[0-9]+\.(gif|jpg|png)"/>
			<xs:pattern value="[A-H]([1-9][0-9]([A-Z])?)?([0-9][1-9][0-9][0-9][0-9]{6})?_[0-9]+\.(gif|jpg|png)"/>
			<xs:pattern value="[A-H]([1-9][0-9]([A-Z])?)?([1-9][0-9][0-9][0-9][0-9]{6})?_[0-9]+\.(gif|jpg|png)"/>
		</xs:restriction>
	</xs:simpleType>
	<xs:simpleType name="illustrationAltSrc">
		<xs:annotation>
			<xs:documentation>
				<div>file name</div>
				<div>Format: symbol_number.extension, where:</div>
				<ul>
					<li>symbol: to which the owning illustration belogs</li>
					<li>number: the sequence number of the illustration element to which the file belongs</li>
					<li>extension: according to the format of the file</li>
				</ul>
			</xs:documentation>
		</xs:annotation>
		<xs:restriction base="xs:string">
			<xs:pattern value="[A-H]([0-9][1-9]([A-Z])?)?([0-9][0-9][0-9][1-9][0-9]{6})?_[0-9]+\.[a-z]{3,4}"/>
			<xs:pattern value="[A-H]([0-9][1-9]([A-Z])?)?([0-9][0-9][1-9][0-9][0-9]{6})?_[0-9]+\.[a-z]{3,4}"/>
			<xs:pattern value="[A-H]([0-9][1-9]([A-Z])?)?([0-9][1-9][0-9][0-9][0-9]{6})?_[0-9]+\.[a-z]{3,4}"/>
			<xs:pattern value="[A-H]([0-9][1-9]([A-Z])?)?([1-9][0-9][0-9][0-9][0-9]{6})?_[0-9]+\.[a-z]{3,4}"/>
			<xs:pattern value="[A-H]([1-9][0-9]([A-Z])?)?([0-9][0-9][0-9][1-9][0-9]{6})?_[0-9]+\.[a-z]{3,4}"/>
			<xs:pattern value="[A-H]([1-9][0-9]([A-Z])?)?([0-9][0-9][1-9][0-9][0-9]{6})?_[0-9]+\.[a-z]{3,4}"/>
			<xs:pattern value="[A-H]([1-9][0-9]([A-Z])?)?([0-9][1-9][0-9][0-9][0-9]{6})?_[0-9]+\.[a-z]{3,4}"/>
			<xs:pattern value="[A-H]([1-9][0-9]([A-Z])?)?([1-9][0-9][0-9][0-9][0-9]{6})?_[0-9]+\.[a-z]{3,4}"/>
		</xs:restriction>
	</xs:simpleType>
	<xs:simpleType name="illustrationLabel">
		<xs:annotation>
			<xs:documentation>
				<div>label for the illustration</div>
				<div>Though can be free, contains recently the name of the file without extension.</div>
			</xs:documentation>
		</xs:annotation>
		<xs:restriction base="xs:string">
			<xs:pattern value="[A-H]([0-9][1-9]([A-Z])?)?([0-9][0-9][0-9][1-9][0-9]{6})?_[0-9]+"/>
			<xs:pattern value="[A-H]([0-9][1-9]([A-Z])?)?([0-9][0-9][1-9][0-9][0-9]{6})?_[0-9]+"/>
			<xs:pattern value="[A-H]([0-9][1-9]([A-Z])?)?([0-9][1-9][0-9][0-9][0-9]{6})?_[0-9]+"/>
			<xs:pattern value="[A-H]([0-9][1-9]([A-Z])?)?([1-9][0-9][0-9][0-9][0-9]{6})?_[0-9]+"/>
			<xs:pattern value="[A-H]([1-9][0-9]([A-Z])?)?([0-9][0-9][0-9][1-9][0-9]{6})?_[0-9]+"/>
			<xs:pattern value="[A-H]([1-9][0-9]([A-Z])?)?([0-9][0-9][1-9][0-9][0-9]{6})?_[0-9]+"/>
			<xs:pattern value="[A-H]([1-9][0-9]([A-Z])?)?([0-9][1-9][0-9][0-9][0-9]{6})?_[0-9]+"/>
			<xs:pattern value="[A-H]([1-9][0-9]([A-Z])?)?([1-9][0-9][0-9][0-9][0-9]{6})?_[0-9]+"/>
		</xs:restriction>
	</xs:simpleType>
</xs:schema>
