<!--  ENTITIES -->

<!ENTITY % chars 'nbsp|llinkt|rlinkt|tbond|larrow|rarrow|llinkthree|dbond|regist|ge|le|gt|lt|degree|alpha|symbol|beta|omega|tm|cr|oe|OE|ldash|emdash|endash'>
<!ENTITY % modificationmarkup 'textnew|textdel|firstWord|first3Word|lastWord|last3Word|bar'>

<!--  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

    RIPCIS OUTPUT

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  -->


<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    COMPILATION FILE
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  -->

<!--  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ROOT ELEMENT: ipcEntriesList
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  -->

<!--
Element
    ipcEntriesList - root element
Structure
    list of ipcEntries elements
    a compilation file may contain compilations of more versions, levels, languages and displayModes, called "chapters"
    these chapters are represented by the ipcEntries element.
Attributes
    none
-->
<!ELEMENT ipcEntriesList (ipcEntries*)>


<!--  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
<!-- 
Element
    ipcEntries - list of ipcEntry elements
Structure
    "flat" list of ipcEntry elements 
        (flat means: ipcEntry elements are not embedded into each other,
        i.e. section/class/subclass/maingroup/dot 1 etc. hierarchy is not reflected by the
        inclusion of ipcEntry elements)
Attributes
    ipcSymbol
        selection of a certain subset or all symbols,
        possible values:
            all: all affected symbols
        comment: no other values are used.

    displayMode: computation mode of the compilation file 
        possible value:
            compiled    comparison between previous and actual text is presented
        comment: no other values are used at this moment; 
                future possible values: 
                "full"     no interpretation elements (textnew,textdel)

    edition: IPC version, in format YYYYMMDD
        the target version, to which the former version is compared
        former version is determined by the ipcLevel attribute

    ipcLevel: level of IPC for which the compilation was made
        possible values:
        a: advanced level view of IPC
        c: core level view of IPC

        The previous version, to which comparison is made, is:
        in case ipcLevel='a',
            the last advanced level version published before the version coded in edition attribute
        in case ipcLevel='c'
            the last core level version published before the edition coded in edition attribute
                
        The ipcEntry elements within the ipcEntries list, are:
        in case ipcLevel='a'
            modified core or advanced elements between the previous version and the version coded in edition attribute
            as they are published in the core level
        in case ipcLevel='c'
            modified core elements between the previous version and the version coded in edition attribute
            as they are published in the advanced level

    lang: language of this chapter, 
        possible values, but not restricted to this list:
            EN
            FR

    documentRoot: optional, rendering information
        possible values: ""
-->
<!ELEMENT ipcEntries (ipcEntry*)>
<!ATTLIST ipcEntries
    ipcSymbol    CDATA    #IMPLIED
    displayMode  CDATA    #IMPLIED
    edition      CDATA    #IMPLIED
    ipcLevel     CDATA    #IMPLIED
    lang         CDATA    #IMPLIED
    documentRoot CDATA    ""
>

<!--  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
<!--
Element
    ipcEntry - a "flat" IPC Entry
Structure
    ipcEntry may contain, in general:
    1. various textual elements, i.e. content reflecting the changes
        e.g. (list is exhaustive on current compilation files)
        - textBody: for new and deleted entries
        - title: for modified entries
        - flatNotes: modified notes, with non-embedded note structures

    2. amendment element(s), that documents the revision-specific details,
    i.e. the changes made to the entry since the start of the revision period.

    ipcEntry is not embedded into its hierarchy as reflected in the scheme,
    so the ipcEntry-es are flat.

