<?xml version="1.0" encoding="UTF-8"?>
<xs:schema elementFormDefault="qualified" xmlns:xs="http://www.w3.org/2001/XMLSchema">
	<xs:annotation>
		<xs:appinfo>inc-scheme_1-02.xsd</xs:appinfo>
	</xs:annotation>
	<xs:annotation>
		<xs:documentation>
			<h1>IPC common types for schema and compilation files</h1>
		</xs:documentation>
	</xs:annotation>
	<!--
ipcEntry
============================
ipcr_compilation_1-03.xsd
ipcr_scheme_1-02.xsd
-->
	<xs:include schemaLocation="inc-types_1-02.xsd"/>
	<xs:attributeGroup name="ipcEntryAttributes">
		<xs:annotation>
			<xs:documentation><div>Base attribute list for IPC entries</div></xs:documentation>
		</xs:annotation>
		<!--
				<dl>
					<dt>
						<b>Attributes:</b> 
					</dt><dd><dl>
						<dt>
							<b>acceptanceLevel:</b> used in RIPCIS, CHAR(1), values:</dt>
						<dd>O(riginal)</dd>
						<dd>P(ublished)</dd>
						<dd>(p)R(oposed)</dd>
						<dd>C(E adopted)</dd>
						<dd>S(C approved)</dd>
						<dd>W(G accepted)</dd>
					</dl></dd>
					<dd>
						<b>entryType:</b> K(lassifying), I(ndexing), D(double) (IPCR_SCHEME)</dd>
					<dd>
						<b>ipcLevel:</b> C(ore), A(dvanced), (c)O(re only)</dd>
					<dl>
						<dt>
							<b>kind:</b> 
						</dt>
						<dd>s(ection)</dd>
						<dd>
							<b>t(itle:</b> subsection title)</dd>
						<dd>c(lass)</dd>
						<dd>(s)u(bclass)</dd>
						<dd>g(uidance header)</dd>
						<dd>m(ain group)</dd>
						<dd>1-B (dot group, 1 to 11 dots)</dd>
						<dd>d(eleted)</dd>
						<dd>(subclass) i(ndex)</dd>
						<dd>n(ote)</dd>
						<dd>l(ine) guide heading line</dd>
					</dl>
					<dl>
						<dt>
							<b>symbol:</b> symbol or start of scope for notes and guide headings,</dt>
						<dd>in format A99AZZZMGGZZZZ (zero padded, 4 digit for main group, 6 digits for group)</dd>
					</dl>
					<dd>
						<b>endSymbol:</b> end of scope, in case of note, guide heading and deleted</dd>
					<dl>
						<dt>
							<b>coreOfEntry:</b> symbol of associated core entry in the edition to which the entry belongs</dt>
						<dd>in format A99AZZZMGGZZZZ (zero padded, 4 digit for main group, 6 digits for group)</dd>
					</dl>
					<dl>
						<dt>
							<b>renumberedFrom:</b> symbol from which renumbered (RIPCIS only)</dt>
						<dd>in format A99AZZZMGGZZZZ (zero padded, 4 digit for main group, 6 digits for group)</dd>
					</dl>
					<dd>
						<b>isDead:</b> when entry is deleted by an amendment (RIPCIS only)</dd>
					<dd>
						<b>language:</b> EN,FR</dd>
					<dd>
						<b>priorityOrder:</b> secondary sort key (number)</dd>
					<dl>
						<dt>
							<b>edition:</b> comma-separated list of versions (aka editions) , 20060101</dt>
						<dd>
							<b>edition 1:</b> 19680901 (from 19680901 to 19740630)</dd>
						<dd>
							<b>edition 2:</b> 19740701 (from 19740701 to 19791231)</dd>
						<dd>
							<b>edition 3:</b> 19800101 (from 19800101 to 19841231)</dd>
						<dd>
							<b>edition 4:</b> 19850101 (from 19850101 to 19891231)</dd>
						<dd>
							<b>edition 5:</b> 19900101 (from 19900101 to 19941231)</dd>
						<dd>
							<b>edition 6:</b> 19950101 (from 19950101 to 19991231)</dd>
						<dd>
							<b>edition 7:</b> 20000101 (from 20000101 to 20051231)</dd>
						<dd>
							<b>edition 8:</b> 20060101 (from 20060101)</dd>
					</dl>
				</dl>
				<dl>
					<dt><b>20051001</b> TA    or any other two-letter language code</dt>
					<dd>(EF maybe used at language-independent cases, e.g. deletions; EF is a non-existing language code)</dd>
				</dl>
			</xs:documentation>
			<xs:documentation>
				<div>
					<b>20051001</b> TA language: CDATA instead of list, to allow translations</div>
		-->
		<xs:attribute name="symbol" type="symbol" use="required">
			<xs:annotation>
				<xs:documentation>
					<div>symbol of entry or start of scope for non-structured entries</div>
					<div>unique for structured entries only</div>
				</xs:documentation>
			</xs:annotation>
		</xs:attribute>
		<xs:attribute name="endSymbol" type="symbol">
			<xs:annotation>
				<xs:documentation>
					<div>end of scope symbol, for non-structured entries only, e.g. for notes</div>
					<div>the scope lasts until the last descendant of the endSymbol</div>
				</xs:documentation>
			</xs:annotation>
		</xs:attribute>
		<xs:attribute name="entryType" type="entryType" default="K">
			<xs:annotation>
				<xs:documentation>
					<div>entry type</div>
					<div>e.g. classifying, double purpose or indexing<br/>mostly relevant in prereform versions</div>
				</xs:documentation>
			</xs:annotation>
		</xs:attribute>
		<xs:attribute name="ipcLevel" type="ipcLevelCaps" default="C">
			<xs:annotation>
				<xs:documentation>
					<div>text in a given level</div>
					<div>relevant in reformed IPC versions before the simplification</div>
				</xs:documentation>
			</xs:annotation>
		</xs:attribute>
		<xs:attribute name="lang" type="lang">
			<xs:annotation>
				<xs:documentation>
					<div>language of the entry</div>
					
				</xs:documentation>
			</xs:annotation>
		</xs:attribute>
		<!--<xs:attribute name="coreOfEntry" type="xs:string"></xs:attribute>-->
		<xs:attribute name="kind" type="ipcEntryKind">
			<xs:annotation>
				<xs:documentation>
					<div>type of IPC entry, e.g. 'm' for maingroup</div>
				</xs:documentation>
			</xs:annotation>
		</xs:attribute>
		<xs:attribute name="edition" type="editionList">
			<xs:annotation>
				<xs:documentation>
					<div>non-empty IPC version list</div>
					<div>versions separated by comma</div>
				</xs:documentation>
			</xs:annotation>
		</xs:attribute>
		<xs:attribute name="priorityOrder" type="priorityOrder">
			<xs:annotation>
				<xs:documentation>
					<div>priority order of the entry</div>
				</xs:documentation>
			</xs:annotation>
		</xs:attribute>
		<xs:attribute name="isDead" type="yesno" default="N">
			<xs:annotation>
				<xs:documentation>
					<div>text-less entry for history</div>
					<div>Used for the purpose of marking deleted notes and guidance headings, as used in compilation files and prereform versions.
		</div>
				</xs:documentation>
			</xs:annotation>
		</xs:attribute>
		<!--<xs:attribute name="renumberedFrom" type="xs:string"></xs:attribute>-->
		<!--<xs:attribute name="amendmentState" type="xs:string"></xs:attribute>-->
		<xs:attribute name="remark" type="remark">
			<xs:annotation>
				<xs:documentation>
					<div>comment</div>
				</xs:documentation>
			</xs:annotation>
		</xs:attribute>
		<!-- <xs:attribute name="version" type="xs:string"></xs:attribute>-->
	</xs:attributeGroup>









	<!--
