<!--  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
	CATCHWORD
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  -->
<!-- 
History:
200505.. TA split from RIPCIS DTD
20050804 TA external entry needed to include EN/FR versions in the same file 
20060506 TA comments are made more coherent
-->

<!-- CWSet - root, set of catchword indexes
Structure:
	list of catchword indexes (non-empty): indexes provided for an IPC version and for an language
Note:
	catchword index format is generic; the structures below are appropriate for
	- IPC official catchword index
	- presentation (split) catchword index portions
	- Stichwort
	- search term index generated from IPC
-->
<!ELEMENT CWSet (CW+)>

<!-- CW - a single catchword index 
Structure:
	either list of entries, each denoting an expression
	or list of letters that enclose the entries (used in IPC publication unterface only)
Notes:
	1. in master file only list of entries appear
	2. the order of entries follows alphabetic order computed with a specific algorithm that follows prereform editions and typical usage
Attributes:
	lang (mandatory): language of indications in this index
	TRANSLATIONLANG (optional): obsolete (language of the secondary language)
Note:
	used in bilingual indexes only, not in master files

	edition (mandatory): edition of IPC the catchword index belongs to

	type (optional, free text): denotes the type of the catchword index,
	Typical values:
		empty: in master files, denoting IPC official catchword index
	   	CW: explicit value for catchword indexes 
		SW: Stichwort
		reverse IPC: catchword index generated from IPC
	letter (optional, single character): capital letter in case of selections
	Note:	
		in master files: empty

Attributes used in IPC publication interface only
Note:
	these attributes are empty or ommitted in the master files

	CW: a sequence number of the document;  the XML file is called: type edition lang _ lowercase(letter) (CW) .xml
	FROMBEGIN: first entry of the preceding page; empty when == FROMBEGINID
	FROMBEGINID: id of first entry of the preceding page
	FROMEND: last entry of the preceding page; empty when == FROMENDID
	FROMENDID: id of last entry of the preceding page
	TOBEGIN: first entry of the subsequent page; empty when == TOBEGINID
	TOBEGINID: id of first entry of the subsequent page
	TOEND: last entry of the preceding page; empty when == TOENDID
	TOENDID: id of last entry of the subsequent page
	PURPOSE: purpose of the file
	documentRoot: root to allow on-the-fly linking of stylesheet
-->
<!ELEMENT CW (CWEntry+|CWLetter+)>
<!ATTLIST CW
	lang		CDATA	#REQUIRED
	TRANSLATIONLANG	CDATA	#IMPLIED
	edition		CDATA	#REQUIRED
	type		CDATA	#IMPLIED
	view	CDATA	#IMPLIED
	displaymode	CDATA	#IMPLIED
	letter		CDATA	#IMPLIED
	CW 		CDATA	#IMPLIED
	FROMBEGIN	CDATA	""
	FROMBEGINID	CDATA	#IMPLIED
	FROMEND	CDATA	""
	FROMENDID	CDATA	#IMPLIED
	TOBEGIN	CDATA	""
	TOBEGINID	CDATA	#IMPLIED
	TOEND	CDATA	""
	TOENDID	CDATA	#IMPLIED
	PURPOSE	CDATA	#IMPLIED
	documentRoot	CDATA	""
>

<!-- CWLetter - a single letter that encloses the entries starting with the given letter 
Note:
	used in IPC publication unterface only
Structure:
	sequence of entry intervals, each enclosing a few number of entries
Attributes:
	letter (optional): the letter with which enclosed entries start
-->

<!ELEMENT CWLetter (CWEntryInterval+)>
<!ATTLIST CWLetter
	letter	CDATA	#IMPLIED
>


<!-- CWEntryInterval - a contiguous sequence of a few number of entries in the sort order 
Note:
	used in IPC publication unterface only
Structure:
	sequence of entry intervals, each enclosing a few number of entries
Attributes:
	en	obsolete or unused, English counterpart
-->
<!ELEMENT CWEntryInterval (CWEntry+)>
<!ATTLIST CWEntryInterval
	en	CDATA	#IMPLIED
>


<!--  CWEntry - recursive structure containing tree of entries 
Note:
	in official catchword index: 3 levels 
	in other type of catchwords: may be variable depth
Structure:
	sequence of
		CWIndication (mandatory): indication of the entry (the text itself, with a little markup)
		CWSee (optional):  see also clause, defining related catchword entries,
		list of CWEntry elements (maybe empty): catchword entries, with narrower or different meaning than that covered by the indication
		CWReferences (optional): references related to the indication  (a very broad CWentry has no specified reference)
Attributes
		id: identifier (number) of the entry, non-meaningful unique identifier

Attributes used in editing/publication environment:
		xmlId: XML identifier and sort key
		rn: obsolete
		remark: free text comment