Attributes:
    entryType:   K(lassifying), I(ndexing), D(double) (IPCR_SCHEME)
    ipcLevel:    C(ore), A(dvanced)
        C:  in case the embedding ipcEntries is ipcLevel='a':
            the advanced level version of the entry, which is or is planned to be a valid core level entry
            during revision a new entry marked with ipcLevel='C' is not a valid core entry
            in case the embedding ipcEntries is ipcLevel='c'
            the core level version of the entry, which is a core level entry
        A:  the entry is an advanced level entry

        Other attributes are not used and kept for compatibility to former versions or for later developments.

    kind:
        s(ection)
        t(itle: subsection title)
        c(lass)
        (s)u(bclass)
        g(uidance header)
        m(ain group)
        1-B (dot group, 1 to 11 dots)
        d(eleted)
        (subclass) i(ndex)
        n(ote)

    symbol:    symbol or start of scope for notes and guide headings,
                in format A99AZZZMGGZZZZ (zero padded, 4 digit for main group, 6 digits for group)
    endSymbol: end of scope, in case of note, guide heading and deleted
    coreOfEntry:    symbol of associated core entry in the edition to which the entry belongs
                in format A99AZZZMGGZZZZ (zero padded, 4 digit for main group, 6 digits for group)
    renumberedFrom: symbol from which renumbered (RIPCIS only)
                in format A99AZZZMGGZZZZ (zero padded, 4 digit for main group, 6 digits for group)
    isDead: Y when the text of the entry is deleted by an amendment
            for non-structure entries: remove the entry from the translation
            for structured entries: the entry is removed from the core or the modifications related to the actual level are not submitted for publication
    amendmentType: type of the latest amendment
            Modification of structured entries
            n          new structured entry
            m          m-type (minor) modification of a structured entry
            c          c-type (considerable) complex modification of a structured entry
            s          structure modification of a group (implies c-type modification)
            e          entry type modification (i.e. indexing to classifying or vice versa)
            u          unchanged structured entry
            p          change priority of a structured entry
            c          core to advanced or advanced to core modification
            r          renumber (i.e. change symbol before publication)
            d          delete structured entry
            Modifications of unstructured entries
            N          new unstructured entry
            E          unstructured entry modification
            M          move unstructured entry (i.e. changing the scope of the entry)
            D          delete unstructured entry
            Undoing decisions
            0          restore to original (undelete or undoing modifications)
            1          undo a deletion
            2          delete new entry
    priorityOrder: secondary sort key (number)
    source: in output files, the source file from which the actual file was generated
    edition: comma-separated list of versions (aka editions) 
        the editions are dates, in YYYYMMDD format
-->
<!ELEMENT ipcEntry ((title|textBody|flatNotes),amendment*)>
<!ATTLIST ipcEntry
    symbol         CDATA           #REQUIRED
    endSymbol      CDATA           #IMPLIED
    entryType      (c|i|d|n|I|K|D) 'c'
    ipcLevel       (c|i|a|C|O|A)   'c'
    lang           (EN|FR|EF)      #IMPLIED
    coreOfEntry    CDATA           #IMPLIED
    kind           (s|t|c|u|g|m|1|2|3|4|5|6|7|8|9|A|B|d|i|n|l) #IMPLIED
    isRenumbered   (Y|N)    'N'
    isDead         (Y|N)    'N'
    renumberedFrom CDATA    #IMPLIED
    edition        CDATA    #IMPLIED
    priorityOrder  CDATA    #IMPLIED
    amendmentType  CDATA    #IMPLIED
    amendmentState CDATA    #IMPLIED
    remark         CDATA    #IMPLIED
    version        CDATA    #IMPLIED
>


<!--  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
<!--
Element
    flatNotes -    non-embedded (flat) version of a note or index ipcEntry
Structure
    sequence of flatNote elements, each reflecting one paragraph
    it is not mandatory that all paragraphs are present in the compilation file
    from the original or new note
Attributes
    mode    computation mode of note
            possible values:
            full    the complete note is presented
            further values:
                subject of future changes, e.g. "compact" notes
    type    type of the note, to distinguish "index" comparisons from "note" comparisons
            
            default value: empty, with meaning of "note"
            possible value:
                index    the entry contains a compared index
-->
<!ELEMENT flatNotes    (flatNote*)>
<!ATTLIST flatNotes
    mode CDATA    #IMPLIED
    type CDATA    #IMPLIED
>



<!--  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
<!--  
Element
    textBody - various body part of the text of an entry
Structure:
    (note|index|deleted|title)
    i.e. one of note, index, deleted or title
        note: for kind='n'
        index: for kind='i'
        deleted: for kind='d'
        title: for all other cases, including guidance heading and subsection titles
-->
<!ELEMENT textBody (note|index|deleted|title)>

<!--  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
<!--
Element:  
    deleted - body of a deleted entry