textBody
============================
ipcr_compilation_1-03.xsd
ipcr_scheme_1-02.xsd

	<xs:element name="textBody">
		<xs:annotation>
			<xs:documentation>
				<dl>
					<dt>renumberedFrom    CDATA    #IMPLIED</dt>
					<dd>ofEdition    CDATA    #IMPLIED</dd>
					<dd>ofSession    CDATA    #IMPLIED</dd>
					<dd>ofProject    CDATA    #IMPLIED</dd>
					<dd>source        CDATA    #IMPLIED</dd>
					<dd>diffCA        CDATA    #IMPLIED</dd>
					<dd>acceptanceLevel    CDATA    "O"</dd>
				</dl>
			</xs:documentation>
			<xs:documentation>
				<div>
					<b>textBody:</b> various body part of the text of an entry</div>
				<dl>
					<dt>
						<b>Structure:</b> 
					</dt>
					<dd>one of note, index, deleted or title</dd>
					<dd>
						<b>note:</b> for kind='n'</dd>
					<dd>
						<b>index:</b> for kind='i'</dd>
					<dd>
						<b>deleted:</b> for kind='d'</dd>
					<dd>
						<b>title:</b> for all other cases, including guidance heading and subsection titles</dd>
				</dl>
			</xs:documentation>
		</xs:annotation>
		<xs:complexType>
			<xs:choice>
				<xs:element name="note" type="note"></xs:element>
				<xs:element name="index" type="index"></xs:element>
				<xs:element name="deleted" type="deleted"></xs:element>
				<xs:element name="title" type="title"></xs:element>
			</xs:choice>
		</xs:complexType>
	</xs:element>
-->
	<!--
