<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!--  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
		ILLUSTRATIONS
	Contacts: WIPO: Patrick Fi&eacute;vet (patrick.fievet@wipo.int)
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  -->

<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
	<xs:import namespace="http://www.w3.org/XML/1998/namespace"/>
	
	<!--  IPCIllusrations: root for IPCR_ELAYER_ILLUSTRATION_XXXXMMDD files
		  Structure:
			list of IPCIllustrationSections; each contains illustrations related to a certain section
		  Attributes:
			edition	as a number or as a date
	-->
	<xs:element name="IPCIllustrations">
		<xs:complexType>
			<xs:sequence>
				<xs:element ref="IPCIllustrationsSection" minOccurs="0" maxOccurs="unbounded"/>
			</xs:sequence>
			<xs:attribute name="edition" use="required" type="xs:anySimpleType"/>
		</xs:complexType>
	</xs:element>
	
	<!--  IPCIllustrationSection: illustrations related to a certain section
		  Structure:
			list of IPCIllustrationClasses; they contain illustrations related to a certain class
		  Attributes:
			symbol	IPC symbol in A format
			illustrationsNo number of illustrations that belong to the "section" but does not belong to any of its "classes"
	-->
	<xs:element name="IPCIllustrationsSection">
		<xs:complexType>
			<xs:sequence>
				<xs:element ref="IPCIllustrationsClass" minOccurs="0" maxOccurs="unbounded"/>
			</xs:sequence>
			<xs:attribute name="symbol" use="required" type="xs:anySimpleType"/>
			<xs:attribute name="illustrationsNo" use="required" type="xs:anySimpleType"/>
		</xs:complexType>
	</xs:element>
	
	<!--  IPCIllustrationClass: illustrations related to a certain class
		  Structure:
			optionally, illustrations  that belong to the "class" but does not belong to its "subclasses"
			list of IPCIllustrationSublasses; they contain illustrations related to a certain subclass within the class
		  Attributes:
			symbol	IPC symbol in A99 format
			illustrationsNo number of illustrations that belong to the "class" but does not belong to any of its "subclasses"
	-->
	<xs:element name="IPCIllustrationsClass">
		<xs:complexType>
			<xs:sequence>
				<xs:element ref="illustrations" minOccurs="0"/>
				<xs:element ref="IPCIllustrationsSubclass" minOccurs="0" maxOccurs="unbounded"/>
			</xs:sequence>
			<xs:attribute name="symbol" use="required" type="xs:anySimpleType"/>
			<xs:attribute name="illustrationsNo" use="required" type="xs:anySimpleType"/>
		</xs:complexType>
	</xs:element>
	
	<!--  IPCIllustrationSubclass: illustrations related to a certain subclass
		  Structure:
			optionally, illustrations  that belong to the "subclass" but does not belong to its "maingroups"
			list of IPCIllustrationMaingroups; they contain illustrations related to a certain maingroup within the subclass
		  Attributes:
			symbol	IPC symbol in A99A format
			illustrationsNo number of illustrations that belong to the "subclass" but does not belong to any of its "maingroups"
	-->
	<xs:element name="IPCIllustrationsSubclass">
		<xs:complexType>
			<xs:sequence>
				<xs:element ref="illustrations" minOccurs="0"/>
				<xs:element ref="IPCIllustrationsMaingroup" minOccurs="0" maxOccurs="unbounded"/>
			</xs:sequence>
			<xs:attribute name="symbol" use="required" type="xs:anySimpleType"/>
			<xs:attribute name="entryType" use="required" type="xs:anySimpleType"/>
			<xs:attribute name="illustrationsNo" use="required" type="xs:anySimpleType"/>
		</xs:complexType>
	</xs:element>
	
	<!--  IPCIllustrationMaingroup: illustrations related to a certain maingroup
		  Structure:
			optionally, illustrations  that belong to the "maingroup" but does not belong to its "groups"
			list of IPCIllustrationGroups; they contain illustrations related to a certain group within the maingroup
		  Attributes:
			symbol	IPC symbol in A99AZZZMGGZZZZ format
			entryType c for classification symbols, d for double purpose and i for indexing codes
			illustrationsNo number of illustrations that belong to the "maingroup" but does not belong to any of its "groups"
	-->
	<xs:element name="IPCIllustrationsMaingroup">
		<xs:complexType>
			<xs:sequence>
				<xs:element ref="illustrations" minOccurs="0"/>
				<xs:element ref="IPCIllustrationsGroup" minOccurs="0" maxOccurs="unbounded"/>
			</xs:sequence>
			<xs:attribute name="symbol" use="required" type="xs:anySimpleType"/>
			<xs:attribute name="entryType" default="c">
				<xs:simpleType>
					<xs:restriction base="xs:NMTOKEN">
						<xs:enumeration value="c"/>
						<xs:enumeration value="d"/>
						<xs:enumeration value="i"/>
					</xs:restriction>
				</xs:simpleType>
			</xs:attribute>
			<xs:attribute name="illustrationsNo" use="required" type="xs:anySimpleType"/>
		</xs:complexType>
	</xs:element>
	
	<!--  IPCIllustrationGroup: illustrations related to a certain group
		  Structure:
			optionally, illustrations  that belong to the group
			pls. note that hierarchy of groups is not maintained in this file!
		  Attributes:
			symbol	IPC symbol in A99AZZZMGGZZZZ format
			entryType c for classification symbols, d for double purpose and i for indexing codes
			illustrationsNo number of illustrations that belong to the group
	-->
	<xs:element name="IPCIllustrationsGroup">
		<xs:complexType>
			<xs:sequence>
				<xs:element ref="illustrations" minOccurs="0"/>
			</xs:sequence>
			<xs:attribute name="symbol" use="required" type="xs:anySimpleType"/>
			<xs:attribute name="entryType" default="c">
				<xs:simpleType>
					<xs:restriction base="xs:NMTOKEN">
						<xs:enumeration value="c"/>
						<xs:enumeration value="d"/>
						<xs:enumeration value="i"/>
					</xs:restriction>
				</xs:simpleType>
			</xs:attribute>
			<xs:attribute name="illustrationsNo" use="required" type="xs:anySimpleType"/>
		</xs:complexType>
	</xs:element>
	
	<!--  illustrations: embedding the list of "illustration"s
		  Structure:
			list of illustrations
	-->
	<xs:element name="illustrations">
		<xs:complexType>
			<xs:sequence>
				<xs:element ref="illustration" maxOccurs="unbounded"/>
			</xs:sequence>
		</xs:complexType>
	</xs:element>
	
	<!--  illustration: data for a single illustration
		  Attributes:
			type	not used now, we have formulae only
			label	a readable label
			src	default file (GIF if present)
			remarkEN
			remarkFR some manual remarks
	-->
	<xs:element name="illustration">
		<xs:complexType>
			<xs:sequence>
				<xs:element ref="illustrationversion" minOccurs="0" maxOccurs="unbounded"/>
			</xs:sequence>
			<xs:attribute name="type">
				<xs:simpleType>
					<xs:restriction base="xs:NMTOKEN">
						<xs:enumeration value="picture"/>
						<xs:enumeration value="formula"/>
					</xs:restriction>
				</xs:simpleType>
			</xs:attribute>
			<xs:attribute name="label" type="xs:anySimpleType"/>
			<xs:attribute name="src" use="required" type="xs:anySimpleType"/>
			<xs:attribute name="remarkEN" type="xs:anySimpleType"/>
			<xs:attribute name="remarkFR" type="xs:anySimpleType"/>
		</xs:complexType>
	</xs:element>
	<xs:element name="illustrationversion">
		<xs:complexType>
			<xs:attribute name="format" type="xs:anySimpleType"/>
			<xs:attribute name="src" use="required" type="xs:anySimpleType"/>
		</xs:complexType>
	</xs:element>
</xs:schema>