Structure:
    (transferredTo?,coveredBy?)
    i.e. tupple of transferredTo and coveredBy
Comment:
    both optional to allow deletion of elements
    RIPCIS: 'delete' is an amendment type and 'deleted' is the result (in normal case)
    of a 'delete' amendment
-->
<!ELEMENT deleted (transferredTo?,coveredBy?)>


<!--  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
<!--
Element
    transferredTo - "transferred to" list
Structure:
    (sref|mref)+
    i.e. list of mrefs or srefs (multiple or single references)
-->
<!ELEMENT transferredTo (sref|mref)+>


<!--  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
<!--
Element:  
    coveredBy - "covered by" list
Structure:
    (sref|mref)+
        i.e. list of mrefs or srefs (multiple or single references)
-->
<!ELEMENT coveredBy     (sref|mref)+>

<!--  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
<!--
Element
    note - body for a note
Structure:
    (noteParagraph)+
        i.e. list of noteParagraphs that may embed subnote elements
Attributes:
    type: type of prefix;
        e.g. Roman is like I, Alpha: A. (seldom used)
    indent: indentation depth (if not automatic)
        optional, default: "", meaning: normal embedding level
        unused in current compilation files
-->

<!ELEMENT note (noteParagraph)+>
<!ATTLIST note
    type      (none|table|number|Roman|roman|Alpha|alpha)    'none'
    indent    CDATA    #IMPLIED
>

<!--  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
<!--  
Element
    noteParagraph - text of a single paragraph and its subparagraphs
Structure: 
    ((text,subnote?,orphan?)|(references,text))
        two independent cases:
        textual paragraph:
            text: contains the text itself
            subnote: sequence of subparagraphs
            orphan: a subparagraph that falls out of the subparagraph sequence (non-prefixed)
        table:
            references: list of references
            text: text associated to references
Attributes:
    edition: each single paragraph has an edition attribute,
        that may be different from the attribute of the embedding ipcEntry
-->

<!ELEMENT noteParagraph ((text,subnote?,orphan?)|(references,text))>
<!ATTLIST noteParagraph
    edition        CDATA    #IMPLIED
>


<!--  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
<!--
Element  
    orphan - out-of-sequence subparagraph
Structure: 
    (text,subnote?,orphan?)
    i.e.
        tupple of text, optional subnote and optional orphan
        text: text of paragraph
        optional sequence of subnotes: when a new sequence of subparagraphs starts under the orphan
        orphan: an optional further orphan that closes the subparagraph sequence
Attributes:
    indent: presentation indentation when irregular
    edition: an orphan may have an edition mark in []-s
-->
<!ELEMENT orphan (text,subnote?,orphan?)>
<!ATTLIST orphan
    indent    CDATA    #IMPLIED
    edition   CDATA    #IMPLIED
>

<!--  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
<!--
Element  
    subnote - sequence of noteParagraphs
Structure:
    used to embed sequence of subparagraphs of a noteParagraph
    (noteParagraph+)
        i.e. list of noteParagraph elements
Attributes: as note
-->
<!ELEMENT subnote (noteParagraph+)>
<!ATTLIST subnote
    type      (none|table|number|Roman|roman|Alpha|alpha|bullet)    'none'
    indent    CDATA    #IMPLIED
>


<!--  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
<!--
Element  
    index: body of subclass, class and subsection indexes