-->
<!ELEMENT CWEntry (CWIndication,CWSee?,CWReferences? ,CWEntry*)>
<!ATTLIST CWEntry
	id	CDATA	#IMPLIED
	rn	CDATA	#IMPLIED
	xmlId	CDATA	#IMPLIED
	remark	CDATA	#IMPLIED
>

<!--  CWIndication - indication of the catchword, the text of the entry
Structure:
	mixed content model, with character markup and special characters
		sub: subscript
		ldash: long dash
		larrow: arrow pointing to left
		rarrow: pointing to right
-->
<!ELEMENT CWIndication  (#PCDATA|sub|ldash|larrow|rarrow)*>

<!--  CWSee - see also references
Structure:
	mixed content model, with catchword reference, character markup and special characters
		CWRef: reference to a single catchword entry
		sub: subscript
		ldash: long dash
-->
<!ELEMENT CWSee (#PCDATA|sub|ldash|CWRef)*>

<!--  CWRef - reference to another catchword entry
Structure:
	character sequence
Attributes:
	REFID (mandatory) identifier to which the reference refers
Attributes used in editing environment only (not used in master files)
	SEQUENCE: order of the reference
-->
<!ELEMENT CWRef (#PCDATA)>
<!ATTLIST CWRef
	REFID	CDATA	#REQUIRED
	SEQUENCE	CDATA	#IMPLIED
>


<!--  CWReferences - references to IPC symbols or intervals
Structure:
	list of: single or multiple references (non-empty): the actual references related to a catchword
-->
<!ELEMENT CWReferences (sref|mref)+>


<!--  sref - single reference
Attributes:
	ref:	IPC symbol in A99AZZZMGGZZZZ format
	refType: compatibility with prereform, / or :
	asterisk (restricted values) denoting the presence of an asterisk after the reference
	Possible values
		Y: there must be an asterisk provided in the presentation
		N: no asterisk
	style: value to designate specificity of the reference
	Possible values in master files:
		advanced: the reference points to an advanced level entry (to be rolled up to core level when presenting core-level catchword)
		deleteadvanced: intermediate state between revision periods to designate that the actual reference is not anymore valid

Attributes used in publication environment:
	reference level: c(ore) a(advanced), default: core
		references are rolled up in the core publication
	refAdvanced: in core level publications, the non-rolled-up reference in the advanced level
-->

<!ELEMENT sref EMPTY>
<!ATTLIST sref
	ref		CDATA	#REQUIRED
	refType		CDATA	"/"
	refLevel	(c|i|a)		'c'
	style		CDATA 	#IMPLIED
	refAdvanced	CDATA	#IMPLIED
	asterisk	(Y|N) #IMPLIED
>
<!--  mref -  interval references to IPC symbols
Attributes:
	ref:	IPC symbol in A99AZZZMGGZZZZ format
	endRef:	end of reference interval IPC symbol in A99AZZZMGGZZZZ format
	refType: compatibility with prereform, / or :
	endRefType: type of the end of reference type
	asterisk (restricted values) denoting the presence of an asterisk after the reference
	Possible values
		Y: there must be an asterisk provided in the presentation
		N: no asterisk
	style: value to designate specificity of the reference
	Possible values in master files:
		advanced: the reference points to an advanced level entry (to be rolled up to core level when presenting core-level catchword)
		deleteadvanced: intermediate state between revision periods to designate that the actual reference is not anymore valid

Attributes used in publication environment:
	reference level: c(ore) a(advanced), default: core
		references are rolled up in the core publication
	refAdvanced: in core level publications, the non-rolled-up reference in the advanced level
	endRefAdvanced: in core level publications, the non-rolled-up value of the endRef attribute in the advanced level
-->
<!ELEMENT mref EMPTY>
<!ATTLIST mref
	ref		CDATA		#REQUIRED
	endRef		CDATA	#REQUIRED
	refType		CDATA	"/"
	endRefType	CDATA	"/"
	refLevel	(c|i|a)		'c'
	endRefLevel	(c|i|a)		'c'
	style		CDATA 	#IMPLIED
	endStyle	CDATA 	#IMPLIED
	refAdvanced	CDATA	#IMPLIED
	endRefAdvanced	CDATA	#IMPLIED
	asterisk	(Y|N) #IMPLIED
>

<!-- sub - subscript markup
Structure:
	character sequence
-->
<!ELEMENT sub (#PCDATA)>

<!-- larrow - special character, arrow pointing to the left -->
<!ELEMENT larrow EMPTY>

<!-- rarrow - special character, arrow pointing to the right -->
<!ELEMENT rarrow EMPTY>

<!-- oe, OE - obsolete fo French files -->
<!ELEMENT oe EMPTY>
<!ELEMENT OE EMPTY>

<!-- ldash - special character, long dash -->
<!ELEMENT ldash EMPTY>