deleted
============================
ipcr_compilation_1-03.xsd
ipcr_scheme_1-02.xsd
-->
	<xs:complexType name="deleted">
		<xs:annotation>
			<xs:documentation>
				<div>delete instructions in compilation files and in editions before simplification</div>
				<h3>Comment</h3>
				<ul>
					<li>transferredTo and coveredBy sequences are optional, but one of them should appear</li>
					<li>printed publication of prereform editions might have contained more complex deletions, mixed with text</li>
					<li>deleted instructions do not appear in editions in and after 20110101</li>
				</ul>
			</xs:documentation>
		</xs:annotation>

		<xs:sequence>
			<xs:element name="transferredTo" type="transferredTo" minOccurs="0"></xs:element>
			<xs:element name="coveredBy" type="coveredBy" minOccurs="0"></xs:element>
		</xs:sequence>
	</xs:complexType>


	<!--
transferredTo
============================
ipcr_compilation_1-03.xsd
ipcr_scheme_1-02.xsd
-->
	<xs:complexType name="transferredTo">
		<xs:annotation>
			<xs:documentation>
				<div>the subject matter of the symbol to be deleted is transferred to a new symbol, i.e. references should point to new symbols</div>
			</xs:documentation>
		</xs:annotation>

		<xs:choice maxOccurs="unbounded">
			<xs:element name="sref" type="sref">
				<xs:annotation>
					<xs:documentation>
						<div>the referred reference should be a new symbol</div>
					</xs:documentation>
				</xs:annotation>
			</xs:element>
			<xs:element name="mref" type="mref">
				<xs:annotation>
					<xs:documentation>
						<div>all the references within the interval should be new symbols</div>
					</xs:documentation>
				</xs:annotation>
			</xs:element>
		</xs:choice>
	</xs:complexType>


	<!--
coveredBy
============================
ipcr_compilation_1-03.xsd
ipcr_scheme_1-02.xsd
-->
	<xs:complexType name="coveredBy">
		<xs:annotation>
			<xs:documentation>
				<div>the subject matter of the symbol to be deleted is covered by an symbol that existed already in the former edition, i.e. references should point to C-type modified symbols</div>
			</xs:documentation>
		</xs:annotation>

		<xs:choice maxOccurs="unbounded">
			<xs:element name="sref" type="sref">
				<xs:annotation>
					<xs:documentation>
						<div>the referred reference should be a C-type modified symbol</div>
					</xs:documentation>
				</xs:annotation>
			</xs:element>
			<xs:element name="mref" type="mref">
				<xs:annotation>
					<xs:documentation>
						<div>all the references within the interval should be C-type modified symbols</div>
					</xs:documentation>
				</xs:annotation>
			</xs:element>
		</xs:choice>
	</xs:complexType>


	<!--
note
============================
ipcr_compilation_1-03.xsd
ipcr_scheme_1-02.xsd
-->
	<!--
	<xs:complexType name="note">
		<xs:annotation>
			<xs:documentation>
				<div>
					<b>note:</b> body for a note</div>
				<dl>
					<dt>
						<b>Structure:</b> 
					</dt>
					<dd>list of noteParagraphs that may embedd subnotes</dd>
				</dl>
				<dl>
					<dt>
						<b>Attributes:</b> 
					</dt><dd><dl>
						<dt>
							<b>type:</b> type of prefix;</dt>
						<dd>
							<b>e.g. Roman is like I, Alpha:</b> A. (seldomly used)</dd>
					</dl></dd>
					<dd>
						<b>indent:</b> indentation depth (if not automatic)</dd>
				</dl>
			</xs:documentation>
		</xs:annotation>
		
			<xs:sequence maxOccurs="unbounded">
				<xs:element name="noteParagraph" type="noteParagraph"></xs:element>
			</xs:sequence>
			<xs:attribute name="type" type="noteType" default="none"></xs:attribute>
			<xs:attribute name="indent" type="xs:nonNegativeInteger"></xs:attribute>
		</xs:complexType>
	
-->
	<!--
noteParagraph
============================
ipcr_compilation_1-03.xsd
ipcr_scheme_1-02.xsd
-->
	<!--
	<xs:complexType name="noteParagraph">
		<xs:annotation>
			<xs:documentation>
				<div>
					<b>noteParagraph:</b> text of a single paragraph and its subparagraphs</div>
				<dl>
					<dt>
						<b>Structure:</b> two independent cases:</dt><dd><dl>
						<dt>
							<b>textual paragraph:</b> 
						</dt>
						<dd>
							<b>text:</b> contains the text itself</dd>
						<dd>
							<b>subnote:</b> sequence of subparagraphs</dd>
						<dd>
							<b>orphan:</b> a subparagraph that falls out of the subparagraph sequence (non-prefixed)</dd>
					</dl>
					<dl>
						<dt>
							<b>table:</b> 
						</dt>
						<dd>
							<b>references:</b> list of references</dd>
						<dd>
							<b>text:</b> text associated to references</dd>
					</dl></dd>
				</dl>
				<dl>
					<dt>
						<b>Attributes:</b> 
					</dt><dd><dl>
						<dt>
							<b>edition:</b> each single paragraph has an edition attribute,</dt>
						<dd>that may be different from the attribute of the embedding ipcEntry</dd>
					</dl></dd>
				</dl>
			</xs:documentation>
		</xs:annotation>
	
			<xs:choice>
				<xs:sequence>
					<xs:element name="text" type="schemeText"></xs:element>
					<xs:element name="subnote" type="subnote" minOccurs="0"></xs:element>
					<xs:element name="orphan" type="orphan" minOccurs="0"></xs:element>
				</xs:sequence>
				<xs:sequence>
					<xs:element name="references" type="schemeReferences"></xs:element>
					<xs:element name="text" type="schemeText"></xs:element>
				</xs:sequence>
			</xs:choice>
			<xs:attribute name="edition" type="neditionList"></xs:attribute>
		</xs:complexType>