Structure:
    (indexEntry+)
        i.e. list of indexEntry elements (that may include further indexEntries
Comment:
    indexEntries on the 0th depth are those in full capitals
-->
<!ELEMENT index (indexEntry+)>

<!--  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
<!--
Element  
    indexEntry - one paragraph of an index
Structure:
    (text,references?,indexEntry*)
        i.e.
        a text, associated references and contained indexEntries
        references are optional
Comment:
    at leaves references should not be empty
-->
<!ELEMENT indexEntry (text,references?,indexEntry*)>



<!--  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
<!--
Element
    title - body of structured elements as described in Guide: multipart title
Structure:
    (#PCDATA|titlePart|%modificationmarkup;|%modificationmarkup;|u|sup|sub|img|mref|sref|%chars;)*
    where modificationmarkup is one of
        textnew
        textdel
        firstWord
        first3Word
        lastWord
        last3Word
        bar
    i.e.
        either list of titlePart elements (those separated by ';' in scheme presentation)
        or text (including special characters) with modification markup
-->

<!ELEMENT title (#PCDATA|titlePart|%modificationmarkup;|u|sup|sub|img|mref|sref|%chars;)*>


<!--  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
<!--
Element  
    titlePart - text and associated references with texts
Structure:
    (text,entryReference*)
        i.e. tupple of text and list of entryReferences
Comment:
    the entryReferences, if any, are put into parentheses
    and separated by ';'-s
-->
<!ELEMENT titlePart (text,entryReference*)>


<!--  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
<!--
Element
    entryReference - text with layout and references
Structure:
    (#PCDATA|%modificationmarkup;|u|sup|sub|img|mref|sref|%chars;)*)
        where modificationmarkup is one of
            textnew
            textdel
            firstWord
            first3Word
            lastWord
            last3Word
            bar
        i.e. PCDATA, modification markup and special characters,
        marked up with underline, super/subscript, image, references
Comment:
    usual format: text,references+
     however simplification was required, e.g.  'takes precedence' clause is reverse order
-->
<!ELEMENT entryReference (#PCDATA|%modificationmarkup;|u|sup|sub|img|mref|sref|%chars;)*>


<!--  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
<!--
Element:  
    references - list of references with separators,
         used in notes and indexes
Structure:
    (#PCDATA|%modificationmarkup;|mref|sref|%chars;)*)
        where modificationmarkup is one of
            textnew
            textdel
            firstWord
            first3Word
            lastWord
            last3Word
            bar
        i.e. PCDATA, modification markup and references
-->
<!ELEMENT references (#PCDATA|%modificationmarkup;|mref|sref|%chars;)*>


<!--  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    COMMON
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  -->

<!--
Element  
    text - marked-up text 
Structure:
    (#PCDATA|%modificationmarkup;|u|sup|sub|img|mref|sref|%chars;)*)
        where modificationmarkup is one of
            textnew
            textdel
            firstWord
            first3Word
            lastWord
            last3Word
            bar
        i.e. PCDATA, modification markup and special characters,
        marked up with underline, super/subscript, image, references
-->
<!ELEMENT text (#PCDATA|%modificationmarkup;|u|sup|sub|img|mref|sref|%chars;)*>

<!--
Element  
    sref, mref - 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
    reference level: c(ore) a(advanced), default: core
        references are rolled up in the core publication
    refAdvanced: non-rolled-up reference
    endRefAdvanced: non-rolled-up reference of the end of interval
-->

<!ELEMENT sref EMPTY>
<!ATTLIST sref
    ref         CDATA    #REQUIRED
    refType     CDATA    "/"
    refLevel    (c|i|a)  'c'
    refAdvanced CDATA    #IMPLIED
>
<!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'
    refAdvanced    CDATA    #IMPLIED
    endRefAdvanced CDATA    #IMPLIED
>


<!--  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
<!--  
Elements
    character markup elements
Comment:
    embedding not allowed for simplicity reasons
-->

<!ELEMENT sub (#PCDATA|%chars;)*>
<!ELEMENT sup (#PCDATA|%chars;)*>
<!ELEMENT u   (#PCDATA|sub|sup|%chars;|sref|mref|%modificationmarkup;)*>
<!ELEMENT img  EMPTY>
<!ATTLIST img src CDATA #REQUIRED>
<!--  SPECIAL CHARACTERS -->
<!ELEMENT nbsp   EMPTY>
<!ELEMENT llinkt EMPTY>
<!ELEMENT rlinkt EMPTY>
<!ELEMENT tbond  EMPTY>
<!ELEMENT larrow EMPTY>
<!ELEMENT rarrow     EMPTY>
<!ELEMENT llinkthree EMPTY>
<!ELEMENT rlinkthree EMPTY>
<!ELEMENT dbond      EMPTY>
<!ELEMENT regist     EMPTY>
<!ELEMENT ge     EMPTY>
<!ELEMENT le     EMPTY>
<!ELEMENT gt     EMPTY>
<!ELEMENT lt     EMPTY>
<!ELEMENT degree EMPTY>
<!ELEMENT alpha  EMPTY>
<!ELEMENT symbol EMPTY>
<!ATTLIST symbol character CDATA #REQUIRED>
<!ELEMENT beta   EMPTY>
<!ELEMENT omega  EMPTY>
<!ELEMENT tm     EMPTY>
<!ELEMENT cr     EMPTY>
<!ELEMENT oe     EMPTY>
<!ELEMENT OE     EMPTY>
<!ELEMENT ldash  EMPTY>
<!ELEMENT emdash EMPTY>
<!ELEMENT endash EMPTY>

<!--  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ELEMENTS RELATED TO REVISION
The elements below are used to track the revision work.
These elements are not document in detail.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
<!ELEMENT amendment (
            unchanged
            |structure
            |core-advanced
            |entry-type
            |delete
            |new
            |modify
            |deleteunstructured
            |modifyunstructured
            |newunstructured
            |moveunstructured
            |renumber
            |priority
            |deletenew
            |undelete
            |restore
            )?>



<!ATTLIST amendment
    sessionDecided    CDATA    #IMPLIED
    isGenerated      (Y|N)    "N"
    decision         (withdraw|reject|approve|questionWithApproval|noDecide|question|adopt|sendbackToWG|sendbackToSC|publish|original|submit) #IMPLIED
    state            (WGproposed|WGapproved|WGrejected|WGpending|WGquestions|WGapprovedwithquestions|
                      CEproposed|CEadopted|CErejected|CEpending|CEquestions|CEadoptedwithquestions|
                      SCproposed|SCadopted|SCrejected|SCpending|SCquestions|SCadoptedwithquestions|
                      IBproposed|IBadopted|IBpublished|IBoriginal) #IMPLIED
    isCType         (Y|N)           "N"
    orderInProposal CDATA           #IMPLIED
    coreOfEntry     CDATA           #IMPLIED
    remark          CDATA           #IMPLIED
    lang            (EN|FR|EF)      #REQUIRED
    projectType     (D|M|C|H|T|R|S) #IMPLIED
    projectNumber   CDATA           #IMPLIED
    project         CDATA           #IMPLIED
    amendmentState  CDATA           #IMPLIED
    ipcLevel        (c|b|a)         #REQUIRED
    errorText       CDATA           #IMPLIED
    errorSeverity   CDATA           #IMPLIED
>
<!-- sessionDecided: which session made the decision
     generated: for tracking sent-back and automatically generated amendments
     decision: what was the decision of the session?
    simplification of the real state stored in the database
-->

<!-- STRUCTURED entry operations -->
<!-- unchanged amendment, for an interval -->
<!ELEMENT unchanged EMPTY>
<!ATTLIST unchanged
    symbol    CDATA    #REQUIRED
    endSymbol CDATA    #IMPLIED
    kind      CDATA    #IMPLIED
>
<!-- structure modification -->
<!ELEMENT structure EMPTY>
<!ATTLIST structure
    symbol        CDATA    #REQUIRED
    endSymbol     CDATA    #IMPLIED
    relativeDotNo CDATA    #REQUIRED
>
<!-- core->advanced or advanced->core  modification -->
<!ELEMENT core-advanced EMPTY>
<!ATTLIST core-advanced
    symbol    CDATA    #REQUIRED
    endSymbol CDATA    #IMPLIED
    ipcLevel  (c|a)    #REQUIRED
    kind      CDATA    #IMPLIED
>
<!-- 'entry type' modification -->
<!ELEMENT entry-type EMPTY>
<!ATTLIST entry-type
    symbol        CDATA      #REQUIRED
    endSymbol     CDATA      #IMPLIED
    entryType     (c|i|d)    #REQUIRED
>
<!-- 'delete' amendment
    pls. note: 'deleted' is the IPC entry or interval that has been deleted!
-->
<!ELEMENT delete (transferredTo?,coveredBy?)>
<!ATTLIST delete
    symbol    CDATA    #REQUIRED
    endSymbol CDATA    #IMPLIED
>
<!-- 'new' amendment -->
<!ELEMENT new (title)>
<!ATTLIST new
    symbol    CDATA     #REQUIRED
    entryType (c|i|d|n) "c"
    ipcLevel  (c|a)     "c"
    kind      CDATA     #REQUIRED
>
<!-- entryType, ipcLevel: see at ipcEntry -->
<!-- modify: text or complex modification -->
<!ELEMENT modify (title)>
<!ATTLIST modify
    symbol       CDATA     #REQUIRED
    entryType    (c|i|d|n) #IMPLIED
    ipcLevel     (c|a)     #IMPLIED
    kind          CDATA    #IMPLIED
    priorityOrder CDATA    #IMPLIED
>
<!-- type, ipcLevel: see at ipcEntry -->
<!-- delete unstructured -->
<!ELEMENT deleteunstructured EMPTY>
<!ATTLIST deleteunstructured
    symbol    CDATA    #REQUIRED
    endSymbol CDATA    #IMPLIED
    kind      CDATA    #REQUIRED
>
<!ELEMENT newunstructured (index|note|title)>
<!ATTLIST newunstructured
    symbol    CDATA    #REQUIRED
    endSymbol CDATA    #IMPLIED
    kind      CDATA    #REQUIRED
    ipcLevel  (c|a)    "c"
>
<!ELEMENT modifyunstructured (index|note|title)>
<!ATTLIST modifyunstructured
    symbol      CDATA    #REQUIRED
    endSymbol   CDATA    #IMPLIED
    kind        CDATA    #REQUIRED
    ipcLevel    (c|a)    #IMPLIED
    toSymbol    CDATA    #IMPLIED
    endToSymbol CDATA    #IMPLIED
>
<!ELEMENT moveunstructured EMPTY>
<!ATTLIST moveunstructured
    symbol      CDATA    #REQUIRED
    endSymbol   CDATA    #IMPLIED
    kind        CDATA    #REQUIRED
    ipcLevel    (c|a)    #IMPLIED
    toSymbol    CDATA    #IMPLIED
    endToSymbol CDATA    #IMPLIED
>
<!-- RENUMBER and PRIORITY operations -->
<!ELEMENT renumber EMPTY>
<!ATTLIST renumber
    symbol      CDATA     #REQUIRED
    endSymbol   CDATA    ""
    toSymbol    CDATA     #REQUIRED
    endToSymbol CDATA    ""
>
<!ELEMENT priority EMPTY>
<!ATTLIST priority
    symbol        CDATA     #REQUIRED
    priorityOrder CDATA     #REQUIRED
>
<!-- UNDO operations -->
<!ELEMENT deletenew EMPTY>
<!ATTLIST deletenew
    symbol    CDATA    #REQUIRED
    endSymbol CDATA    #IMPLIED
    kind      CDATA    #IMPLIED
>
<!ELEMENT undelete EMPTY>
<!ATTLIST undelete
    symbol    CDATA    #REQUIRED
    endSymbol CDATA    #IMPLIED
    kind      CDATA    #IMPLIED
>
<!ELEMENT restore EMPTY>
<!ATTLIST restore
    symbol    CDATA    #REQUIRED
    endSymbol CDATA    #IMPLIED
    kind      CDATA    #IMPLIED
>

<!--  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
    Element for content comparison
 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->

<!--
Element
    flatNote - non-embedded representation of a modified note paragraph
Structure
    (text)
        i.e. PCDATA, modification markup and special characters,
        marked up with underline, super/subscript, image, references

Attributes:

    - - - - - - - - - - - - - - -
    General attribute
    notetype    way of modification of the paragraph
            possible values
            empty or omitted: the paragraph was not changed
            deleted  the paragraph was deleted
            new      the paragraph is a new note paragraph
            modified the paragraph is a modified paragraph

    - - - - - - - - - - - - - - -
    Content-like attributes
        
    edition        actual edition attribute

    new-edition    new edition number (unused now)

    del-edition    deleted edition number (unused now)

    mod-edition    the edition number has been modified (unused now)

    - - - - - - - - - - - - - - -
    Identification attributes

    parentId    identifier of the "parent" flat note paragraph (i.e. the one which corresponds to the note paragraph in the original note)

    id          internal identifier of the flat note paragraph

    myid        internal readable identifier, presentation element, separated by '.', reflecting the prefixes of the ancestors and prefix of the current paragraph
                possible values if the various parts
            ""    no prefix
            "[0-9]none"   none
            "[0-9]number"   numbered paragraph 
            "[0-9]bullet" bulleted paragraph        

    num         sequence number of the element in the original paragraph


    newnum      sequence number of the element in the amended paragraph

    to          if present: this paragraph became another paragraph due to move,
                to attribute designates to where it has been moved


    - - - - - - - - - - - - - - -
    Attributes driving presentation

    type        type of the prefix of the paragraph
        possible values:
            (none|table|number|Roman|roman|Alpha|alpha)

    Orphan        when 1, the paragraph is an orphan

    indent        indentation depth
        possible values: positive integer number

    indentChange  change of the indentation 
        possible values: positive or negative integer number
        comment: not present in current compilation files

    listtypechangedfrom  the type of list of this entry has been modified from this type
        possible values: see type attribute

    listtypechangedto    the type of list of this entry has been modified to this type
        possible values: see type attribute

    - - - - - - - - - - - - - - -
    Command attributes for output of sequence of paragraphs 

    outTypeKind    describes which part of the entry to be presented
        possible values
            empty or attribute ommitted (default): general presentation
            first3    no changes after the first 3 words or this flat note is first of a sequence of non-modified paragraphs
            last3    no changes before the last 3 words or this flat note is last of a sequence of non-modified paragraphs
            first1last1 this paragraph is not modified but preceding and following is modified
    outTypeModeo    unmodified sequence open attribute
        when 1: opening of a sequence of non-modified note paragraphs
    outTypeModec    unmodified sequence close attribute
        when 1: closing of a sequence of non-modified note paragraphs
    outType            is this entry modified or first/last element of unmodified sequence
        when 1:    either the entry is modified or first/last element of an unmodified note paragraph sequence
        drives presentation in compact mode

-->    

<!ELEMENT flatNote (text|bar|references)*>
<!ATTLIST flatNote
    parentId            CDATA    #IMPLIED
    id                  CDATA    #IMPLIED
    myid                CDATA    #IMPLIED
    type                CDATA    #IMPLIED
    num                 CDATA    #IMPLIED
    indent              CDATA    #IMPLIED
    outTypeModec        CDATA    #IMPLIED
    outType             CDATA    #IMPLIED
    outTypeKind         CDATA    #IMPLIED
    notetype            CDATA    #IMPLIED
    outTypeModeo        CDATA    #IMPLIED
    newnum              CDATA    #IMPLIED
    edition             CDATA    #IMPLIED
    to                  CDATA    #IMPLIED
    Orphan              CDATA    #IMPLIED
    indentChange        CDATA    #IMPLIED
    listtypechangedto   CDATA    #IMPLIED
    listtypechangedfrom CDATA    #IMPLIED
    new-edition         CDATA    #IMPLIED
    del-edition         CDATA    #IMPLIED
    mod-edition         CDATA    #IMPLIED
>

<!--
Elements
    firstWord   - position markup after the first word
    first3Word  - position markup after the 3rd word
    last3Word   - position markup before the 3rd last word
    lastWord    - position markup before the last word
    bar         - position markup separating text from references in indexes and table-like notes
Structure
    EMPTY
Comment
    these elements are used to provide a compact presentation of the notes
-->

<!ELEMENT last3Word  EMPTY>
<!ELEMENT lastWord   EMPTY>
<!ELEMENT firstWord  EMPTY>
<!ELEMENT bar        EMPTY>
<!ELEMENT first3Word EMPTY>

<!--
Element
    textnew    - embedded text is added in the new ipcEntry in comparison to the previous edition
Structure
    (#PCDATA|u|sup|sub|img|mref|sref|%chars;)*)
-->
<!ELEMENT textnew    (#PCDATA|%modificationmarkup;|u|sup|sub|img|mref|sref|%chars;)*>
<!--
Element
    textdel - embedded text is deleted in the new ipcEntry in comparison to the previous edition
Structure
    (#PCDATA|u|sup|sub|img|mref|sref|%chars;)*)
-->
<!ELEMENT textdel    (#PCDATA|%modificationmarkup;|u|sup|sub|img|mref|sref|%chars;)*>

