<?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_catchwordindex_3-1.xsd</xs:appinfo>
	</xs:annotation>
	<xs:annotation>
		<xs:documentation>
			<h1>IPC Catchword Master File</h1>
		</xs:documentation>
	</xs:annotation>
	<xs:element name="IPCCatchwordIndex" type="IPCCatchwordIndex"/>
	<xs:complexType name="IPCCatchwordIndex">
		<xs:annotation>
			<xs:documentation>
				<div>a single catchword index in one language</div>
			</xs:documentation>
		</xs:annotation>
		<xs:choice>
			<xs:element name="CWEntry" type="CWEntry" maxOccurs="unbounded">
				<xs:annotation>
					<xs:documentation>main catchwords</xs:documentation>
				</xs:annotation>
			</xs:element>
		</xs:choice>
		<xs:attribute name="lang" type="lang" use="required">
			<xs:annotation>
				<xs:documentation>
					<div>language of indications in this index</div>
				</xs:documentation>
			</xs:annotation>
		</xs:attribute>
		<xs:attribute name="edition" type="edition" use="required">
			<xs:annotation>
				<xs:documentation>edition of IPC the catchword index belongs to</xs:documentation>
			</xs:annotation>
		</xs:attribute>
	</xs:complexType>
	<xs:complexType name="CWEntry">
		<xs:annotation>
			<xs:documentation>
				<div>recursive structure containing tree of entries</div>
				<h3>Comments</h3>
				<ul>
					<li>English version: 3 explicit levels</li>
					<li>French version has 3 levels, but a 4th is used by sort dependencies</li>
				</ul>
			</xs:documentation>
		</xs:annotation>
		<xs:sequence>
			<xs:element name="CWIndication" type="CWIndication">
				<xs:annotation>
					<xs:documentation>
						<div>indication of the entry (the text itself, with a little markup)</div>
					</xs:documentation>
				</xs:annotation>
			</xs:element>
			<xs:element name="CWSee" type="CWSee" minOccurs="0">
				<xs:annotation>
					<xs:documentation>
						<div>see also clause, defining related catchword entries</div>
					</xs:documentation>
				</xs:annotation>
			</xs:element>
			<xs:element name="CWReferences" type="CWReferences" minOccurs="0">
				<xs:annotation>
					<xs:documentation>
						<div>references related to the indication  (a very broad CWentry has no specified reference)</div>
					</xs:documentation>
				</xs:annotation>
			</xs:element>
			<xs:element name="CWEntry" type="CWEntry" minOccurs="0" maxOccurs="unbounded">
				<xs:annotation>
					<xs:documentation>
						<div>catchword entries, with narrower or different meaning than that covered by the indication</div>
					</xs:documentation>
				</xs:annotation>
			</xs:element>
		</xs:sequence>
		<xs:attribute name="id" type="xs:ID" use="required"/>
		<xs:attribute name="remark" type="remark">
			<xs:annotation>
				<xs:documentation>
					<div>free text comment</div>
				</xs:documentation>
			</xs:annotation>
		</xs:attribute>
	</xs:complexType>
	<xs:complexType name="CWIndication" mixed="true">
		<xs:annotation>
			<xs:documentation>
				<div>indication of the catchword, the text of the entry</div>
			</xs:documentation>
		</xs:annotation>
		<xs:choice minOccurs="0" maxOccurs="unbounded">
			<xs:element name="sub" type="catchwordSub"/>
		</xs:choice>
	</xs:complexType>
	<xs:complexType name="CWSee" mixed="true">
		<xs:annotation>
			<xs:documentation>
				<div>see also references</div>
				<div>May contain filler texts and separators before and between the references, e.g. "see" or "see also"</div>
			</xs:documentation>
		</xs:annotation>
		<xs:choice minOccurs="0" maxOccurs="unbounded">
			<xs:element name="sub" type="sub"/>
			<xs:element name="CWRef" type="CWRef"/>
		</xs:choice>
	</xs:complexType>
	<xs:complexType name="CWRef" mixed="true">
		<xs:annotation>
			<xs:documentation>
				<div>reference to another catchword entry</div>
			</xs:documentation>
		</xs:annotation>
		<xs:attribute name="REFID" type="xs:IDREF" use="required">
			<xs:annotation>
				<xs:documentation>
					<div>contains the ID of the referred CWEntry</div>
				</xs:documentation>
			</xs:annotation>
		</xs:attribute>
	</xs:complexType>
	<xs:complexType name="CWReferences">
		<xs:annotation>
			<xs:documentation>
				<div>references to IPC symbols or intervals</div>
			</xs:documentation>
		</xs:annotation>
		<xs:choice maxOccurs="unbounded">
			<xs:element name="sref" type="cwSref"/>
			<xs:element name="mref" type="cwMref"/>
		</xs:choice>
	</xs:complexType>
	<xs:complexType name="catchwordSub" mixed="true">
		<xs:annotation>
			<xs:documentation>Catchword underlined text</xs:documentation>
		</xs:annotation>
	</xs:complexType>
	<xs:complexType name="cwSref">
		<xs:annotation>
			<xs:documentation>
				<div>Catchword single reference</div>
				<div class="important">
					<span class="key">IPC References</span>similar to scheme sref but contains the necessary attribute for asterisks</div>
			</xs:documentation>
		</xs:annotation>
		<xs:complexContent>
			<xs:extension base="sref">
				<xs:attribute name="asterisk" type="yesno">
					<xs:annotation>
						<xs:documentation>
							<div>asterisk (restricted values) denoting the presence of an asterisk after the reference</div>
							<ul type="square">
								<li>
									<b>Y:</b>there must be an asterisk provided in the presentation</li>
								<li>
									<b>N:</b>no asterisk</li>
							</ul>
						</xs:documentation>
					</xs:annotation>
				</xs:attribute>
			</xs:extension>
		</xs:complexContent>
	</xs:complexType>
	<xs:complexType name="cwMref">
		<xs:annotation>
			<xs:documentation>
				<div>Catchword interval reference</div>
				<div class="important">
					<span class="key">IPC References</span>Similar to scheme mref but contains the necessary attribute for asterisks</div>
			</xs:documentation>
		</xs:annotation>
		<xs:complexContent>
			<xs:extension base="mref">
				<xs:attribute name="asterisk" type="yesno">
					<xs:annotation>
						<xs:documentation>
							<div>asterisk (restricted values) denoting the presence of an asterisk after the reference</div>
							<ul type="square">
								<li>
									<b>Y:</b>there must be an asterisk provided in the presentation</li>
								<li>
									<b>N:</b>no asterisk</li>
							</ul>
						</xs:documentation>
					</xs:annotation>
				</xs:attribute>
			</xs:extension>
		</xs:complexContent>
	</xs:complexType>
</xs:schema>