-->

	<!--
orphan
============================
ipcr_compilation_1-03.xsd
ipcr_scheme_1-02.xsd
-->

	<!--
	<xs:complexType name="orphan">
		<xs:annotation>
			<xs:documentation>
				<div>
					<b>orphan:</b> out-of-sequence subparagraph</div>
				<dl>
					<dt>
						<b>Structure:</b> tupple of text, optional subnote and optional orphan</dt>
					<dd>
						<b>text:</b> text of paragraph</dd>
					<dd>
						<b>optional sequence of subnotes:</b> when a new sequence of subparagraphs starts under the orphan</dd>
					<dd>
						<b>orphan:</b> an optional further orphan that closes the subparagraph sequence</dd>
				</dl>
				<dl>
					<dt>
						<b>Attributes:</b> 
					</dt>
					<dd>
						<b>indent:</b> presentation indentation when irregular</dd>
					<dd>
						<b>edition:</b> an orphan may have an edition mark in []-s</dd>
				</dl>
			</xs:documentation>
		</xs:annotation>
	
			<xs:sequence>
				<xs:element name="text" type="schemeText"></xs:element>
				<xs:element name="subnote" type="subnote" minOccurs="0"></xs:element>
				<xs:element name="orphan" type="orphan" minOccurs="0"></xs:element>
			</xs:sequence>
			<xs:attribute name="indent" type="xs:nonNegativeInteger"></xs:attribute>
			<xs:attribute name="edition" type="neditionList"></xs:attribute>
		</xs:complexType>
-->

	<!--
subnote
============================
ipcr_compilation_1-03.xsd
ipcr_scheme_1-02.xsd
-->
	<!--
	<xs:complexType name="subnote">
		<xs:annotation>
			<xs:documentation>
				<dl>
					<dt>
						<b>subnote:</b> sequence of noteParagraphs</dt>
					<dd>used to embedd as subparagraphs of noteParagraphs</dd>
				</dl>
				<dl>
					<dt>
						<b>Structure:</b> 
					</dt>
					<dd>list of noteParagraphs</dd>
				</dl>
				<div>
					<b>Attributes:</b> as note</div>
			</xs:documentation>
		</xs:annotation>
		
			<xs:sequence maxOccurs="unbounded">
				<xs:element name="noteParagraph" type="noteParagraph"></xs:element>
			</xs:sequence>
			<xs:attribute name="type" type="noteType" default="none"></xs:attribute>
			<xs:attribute name="indent" type="xs:nonNegativeInteger"></xs:attribute>
		</xs:complexType>
	


-->

	<!--
references
============================
ipcr_compilation_1-03.xsd
ipcr_scheme_1-02.xsd
-->

	<!--
text
============================
ipcr_compilation_1-03.xsd
ipcr_scheme_1-02.xsd
-->

	<xs:complexType name="schemeTitle">
		<xs:annotation>
			<xs:documentation>
				<div>body of structured elements as described in Guide: multipart title</div>
				<div>semicolon-separated list of title parts in presentation</div>
				<!--
				<h3>Structure</h3>
				<div>list of titlePart (those separated by ';' in presentation)</div>
				-->
			</xs:documentation>
		</xs:annotation>
		<xs:sequence maxOccurs="unbounded">
			<xs:element name="titlePart" type="schemeTitlePart"></xs:element>
		</xs:sequence>
	</xs:complexType>



	<xs:complexType name="schemeTitlePart">
		<xs:annotation>
			<xs:documentation>
				<div>text and associated references</div>
				<!--
				<h3>Structure:</h3>h
					p>sequence of text and list of associated entryReference-s</div>
					-->
				<h3>Comment</h3>
				<div>In presentation: the entryReferences, if any, are put into parentheses and separated by ';'-s</div>
			</xs:documentation>
		</xs:annotation>
		<xs:sequence>
			<xs:element name="text" type="schemeText">
				<xs:annotation>
					<xs:documentation>
						<div>text of the titlePart</div>
						<div>Rules for starting with capital or lower case letters: see the Guide.</div>
						<div>Does not contain the ; separator, neither parentheses.</div>
					</xs:documentation>
				</xs:annotation>
			</xs:element>
			<xs:element name="entryReference" type="schemeEntryReference" minOccurs="0" maxOccurs="unbounded"></xs:element>
		</xs:sequence>
	</xs:complexType>




	<xs:complexType name="schemeText" mixed="true">
		<xs:annotation>
			<xs:documentation>
				<div>formatted text, also may contain references, symbols and images</div>
			</xs:documentation>
		</xs:annotation>
		<xs:choice minOccurs="0" maxOccurs="unbounded">
			<xs:group ref="schemeTextContent"/>
		</xs:choice>
	</xs:complexType>



	<xs:complexType name="schemeEntryReference" mixed="true">
		<xs:annotation>
			<xs:documentation>
				<div>a titlePart may have a sequence of entryReferences (i.e. those presented in text of IPC symbols in parentheses), separated by semicolons</div>
				<h3>Comment</h3>
				<dl>
					<dt>usual format of entry references</dt>
					<dd>text followed by a sequence of references</dd>
					<dt>take precedences and some others</dt>
					<dd>free order of text and references</dd>
				</dl>
				<!--
				<h2>entryReference</h2>
				<div>text with layout and references</div>
				<h3>Structure</h3>
				<ul>
				<li>mixed text</li>
				<li>references</li>
				<li>special characters,</li>
				<li>marked up with underline, super/subscript, image</li>
				</ul>
				<h3>Comment</h3>
				<div><b>usual format:</b> text,references+<br/>
				however there are exceptions of this order, such as  'takes precedence' clause, that requires free order of text and references</div>
				-->
			</xs:documentation>
		</xs:annotation>
		<xs:complexContent>
			<xs:extension base="schemeText"/>
		</xs:complexContent>

		<!--
		<xs:choice minOccurs="0" maxOccurs="unbounded">
			<xs:group ref="schemeTextContent"/>
-->
		<!--
				<xs:element name="u" type="u"></xs:element> 
				<xs:element name="sup" type="sup"></xs:element>
				<xs:element name="sub" type="sub"></xs:element>
				<xs:element name="img" type="img"></xs:element>
				<xs:element name="sref" type="sref"></xs:element>
				<xs:element name="mref" type="mref"></xs:element>
				<xs:element name="nbsp" type="nbsp"></xs:element>
				<xs:element name="llinkt" type="llinkt"></xs:element>
				<xs:element name="rlinkt" type="rlinkt"></xs:element>
				<xs:element name="larrow" type="larrow"></xs:element>
				<xs:element name="rarrow" type="rarrow"></xs:element>
				<xs:element name="llinkthree" type="llinkthree"></xs:element>
				<xs:element name="rlinkthree" type="rlinkthree"></xs:element>
				<xs:element name="symbol" type="symbolCharacter"></xs:element>
				<xs:element name="alpha" type="alpha"></xs:element>
				<xs:element name="beta" type="beta"></xs:element>
				<xs:element name="omega" type="omega"></xs:element>
				<xs:element name="ge" type="ge"></xs:element>
				<xs:element name="gt" type="gt"></xs:element>
				<xs:element name="le" type="le"></xs:element>
				<xs:element name="lt" type="lt"></xs:element>
				<xs:element name="dbond" type="dbond"></xs:element>
				<xs:element name="tbond" type="tbond"></xs:element>
				<xs:element name="regist" type="regist"></xs:element>
				<xs:element name="degree" type="degree"></xs:element>
				<xs:element name="tm" type="tm"></xs:element>
				<xs:element name="cr" type="cr"></xs:element>
				<xs:element name="oe" type="oe"></xs:element>
				<xs:element name="OE" type="OE"></xs:element>
				<xs:element name="emdash" type="emdash"></xs:element>
				<xs:element name="endash" type="endash"></xs:element>
				-->
		<!--
		</xs:choice>
-->
	</xs:complexType>



	<xs:group name="schemeTextContent">
		<xs:annotation><xs:documentation><div>text containing formatting markup and special characters</div></xs:documentation></xs:annotation>
		<xs:choice>
			<xs:element name="u" type="u"></xs:element>
			<xs:element name="sup" type="sup">
				<xs:annotation>
					<xs:documentation></xs:documentation>
				</xs:annotation>
			</xs:element>
			<xs:element name="sub" type="sub">
				<xs:annotation>
					<xs:documentation></xs:documentation>
				</xs:annotation>
			</xs:element>
			<xs:element name="img" type="img"></xs:element>
			<xs:element name="sref" type="sref">
				<xs:annotation>
					<xs:documentation></xs:documentation>
				</xs:annotation>
			</xs:element>
			<xs:element name="mref" type="mref">
				<xs:annotation>
					<xs:documentation></xs:documentation>
				</xs:annotation>
			</xs:element>
			<xs:element name="nbsp" type="nbsp"></xs:element>
			<xs:element name="llinkt" type="llinkt"></xs:element>
			<xs:element name="rlinkt" type="rlinkt"></xs:element>
			<xs:element name="larrow" type="larrow"></xs:element>
			<xs:element name="rarrow" type="rarrow"></xs:element>
			<xs:element name="llinkthree" type="llinkthree"></xs:element>
			<xs:element name="rlinkthree" type="rlinkthree"></xs:element>
			<xs:element name="symbol" type="symbolCharacter">
				<xs:annotation>
					<xs:documentation></xs:documentation>
				</xs:annotation>
			</xs:element>
			<xs:element name="alpha" type="alpha"></xs:element>
			<xs:element name="beta" type="beta"></xs:element>
			<xs:element name="omega" type="omega"></xs:element>
			<xs:element name="ge" type="ge"></xs:element>
			<xs:element name="gt" type="gt"></xs:element>
			<xs:element name="le" type="le"></xs:element>
			<xs:element name="lt" type="lt"></xs:element>
			<xs:element name="dbond" type="dbond"></xs:element>
			<xs:element name="tbond" type="tbond"></xs:element>
			<xs:element name="regist" type="regist"></xs:element>
			<xs:element name="degree" type="degree"></xs:element>
			<xs:element name="tm" type="tm"></xs:element>
			<xs:element name="cr" type="cr"></xs:element>
			<xs:element name="oe" type="oe"></xs:element>
			<xs:element name="OE" type="OE"></xs:element>
			<xs:element name="emdash" type="emdash"></xs:element>
			<xs:element name="endash" type="endash"></xs:element>
		</xs:choice>
	</xs:group>

	<xs:complexType name="schemeReferences" mixed="true">
		<xs:annotation>
			<xs:documentation>
				<div>list of references with separators. used in notes and note paragraphs (reference tables)</div>

				<div>Sequence of:</div>
				<ul>
					<li>mixed text (should be just separators)</li>
					<li>single reference or interval reference</li>
				</ul>
			</xs:documentation>
		</xs:annotation>
		<xs:choice minOccurs="0" maxOccurs="unbounded">
			<xs:element name="sref" type="sref">
				<xs:annotation>
					<xs:documentation>reference without any other markup</xs:documentation>
				</xs:annotation>
			</xs:element>
			<xs:element name="mref" type="mref">
				<xs:annotation>
					<xs:documentation>reference interval without any other markup</xs:documentation>
				</xs:annotation>
			</xs:element>
		</xs:choice>
	</xs:complexType>

	<xs:complexType name="schemeTextBody">
		<xs:annotation>
			<!--
			<xs:documentation>
				<dl>
					<dt>renumberedFrom    CDATA    #IMPLIED</dt>
					<dd>ofEdition    CDATA    #IMPLIED</dd>
					<dd>ofSession    CDATA    #IMPLIED</dd>
					<dd>ofProject    CDATA    #IMPLIED</dd>
					<dd>source        CDATA    #IMPLIED</dd>
					<dd>diffCA        CDATA    #IMPLIED</dd>
					<dd>acceptanceLevel    CDATA    "O"</dd>
				</dl>
			</xs:documentation>
-->
			<xs:documentation>
				<div>text of a structured or non-structured entry</div>
				<!--
				<dl>
					<dd>one of note, index, deleted or title</dd>
					<dd>
						<b>note:</b> for kind='n'</dd>
					<dd>
						<b>index:</b> for kind='i'</dd>
					<dd>
						<b>deleted:</b> for kind='d'</dd>
					<dd>
						<b>title:</b> for all other cases, including guidance heading and subsection titles</dd>
				</dl>
				-->
			</xs:documentation>
		</xs:annotation>

		<xs:choice>
			<xs:element name="note" type="schemeNote">
				<xs:annotation>
					<xs:documentation>
						<div>note: when kind='n'</div>
					</xs:documentation>
				</xs:annotation>
			</xs:element>
			<xs:element name="index" type="schemeIndex">
				<xs:annotation>
					<xs:documentation>
						<div>index: when kind='i'</div>
					</xs:documentation>
				</xs:annotation>
			</xs:element>
			<xs:element name="deleted" type="deleted">
				<xs:annotation>
					<xs:documentation>
						<div>deleted: when kind='d', not used in simplified IPC after 20110101</div>
					</xs:documentation>
				</xs:annotation>
			</xs:element>
			<xs:element name="title" type="schemeTitle">
				<xs:annotation>
					<xs:documentation>
						<div>multipart title: when structured, kind='g' (guidance heading), kind='t' (subsection title)</div>
					</xs:documentation>
				</xs:annotation>
			</xs:element>
		</xs:choice>
	</xs:complexType>



	<!--
	<xs:element name="test">
		<xs:complexType>
			<xs:choice>
				<xs:element name="test1">
					<xs:complexType mixed="true">
						<xs:attributeGroup ref="ipcEntryAttributes"/>
					</xs:complexType>
				</xs:element>
			</xs:choice>
			<xs:attribute name="hello" type="xs:string"/>
		</xs:complexType>
	</xs:element>
	-->

	<xs:complexType name="schemeNote">
		<xs:annotation>
			<xs:documentation>
				<div>non-structured element: note</div>
			</xs:documentation>
		</xs:annotation>
		<xs:sequence maxOccurs="unbounded">
			<xs:element name="noteParagraph" type="schemeNoteParagraph">
				<xs:annotation>
					<xs:documentation>
						<div>paragraph of a note</div>
						<div>The following rules apply:</div>
						<ol>
							<li>usually numbered or number-less notes are the points of notes</li>
							<li>some notes (usually section notes) may contain Roman numbered notes</li>
							<li>when the noteParagraph is non-numbered, there is no further noteParagraph sibling</li>
						</ol>
					</xs:documentation>
				</xs:annotation>
			</xs:element>
		</xs:sequence>
		<xs:attribute name="type" type="noteType" default="none">
			<xs:annotation>
				<xs:documentation>
					<div>type of prefix;<br/>
							e.g. Roman is like I,II,IV,<br/>
							Alpha: like A. (seldomly used)</div>
				</xs:documentation>
			</xs:annotation>
		</xs:attribute>
		<xs:attribute name="indent" type="indent">
			<xs:annotation>
				<xs:documentation>
					<div>indentation depth (if not automatic)<br/>
						obsolete in newer editions but appeared in prereform editions</div>
				</xs:documentation>
			</xs:annotation>
		</xs:attribute>
	</xs:complexType>




	<xs:complexType name="schemeNoteParagraph">
		<xs:annotation>
			<xs:documentation>
				<div>text of a single paragraph and its subparagraphs</div>
				<h3>Structure:</h3>
				<div>two independent cases:</div>
				<ul>
					<li>when parent note type is regular prefixed or non-prefixed (not a 'table'):<br/>
						<dl>
							<dt>text</dt>
							<dd>contains the text itself</dd>
							<dt>subnote</dt>
							<dd>sequence of subparagraphs</dd>
							<dt>orphan:</dt>
							<dd>a subparagraph that falls out of the subparagraph sequence (non-prefixed)</dd>
						</dl>
					</li>
					<li>when parent note type is 'table' (during the reform: gradually moved to the definitions):<br/>
						<dl>
							<dt>references</dt>
							<dd>list of references</dd>
							<dt>text</dt>
							<dd>text associated to references</dd>
						</dl>
					</li>
				</ul>
			</xs:documentation>
		</xs:annotation>

		<xs:choice>
			<xs:sequence>
				<xs:element name="text" type="schemeText">
					<xs:annotation>
						<xs:documentation>
							<div>text of the primary note paragraph, without prefix</div>
						</xs:documentation>
					</xs:annotation>
				</xs:element>
				<xs:element name="subnote" type="schemeSubNote" minOccurs="0">
					<xs:annotation>
						<xs:documentation>
							<div>subparagraph note</div>
							<ul>
								<li>may contain further subnotes</li>
								<li>subnotes should have a different type than their ancestor note or subnote</li>
							</ul>
						</xs:documentation>
					</xs:annotation>
				</xs:element>
				<xs:element name="orphan" type="schemeOrphan" minOccurs="0">
					<xs:annotation>
						<xs:documentation>
							<div>closes the sentence starting with the text and embedding the subnote-s</div>
						</xs:documentation>
					</xs:annotation>
				</xs:element>
			</xs:sequence>
			<xs:sequence>
				<xs:element name="references" type="schemeReferences">
					<xs:annotation>
						<xs:documentation>in note reference tables: list of references in the left column</xs:documentation>
					</xs:annotation>
				</xs:element>
				<xs:element name="text" type="schemeText">
					<xs:annotation>
						<xs:documentation>in note reference tables: text in the right column</xs:documentation>
					</xs:annotation>
				</xs:element>
			</xs:sequence>
		</xs:choice>
		<xs:attribute name="edition" type="editionList">
			<xs:annotation>
				<xs:documentation>
					<div>each single paragraph may have an edition attribute, that may be different from the attribute of the embedding ipcEntry</div>
				</xs:documentation>
			</xs:annotation>
		</xs:attribute>
	</xs:complexType>





	<xs:complexType name="schemeOrphan">
		<xs:annotation>
			<xs:documentation>
				<div>out-of-sequence subparagraph closing a sentence and rarely opening a new subdivision</div>
			</xs:documentation>
		</xs:annotation>

		<xs:sequence>
			<xs:element name="text" type="schemeText">
				<xs:annotation>
					<xs:documentation>
						<div>text of the orphan; never contains any prefix</div>
						<div>Usually closes the sentence started in th owning subnote.</div>
					</xs:documentation>
				</xs:annotation>
			</xs:element>
			<xs:element name="subnote" type="schemeSubNote" minOccurs="0">
				<xs:annotation>
					<xs:documentation>
						<div>subnote within an orphan<br/>
						when a new sequence of subparagraphs starts under the orphan;</div>
						<div><b>There are very few notes that contain further subdivision of an orphan.</b></div>
					</xs:documentation>
				</xs:annotation>
			</xs:element>
			<xs:element name="orphan" type="schemeOrphan" minOccurs="0">
				<xs:annotation>
					<xs:documentation>
						<div>optional orphan, that closes the sentence started in the owning orphan</div>
						<div><b>There are very few notes that contain orphan of an orphan.</b></div>
					</xs:documentation>
				</xs:annotation>
			</xs:element>
		</xs:sequence>
		<xs:attribute name="indent" type="indent"/>
		<xs:attribute name="edition" type="editionList">
			<xs:annotation>
				<xs:documentation>
					<div>an orphan may have an edition mark</div>
				</xs:documentation>
			</xs:annotation>
		</xs:attribute>
	</xs:complexType>

	<xs:complexType name="schemeSubNote">
		<xs:annotation>
			<xs:documentation>
				<div>sequence of embedded noteParagraph-s</div>
			</xs:documentation>
		</xs:annotation>

		<xs:sequence maxOccurs="unbounded">
			<xs:element name="noteParagraph" type="schemeNoteParagraph">
				<xs:annotation>
					<xs:documentation>
						<div>paragraphs of a subnote</div>
					</xs:documentation>
				</xs:annotation>
			</xs:element>
		</xs:sequence>
		<xs:attribute name="type" default="none" type="subnoteType"/>
		<!--
			<xs:simpleType>
				<xs:restriction base="xs:NMTOKEN">
					<xs:enumeration value="none"></xs:enumeration>
					<xs:enumeration value="table"></xs:enumeration>
					<xs:enumeration value="number"></xs:enumeration>
					<xs:enumeration value="Roman"></xs:enumeration>
					<xs:enumeration value="roman"></xs:enumeration>
					<xs:enumeration value="Alpha"></xs:enumeration>
					<xs:enumeration value="alpha"></xs:enumeration>
					<xs:enumeration value="bullet"></xs:enumeration>
				</xs:restriction>
		-->
		<xs:attribute name="indent" type="indent"></xs:attribute>
	</xs:complexType>


	<xs:complexType name="schemeIndex">
		<xs:annotation>
			<xs:documentation>
				<div>body of indexes of a subclass, class and subsection</div>
			</xs:documentation>
		</xs:annotation>

		<xs:sequence maxOccurs="unbounded">
			<xs:element name="indexEntry" type="schemeIndexEntry">
				<xs:annotation>
					<xs:documentation>
						<div>root index entry</div>
						<h3>Comment</h3>
						<div>root indexEntry-s are presented in the EN,FR languages in full capitals (but not necessarily in all languages)</div>
					</xs:documentation>
				</xs:annotation>
			</xs:element>
		</xs:sequence>
	</xs:complexType>


	<xs:complexType name="schemeIndexEntry">
		<xs:annotation>
			<xs:documentation>
				<div>one paragraph of an index, containing a text and list of references</div>
				<h3>Comments</h3>
				<ul>
					<li>References should not be empty on the leaves.</li>
					<li>Embedding means also: deeper indentation level in presentation and subdivision of subject matter.</li>
					<li>List of IPC symbol intervals is not necessarily sequential; inner symbols may appear at a different indexEntry.</li>
				</ul>
			</xs:documentation>
		</xs:annotation>

		<xs:sequence>
			<xs:element name="text" type="schemeText">
				<xs:annotation>
					<xs:documentation>
						<div>index entry title</div>
						<div>May contain underlined text or references (mostly in prereform editions).</div>
						<div>May contain references (mostly for residual groups in prereform editions).</div>
						<div>On level 0: capital letters in EN and FR.</div>
					</xs:documentation>
				</xs:annotation>
			</xs:element>
			<xs:element name="references" type="schemeReferences" minOccurs="0">
				<xs:annotation>
					<xs:documentation>list of references in indexEntry-s; if there are no sibling indexEntry-s, should not be empty</xs:documentation>
				</xs:annotation>
			</xs:element>
			<xs:element name="indexEntry" type="schemeIndexEntry" minOccurs="0" maxOccurs="unbounded">
				<xs:annotation>
					<xs:documentation>
						<div>embedded indexEntry-s, whose subject matter falls under the containing indexEntry</div>
					</xs:documentation>
				</xs:annotation>
			</xs:element>
		</xs:sequence>
	</xs:complexType>
</xs:schema>