<?xml version="1.0" encoding="UTF-8"?>

<!-- Set the following entities as follows:

For the EP-register data: EPO=INCLUDE NOTEPO=IGNORE
For the WIPO-register data: EPO=IGNORE NOTEPO=INCLUDE

  TO DO: Implement conditional DTD
  QUESTION: WIPO standard agreed - keep structure even if data not used ?
  QUESTION: logic of change information attributes some at top element other under top element ?
-->

<!ENTITY % EPO "IGNORE">
<!ENTITY % NOTEPO "INCLUDE">

<!ENTITY % name_group "((name  | 
  (prefix?, 
   (last-name  |  orgname), first-name?,  middle-name?, 
   first-last-name?,  second-last-name?,  suffix?, iid?, role?, orgname?, 
    department?, synonym*)), registered-number?)"> 

<!ENTITY % address_group "((address-1?, address-2?, address-3?, address-4?, address-5?, mailcode?, 
  pobox?, room?,  address-floor?, building?, street?, city?, county?, state?, 
  postcode?,  country) |  text)"> 

<!ENTITY % register_attributes
"	change-date											CDATA				#IMPLIED
	change-gazette-num							CDATA				#IMPLIED
	value-valid-for-publications    IDREFS			#IMPLIED">

	
<!--
********************************************************************************
	(ep-)register-DATA
  
  QUESTION: ep extensive use of id attribute : needed ?
********************************************************************************
-->

<!ELEMENT register-document (bibliographic-data, procedural-data*, events-data*,
			file-wrapper-data*)>
<!ATTLIST register-document
	xmlns CDATA #IMPLIED
	date-produced CDATA #IMPLIED
	dtd-version CDATA #IMPLIED
	file CDATA #IMPLIED
	lang CDATA #IMPLIED
	produced-by (applicant | RO | ISA | IPEA | IB | DO | EO) #REQUIRED
	ro CDATA #IMPLIED
	status CDATA #IMPLIED
	file-reference-id CDATA #IMPLIED
>

<!--
********************************************************************************
	ST.36 BIBLIOGRAPHIC DATA
	PFR pending for register attributes
	
	change-date											CDATA				#IMPLIED
	change-gazette-num							CDATA				#IMPLIED
	value-valid-for-publications    IDREFS			#IMPLIED
	
	All formatting tags have been cleaned-out. Although ST.36 compliant, 
  this DTD is therefore ONLY valid to send data and NOT to receive ST.36 
  compliant information as input to a system.
********************************************************************************

 QUESTION: is term-of-grant needed at bibliographic data level
-->
<!ELEMENT bibliographic-data
          (plain-language-designation*, publication-reference+, 
           classification-ipc*, classifications-ipcr*, 
           classification-national*, classification-locarno*, 
           classification-udc*, application-reference+, 
           language-of-filing*, language-of-publication*, priority-claims*, parties, 
           designation-of-states*, invention-title+, assignees*, 
           licensee-data*, date-of-earliest-priority*, 
           date-complete-specification-filed*, 
           dates-of-public-availability*, term-of-grant*, 
           dates-rights-effective?, patent-family*, field-of-search*, figures*, 
           references-cited*, examiners*, number-of-claims*, 
           related-documents?, st50-republication*, 
           date-exhibition-filed*, 
           date-pct-article-22-39-fulfilled*, 
           pct-application-no-longer-effective*, bio-deposit*, 
           pct-or-regional-filing-data*, 
           pct-or-regional-publishing-data*, 
           defer-publication-of-search-report*, 
           date-application-refused*, date-rights-reestablished*, 
           date-application-withdrawn-by-applicant*, 
           date-application-deemed-withdrawn*, date-of-revocation*, 
           cmea-havana-agreement*, 
           date-application-partially-withdrawn*, 
           office-specific-bib-data*, opposition-data*, text*,
           search-reports-information?)>
<!ATTLIST bibliographic-data
          country CDATA #IMPLIED
          id ID #IMPLIED
          lang CDATA #IMPLIED
          status CDATA #IMPLIED
>


<!-- TO DO: START NOT EPO -->
<!ELEMENT plain-language-designation
          (#PCDATA)>
<!ATTLIST plain-language-designation
          lang CDATA #IMPLIED
					%register_attributes;
>
<!-- END NOT EPO -->

<!ELEMENT publication-reference
          (document-id+)>
<!ATTLIST publication-reference
          id ID #IMPLIED
					%register_attributes;
>

<!ELEMENT document-id
          (country, doc-number, kind?, name?, date?)>
<!ATTLIST document-id
          lang CDATA #IMPLIED
          document-id-type CDATA #IMPLIED
>

<!ELEMENT country
          (#PCDATA)>

<!ELEMENT doc-number
          (#PCDATA)>

<!ELEMENT kind
          (#PCDATA)>

<!ELEMENT name
          (#PCDATA)>
<!ATTLIST name
          name-type (legal |  natural) #IMPLIED
          name-format ( as-filed | standardized ) #IMPLIED
>

<!ELEMENT date
          (#PCDATA)>

<!-- TO DO: EPO LIMIT to main-, further-classification and text -->
<!ELEMENT classification-ipc
          (edition, main-classification, further-classification*, 
           (additional-info | linked-indexing-code-group | 
            unlinked-indexing-code)*, text?)>
<!ATTLIST classification-ipc
          id ID #IMPLIED
					%register_attributes;
>

<!ELEMENT main-classification
          (#PCDATA)>

<!ELEMENT further-classification
          (#PCDATA)>
<!ATTLIST further-classification
          id ID #IMPLIED
          sequence CDATA #IMPLIED
>

<!ELEMENT text
          (#PCDATA)>
<!ATTLIST text
          lang CDATA #IMPLIED
					%register_attributes;
>

<!-- TO DO: START NOT EPO -->
<!ELEMENT edition
          (#PCDATA)>

<!ELEMENT additional-info
          (p+)>

<!ELEMENT p
          (#PCDATA)>
<!ATTLIST p
          id ID #IMPLIED
          num CDATA #REQUIRED
>

<!ELEMENT linked-indexing-code-group
          (main-linked-indexing-code, sub-linked-indexing-code+)>

<!ELEMENT main-linked-indexing-code
          (#PCDATA)>

<!ELEMENT sub-linked-indexing-code
          (#PCDATA)>

<!ELEMENT unlinked-indexing-code
          (#PCDATA)>

<!ELEMENT classifications-ipcr
          (classification-ipcr*)>
<!ATTLIST classifications-ipcr
          id ID #IMPLIED
					%register_attributes;
>

<!ELEMENT classification-ipcr
          ((ipc-version-indicator, classification-level?,section, 
            class, subclass, main-group?, subgroup?,symbol-position?, 
            classification-value?, action-date?, 
            generating-office?,classification-status?, 
            classification-data-source?) | text)>
<!ATTLIST classification-ipcr
          id ID #IMPLIED
          sequence CDATA #IMPLIED
>

<!ELEMENT section
          (#PCDATA)>

<!ELEMENT class
          (#PCDATA)>
<!ATTLIST class
          class-type CDATA #IMPLIED
>

<!ELEMENT subclass
          (#PCDATA)>

<!ELEMENT main-group
          (#PCDATA)>

<!ELEMENT subgroup
          (#PCDATA)>

<!ELEMENT ipc-version-indicator
          (date)>

<!ELEMENT classification-level
          (#PCDATA)>

<!ELEMENT symbol-position
          (#PCDATA)>

<!ELEMENT classification-value
          (#PCDATA)>

<!ELEMENT action-date
          (date)>

<!ELEMENT classification-status
          (#PCDATA)>

<!ELEMENT classification-data-source
          (#PCDATA)>

<!ELEMENT generating-office
          (country)>

<!ELEMENT classification-national
          (country, edition?, main-classification, 
           further-classification*, 
           (additional-info | linked-indexing-code-group | 
            unlinked-indexing-code)*, text?)>
<!ATTLIST classification-national
          id ID #IMPLIED
					%register_attributes;
>

<!ELEMENT classification-locarno
          (edition, main-classification, further-classification*, text?)>
<!ATTLIST classification-locarno
          id ID #IMPLIED
					%register_attributes;
>

<!ELEMENT classification-udc
          (#PCDATA)>
<!ATTLIST classification-udc
          id ID #IMPLIED
					%register_attributes;
>
<!-- END NOT EPO -->

<!ELEMENT application-reference
          (document-id+)>
<!ATTLIST application-reference
          appl-type CDATA #IMPLIED
          id ID #IMPLIED
					%register_attributes;
>

<!ELEMENT language-of-filing
          (#PCDATA)>
<!ATTLIST language-of-filing
					%register_attributes;>

<!ELEMENT language-of-publication
          (#PCDATA)>
<!ATTLIST language-of-publication
					%register_attributes;>

<!ELEMENT priority-claims
          (priority-claim*, incorporation-by-reference?)>
<!ATTLIST priority-claims
					%register_attributes;>

<!-- TO DO: EPO ignore office-of-filing, priority-doc-attached, 
    priority-doc-requested and restore rights -->
<!ELEMENT priority-claim
          (country, doc-number?, date, office-of-filing?, 
           (priority-doc-attached | priority-doc-requested)?, 
           restore-rights?)>
<!ATTLIST priority-claim
          id ID #IMPLIED
          kind (national |  regional |  international) #REQUIRED
          sequence CDATA #REQUIRED
>

<!-- TO DO: START NOT EPO -->
<!ELEMENT office-of-filing
          (country | 
           (region, country?))>

<!ELEMENT region
          (country)>

<!ELEMENT priority-doc-requested
          EMPTY>

<!ELEMENT priority-doc-attached
          EMPTY>

<!ELEMENT restore-rights
          EMPTY>

<!ELEMENT incorporation-by-reference
          EMPTY>
<!-- END NOT EPO-->

<!-- TO DO: EPO do not include correspondence-address 
    QUESTION: check this  -->
<!ELEMENT parties
          (applicants+, inventors*, correspondence-address*, agents*)>

<!ELEMENT applicants
          (applicant+)>
<!ATTLIST applicants
          %register_attributes; >
          
<!-- TO DO: EPO 
limit to addressbook, designated states, ST.36 requires nationality and 
residence. Idem for required attributes ?

  QUESTION: how to solve this ?
-->
<!ELEMENT applicant
          (addressbook+, nationality, residence, us-rights*, 
           designated-states?, designated-states-as-inventor?)>
<!ATTLIST applicant
          app-type (applicant |  applicant-inventor | proprietor) #REQUIRED
          designation (all |  all-except-us |  us-only |  as-indicated) #REQUIRED
          sequence CDATA #REQUIRED
>

<!ELEMENT addressbook
          ((%name_group;, address, phone*, fax*, email*, url*, ead*, dtext?) | text)>
<!ATTLIST addressbook
          id ID #IMPLIED
          lang CDATA #IMPLIED
>

<!ELEMENT prefix
          (#PCDATA)>

<!ELEMENT last-name
          (#PCDATA)>

<!ELEMENT orgname
          (#PCDATA)>

<!ELEMENT first-name
          (#PCDATA)>

<!ELEMENT middle-name
          (#PCDATA)>

<!ELEMENT first-last-name
          (#PCDATA)>

<!ELEMENT second-last-name
          (#PCDATA)>

<!ELEMENT suffix
          (#PCDATA)>

<!ELEMENT iid
          (#PCDATA)>

<!ELEMENT role
          (#PCDATA)>

<!ELEMENT department
          (#PCDATA)>

<!ELEMENT synonym
          (#PCDATA)>

<!ELEMENT registered-number
          (#PCDATA)>

<!ELEMENT address
          (%address_group;)>

<!ELEMENT address-1
          (#PCDATA)>

<!ELEMENT address-2
          (#PCDATA)>

<!ELEMENT address-3
          (#PCDATA)>

<!ELEMENT address-4
          (#PCDATA)>

<!ELEMENT address-5
          (#PCDATA)>

<!ELEMENT mailcode
          (#PCDATA)>

<!ELEMENT pobox
          (#PCDATA)>

<!ELEMENT room
          (#PCDATA)>

<!ELEMENT address-floor
          (#PCDATA)>

<!ELEMENT building
          (#PCDATA)>

<!ELEMENT street
          (#PCDATA)>

<!ELEMENT city
          (#PCDATA)>

<!ELEMENT county
          (#PCDATA)>

<!ELEMENT state
          (#PCDATA)>

<!ELEMENT postcode
          (#PCDATA)>

<!ELEMENT phone
          (#PCDATA)>

<!ELEMENT fax
          (#PCDATA)>

<!ELEMENT email
          (#PCDATA)>
<!ATTLIST email
          email-purpose (informal |  general |  advance |  main) #IMPLIED
>

<!ELEMENT url
          (#PCDATA)>

<!ELEMENT ead
          (#PCDATA)>

<!ELEMENT dtext
          (#PCDATA)>

<!ELEMENT nationality
          (country)>

<!ELEMENT residence
          (country)>

<!-- TO DO: START NOT EPO -->
<!ELEMENT us-rights
          (#PCDATA)>
<!ATTLIST us-rights
          kind (heir |  heiress |  executor |  executrix |  estate | 
            legal-representative |  administrator |  administratrix | 
            legal-representatives |  heirs |  executors |  legal-heirs)
           #REQUIRED
          to-dead-inventor CDATA #REQUIRED
>
<!-- END NOT EPO -->

<!ELEMENT designated-states
          (country*, 
           (region, country+)*)>

<!-- TO DO: START NOT EPO -->
<!ELEMENT designated-states-as-inventor
          (country*, 
           (region, country+)*)>
<!-- END NOT EPO -->

<!-- TO DO: EPO limit to inventor --> 
<!ELEMENT inventors
          (deceased-inventor | inventor)+>
<!ATTLIST inventors
          %register_attributes;>

<!-- TO DO: EPO limit to addressbook 
-->
<!ELEMENT inventor
          (addressbook+,  nationality?, residence?, designated-states?)>
<!ATTLIST inventor
          designation (all |  all-except-us |  us-only |  as-indicated) #IMPLIED
          wishes-to-be-published (yes|no) #IMPLIED
          sequence CDATA #REQUIRED
>

<!-- TO DO: START NOT EPO -->
<!ELEMENT deceased-inventor
          (%name_group;)>
<!ATTLIST deceased-inventor
          lang CDATA #IMPLIED
          sequence CDATA #IMPLIED
>

<!ELEMENT correspondence-address
          (addressbook+ | customer-number)>
<!-- END NOT EPO -->

<!ELEMENT customer-number
          (#PCDATA)>

<!-- TO DO: EPO limit to agent -->
<!ELEMENT agents
          (agent* | customer-number)>
<!ATTLIST agents
          %register_attributes;>

<!ELEMENT agent
          (addressbook+)>
<!ATTLIST agent
          rep-type (agent |  attorney |  common-representative) #REQUIRED
          sequence CDATA #REQUIRED
          et-al (yes | no) #IMPLIED
>

<!-- TO DO: START NOT EPO -->
<!ELEMENT designation-of-states
          (designation-pct, 
           (precautionary-designation-statement?, 
            exclusion-from-designation?))>
<!ATTLIST designation-of-states 
          %register_attributes;>
          
<!ELEMENT designation-pct
          (regional*, national?, new-designation-country*)>

<!ELEMENT regional
          (region, 
           (country, protection-request*)+, any-other-state?)>

<!ELEMENT protection-request
          (kind-of-protection, document-id*)>
<!ATTLIST protection-request
          subset (yes |  no) #IMPLIED
>

<!ELEMENT kind-of-protection
          (#PCDATA)>

<!ELEMENT national
          (country, protection-request*)+>

<!ELEMENT new-designation-country
          (#PCDATA)>

<!ELEMENT precautionary-designation-statement
          (#PCDATA)>

<!ELEMENT exclusion-from-designation
          (regional*, national?)>
<!-- END NOT EPO -->

<!ELEMENT invention-title
          (#PCDATA)>
<!ATTLIST invention-title
          id ID #IMPLIED
          lang CDATA #IMPLIED
          %register_attributes;
>

<!-- TO DO: START NOT EPO -->
<!ELEMENT assignees
          (assignee+)>
<!ATTLIST assignees
          %register_attributes;
>

<!ELEMENT assignee
          (%name_group; | addressbook)>
<!-- END NOT EPO -->

<!-- TO DO: PFR change structure from
            licensee-data (licensee, attorney-or-agent?, effective-in?)
            licensee (addressbook)
          to 
            licensee-data (licensee)+
            licensee (addressbook?, attorney-or-agent?, effective-in?, date?)
            licensee with attributes:
            	type-license (exlusive | not-exlusive | right-in-rem) #IMPLIED
              designation (all | as-indicated) #IMPLIED

     TO DO: exclude attorney-or-agent for EPO
     ATTENTION: This definition is now not ST.36 compliant
-->
<!ELEMENT licensee-data
          (licensee*)>
<!ATTLIST licensee-data
          %register_attributes;>

<!ELEMENT licensee
          (addressbook?, attorney-or-agent?, effective-in?, date?)>
<!ATTLIST licensee
	type-license (exclusive | not-exclusive | right-in-rem) #IMPLIED
	designation (all | as-indicated) #IMPLIED
	sequence CDATA #REQUIRED
>

<!-- TO DO: START NOT EPO -->
<!ELEMENT attorney-or-agent
          (addressbook+, range-of-authority*)>
<!ATTLIST attorney-or-agent
          rep-type (agent |  attorney |  common-representative) #REQUIRED
					%register_attributes;
>

<!ELEMENT range-of-authority
          (#PCDATA)>
<!-- END NOT EPO -->

<!ELEMENT effective-in
          (country+)>

<!-- TO DO: START NOT EPO -->
<!ELEMENT date-of-earliest-priority
          (date)>
<!ATTLIST date-of-earliest-priority
          %register_attributes;>

<!ELEMENT date-complete-specification-filed
          (date)>
<!ATTLIST date-complete-specification-filed
          %register_attributes;>

<!ELEMENT dates-of-public-availability
          (gazette-reference?, 
           unexamined-not-printed-without-grant?, 
           examined-not-printed-without-grant?, 
           unexamined-printed-without-grant?, 
           examined-printed-without-grant?, claims-only-available?, 
           not-printed-with-grant?, term-of-grant?, 
           invalidation-of-patent?, printed-as-amended?)>
<!ATTLIST dates-of-public-availability
          %register_attributes;>

<!ELEMENT gazette-reference
          (gazette-num, date, text?)>
<!ATTLIST gazette-reference
          country CDATA #IMPLIED
          id ID #IMPLIED
          lang CDATA #IMPLIED
>

<!ELEMENT gazette-num
          (#PCDATA)>

<!ELEMENT unexamined-not-printed-without-grant
          (document-id+, text?)>

<!ELEMENT examined-not-printed-without-grant
          (document-id+, text?)>

<!ELEMENT unexamined-printed-without-grant
          (document-id+, text?)>

<!ELEMENT examined-printed-without-grant
          (document-id+, text?)>

<!ELEMENT claims-only-available
          (document-id+, text?)>

<!ELEMENT not-printed-with-grant
          (document-id+, text?)>

<!ELEMENT printed-as-amended
          (document-id+, text?)>
<!-- END NOT EPO -->

<!-- TO DO: EPO not use of length-of-grant
-->
<!ELEMENT term-of-grant
          (disclaimer | lapse-of-patent | length-of-grant | lapsed-in-country | text)*>
<!ATTLIST term-of-grant
          %register_attributes;>
          
<!ELEMENT disclaimer
          (date?, text?)>

<!ELEMENT length-of-grant
          (#PCDATA)>

<!ELEMENT lapse-of-patent
          (document-id+, text?)>

<!ELEMENT lapsed-in-country
          (country, date, text?)>

<!ELEMENT invalidation-of-patent
          (document-id+, text?)>

<!-- TO DO: EPO not use of date-entering-into-force -->
<!ELEMENT dates-rights-effective
          (date-entering-into-force | 
           first-examination-report-despatched | 
           notification-of-rights-after-appeal | 
           patent-maintained-as-amended | proceedings-interrupted | 
           proceedings-resumed | proceedings-suspended | 
           request-for-conversion-to-national-application | 
           request-for-examination)+>

<!ELEMENT request-for-examination
          (date)>
<!ATTLIST request-for-examination
          %register_attributes;>

<!ELEMENT first-examination-report-despatched
          (date)>
<!ATTLIST first-examination-report-despatched
          %register_attributes;>

<!ELEMENT patent-maintained-as-amended
          (date)>
<!ATTLIST patent-maintained-as-amended
          %register_attributes;>

<!ELEMENT request-for-conversion-to-national-application
          (date, country)>
<!ATTLIST request-for-conversion-to-national-application
          %register_attributes;>

<!ELEMENT proceedings-suspended
          (date)>
<!ATTLIST proceedings-suspended
          %register_attributes;
          cause CDATA #IMPLIED>

<!ELEMENT proceedings-interrupted
          (date)>
<!ATTLIST proceedings-interrupted
          %register_attributes;
          cause CDATA #IMPLIED>

<!ELEMENT proceedings-resumed
          (date)>
<!ATTLIST proceedings-resumed
          %register_attributes;>

<!ELEMENT notification-of-rights-after-appeal
          (date)>
<!ATTLIST notification-of-rights-after-appeal
          %register_attributes;>

<!ELEMENT date-entering-into-force
          (date)>
<!ATTLIST date-entering-into-force
          %register_attributes;>

<!-- TO DO: START NOT EPO-->
<!ELEMENT patent-family
          (priority-application, 
           (family-member+ | text))>
<!ATTLIST patent-family
          id ID #IMPLIED
          %register_attributes;
>

<!ELEMENT priority-application
          (document-id+)>

<!ELEMENT family-member
          (document-id+)>

<!ELEMENT field-of-search
          (classification-ipc | classification-national | 
           classifications-ipcr)+>
<!ATTLIST field-of-search
          %register_attributes;>

<!ELEMENT figures
          (number-of-drawing-sheets?, number-of-figures?, 
           figure-to-publish?)>
<!ATTLIST figures
          %register_attributes;>

<!ELEMENT number-of-drawing-sheets
          (#PCDATA)>

<!ELEMENT number-of-figures
          (#PCDATA)>

<!ELEMENT figure-to-publish
          (fig-number+)>

<!ELEMENT fig-number
          (#PCDATA)>

<!-- PFR PENDING FOR CITED IN  or move to citation and deprecate
srep-phase ?-->         
<!ELEMENT references-cited
          ((citation+, date-search-completed?, 
            date-search-report-mailed?, place-of-search?, 
            search-report-publication?, searcher?) | text)>
<!ATTLIST references-cited 
          %register_attributes;>
          
<!ELEMENT citation
          ((nplcit | patcit), 
           (rel-passage*, category*, rel-claims*)*, corresponding-docs*, 
           classification-ipc?, classifications-ipcr?, 
           classification-national?, doi?)>
<!ATTLIST citation
          id ID #IMPLIED
          srep-phase CDATA #IMPLIED
          cited-in ( 	description | 	search | international-search-report | 
          						supplementary-international-search-report | 
          						international-type-search-report | 
          						national-search-report |  
          						supplementary-national-search-report | 
          						examination | international-examination | 
          						national-examination | opposition | limitation |
          						other | undefined)  #IMPLIED
	    cited-by (	applicant | examiner | opponent | third-party ) #IMPLIED
          office CDATA #IMPLIED 
>


<!ELEMENT patcit
          ((document-id+, rel-passage*) | text)>
<!ATTLIST patcit
          dnum CDATA #IMPLIED
          dnum-type CDATA #IMPLIED
          file CDATA #IMPLIED
          id ID #IMPLIED
          num CDATA #IMPLIED
          url CDATA #IMPLIED
>

<!ELEMENT rel-passage
          ((passage+, 
            (category, rel-claims?)*) | text)>

<!ELEMENT passage
          (#PCDATA)>

<!ELEMENT category
          (#PCDATA)>

<!ELEMENT rel-claims
          (#PCDATA)>

<!ELEMENT nplcit
          ((article | book | online | othercit | text), rel-passage*)>
<!ATTLIST nplcit
          file CDATA #IMPLIED
          id ID #IMPLIED
          lang CDATA #IMPLIED
          medium CDATA #IMPLIED
          npl-type CDATA #IMPLIED
          num CDATA #IMPLIED
          url CDATA #IMPLIED
>

<!ELEMENT article
          ((author*, atl?, subname*, 
            (book | serial), absno?, location?, class*, keyword*, cpyrt?, artid?, 
            refno*) | text)>

<!ELEMENT author
          (%name_group; | addressbook)>
<!ATTLIST author
          id ID #IMPLIED
>

<!ELEMENT atl
          (#PCDATA)>

<!ELEMENT subname
          (%name_group; | addressbook)>
<!ATTLIST subname
          subname-type (editor |  translator |  other-subname-type) "editor"
>

<!ELEMENT serial
          (sertitle, alttitle?, subname*, issue?, imprint?, pubdate?, descrip?, 
           notes?, pubid?, vid?, ino?, doi?, issn?, isbn?, cpyrt?)>

<!ELEMENT sertitle
          (#PCDATA)>

<!ELEMENT alttitle
          (#PCDATA)>

<!ELEMENT issue
          (#PCDATA)>

<!ELEMENT imprint
          ((address?, name, pubdate*) | text)>

<!ELEMENT pubdate
          (#PCDATA | edate | sdate | time)*>

<!ELEMENT sdate
          (#PCDATA)>

<!ELEMENT edate
          (#PCDATA)>

<!ELEMENT time
          (#PCDATA)>

<!ELEMENT descrip
          (#PCDATA)>

<!ELEMENT notes
          (#PCDATA)>

<!ELEMENT pubid
          (#PCDATA)>

<!ELEMENT vid
          (#PCDATA)>

<!ELEMENT ino
          (#PCDATA)>

<!ELEMENT doi
          (#PCDATA)>

<!ELEMENT issn
          (#PCDATA)>

<!ELEMENT isbn
          (#PCDATA)>

<!ELEMENT cpyrt
          (#PCDATA)>

<!ELEMENT book
          ((author*, 
            (book-title+ | conference), 
            (subtitle?, subname*, edition?, imprint?, vid?, ino?, descrip?, series?, 
             notes?, absno?, location*, pubid?, bookno?, class*, keyword*, cpyrt?, doi?, 
             issn?, isbn*, refno*)) | text)>

<!ELEMENT book-title
          (#PCDATA)>

<!ELEMENT conference
          ((conftitle, confdate?, confno?, confplace?, confsponsor*) | text)>

<!ELEMENT conftitle
          (#PCDATA)>

<!ELEMENT confdate
          (date | 
           (sdate, edate))>

<!ELEMENT confno
          (#PCDATA)>

<!ELEMENT confplace
          (#PCDATA | address)*>

<!ELEMENT confsponsor
          (#PCDATA | addressbook)*>

<!ELEMENT subtitle
          (#PCDATA)>

<!ELEMENT series
          ((mst, msn?, issn?) | text)>

<!ELEMENT mst
          (#PCDATA)>

<!ELEMENT msn
          (#PCDATA)>

<!ELEMENT absno
          (#PCDATA)>

<!ELEMENT location
          ((serpart?, sersect?, chapter?, pp*, column?, para?, line?) | text)>

<!ELEMENT serpart
          (#PCDATA)>

<!ELEMENT sersect
          (#PCDATA)>

<!ELEMENT chapter
          (#PCDATA)>

<!ELEMENT pp
          (#PCDATA | ppf | ppl)*>

<!ELEMENT ppf
          (#PCDATA)>

<!ELEMENT ppl
          (#PCDATA)>

<!ELEMENT column
          (#PCDATA | colf | coll)*>

<!ELEMENT colf
          (#PCDATA)>

<!ELEMENT coll
          (#PCDATA)>

<!ELEMENT para
          (#PCDATA)>

<!ELEMENT line
          (#PCDATA | linef | linel)*>

<!ELEMENT linef
          (#PCDATA)>

<!ELEMENT linel
          (#PCDATA)>

<!ELEMENT bookno
          (#PCDATA)>

<!ELEMENT keyword
          (#PCDATA)>

<!ELEMENT refno
          (#PCDATA)>
<!ATTLIST refno
          id ID #IMPLIED
>

<!ELEMENT artid
          (#PCDATA)>

<!ELEMENT online
          ((author*, online-title*, hosttitle?, subname*, edition?, 
            (book | serial)?, imprint?, pubdate?, vid?, ino?, history?, series?, 
            hostno?, absno?, location?, notes?, avail*, class*, keyword*, cpyrt?, doi?, 
            issn?, isbn?, datecit?, srchterm*, srchdate?, refno*) | text)>

<!ELEMENT online-title
          (#PCDATA)>

<!ELEMENT hosttitle
          (#PCDATA)>

<!ELEMENT history
          ((accepted | misc | received | revised) | text)>

<!ELEMENT received
          (date)>

<!ELEMENT accepted
          (date)>

<!ELEMENT revised
          (date)>

<!ELEMENT misc
          (#PCDATA | date)*>

<!ELEMENT hostno
          (#PCDATA)>

<!ELEMENT avail
          (#PCDATA)>

<!ELEMENT datecit
          (date)>

<!ELEMENT srchterm
          (#PCDATA)>

<!ELEMENT srchdate
          (date)>

<!ELEMENT othercit
          (#PCDATA)>

<!ELEMENT corresponding-docs
          ((nplcit | patcit), 
           (rel-passage*, category*, rel-claims*)*)>

<!ELEMENT date-search-completed
          (date)>

<!ELEMENT date-search-report-mailed
          (date)>

<!ELEMENT place-of-search
          (country)>

<!ELEMENT search-report-publication
          (document-id+)>

<!ELEMENT searcher
          (%name_group; | addressbook)>

<!ELEMENT examiners
          (primary-examiner?, assistant-examiner?, authorized-officer?)>
<!ATTLIST examiners
          %register_attributes;>

<!ELEMENT primary-examiner
          (%name_group;, electronic-signature?)>

<!ELEMENT electronic-signature
          (basic-signature | enhanced-signature)>
<!ATTLIST electronic-signature
          date CDATA #REQUIRED
          place-signed CDATA #IMPLIED
>

<!ELEMENT basic-signature
          (click-wrap | fax-image | text-string)>

<!ELEMENT fax-image
          EMPTY>
<!ATTLIST fax-image
          file CDATA #REQUIRED
>

<!ELEMENT text-string
          (#PCDATA)>

<!ELEMENT click-wrap
          EMPTY>

<!ELEMENT enhanced-signature
          (pkcs7)>

<!ELEMENT pkcs7
          EMPTY>

<!ELEMENT assistant-examiner
          (%name_group;, electronic-signature?)>

<!ELEMENT authorized-officer
          (%name_group;, phone?, fax?, email?, electronic-signature?)>

<!ELEMENT number-of-claims
          (#PCDATA)>
<!ATTLIST number-of-claims
          %register_attributes;>
<!-- END NOT EPO -->

<!ELEMENT related-documents
          (addition | continuation | continuation-in-part | 
           continuing-reissue | correction | division | 
           previously-filed-application | reexamination | reissue | 
           related-publication | substitution | utility-model-basis)+>

<!ELEMENT addition
          (relation)>
<!ATTLIST addition
          %register_attributes;>

<!-- QUESTION: in ep child-doc cardinality * in WIPO 1 ? --> 
<!ELEMENT relation
          (parent-doc, child-doc)>

<!-- EPO not using parent-pct-document --> 
<!ELEMENT parent-doc
          (document-id+, parent-status?, parent-grant-document?, 
           parent-pct-document?)>

<!ELEMENT parent-status
          (#PCDATA)>

<!ELEMENT parent-grant-document
          (document-id+)>

<!ELEMENT parent-pct-document
          (document-id+)>

<!ELEMENT child-doc
          (document-id+, child-status?, child-grant-document?, 
           child-pct-document?)>

<!ELEMENT child-status
          (#PCDATA)>

<!ELEMENT child-grant-document
          (document-id+)>

<!ELEMENT child-pct-document
          (document-id+)>
          
<!ELEMENT division
          (relation)>
<!ATTLIST division
          %register_attributes;>

<!ELEMENT continuation
          (relation)>
<!ATTLIST continuation
          %register_attributes;>

<!ELEMENT previously-filed-application
          (document-id+)>
<!ATTLIST previously-filed-application
          id ID #IMPLIED
          %register_attributes;
>

<!ELEMENT continuation-in-part
          (relation)>
<!ATTLIST continuation-in-part
          %register_attributes;>

<!ELEMENT continuing-reissue
          (relation)>
<!ATTLIST continuing-reissue
          %register_attributes;>

<!ELEMENT reissue
          (relation)>
<!ATTLIST reissue
          %register_attributes;>

<!ELEMENT reexamination
          (relation)>
<!ATTLIST reexamination
          %register_attributes;>

<!ELEMENT substitution
          (relation)>
<!ATTLIST substitution
          %register_attributes;>

<!ELEMENT utility-model-basis
          (relation)>
<!ATTLIST utility-model-basis
          %register_attributes;>

<!-- QUESTION: EPO not using gazette-reference ? -->
<!ELEMENT correction
          (document-corrected, type-of-correction?, gazette-reference?, text?)>
<!ATTLIST correction
          %register_attributes;>

<!ELEMENT document-corrected
          (document-id+)>

<!ELEMENT type-of-correction
          (#PCDATA)>

<!-- QUESTION: EPO only #PCDATA single ?-->
<!ELEMENT related-publication
          (#PCDATA | document-id)*>
<!ATTLIST related-publication
          %register_attributes;>

<!-- TO DO: START NOT EPO -->
<!ELEMENT st50-republication
          (republication-code?, cancellation-date?, modifications?, 
           republication-notes?, correction-notice)>
<!ATTLIST st50-republication
          %register_attributes;>

<!ELEMENT republication-code
          (#PCDATA)>

<!ELEMENT cancellation-date
          (#PCDATA)>

<!ELEMENT modifications
          (modified-bibliography?, modified-part*)>

<!ELEMENT modified-bibliography
          (inid-code+)>

<!ELEMENT inid-code
          (#PCDATA)>
<!ATTLIST inid-code
          sequence CDATA #IMPLIED
>

<!ELEMENT modified-part
          (modified-part-name, modified-item*)>
<!ATTLIST modified-part
          lang CDATA #IMPLIED
          sequence CDATA #IMPLIED
>

<!ELEMENT modified-part-name
          (#PCDATA)>

<!ELEMENT modified-item
          (#PCDATA)>
<!ATTLIST modified-item
          sequence CDATA #IMPLIED
>

<!ELEMENT republication-notes
          (republication-note+)>

<!ELEMENT republication-note
          (#PCDATA)>
<!ATTLIST republication-note
          lang CDATA #IMPLIED
          sequence CDATA #IMPLIED
>

<!ELEMENT correction-notice
          (date, gazette-reference)>

<!ELEMENT date-exhibition-filed
          (date)>
<!ATTLIST date-exhibition-filed
          %register_attributes;>

<!ELEMENT date-pct-article-22-39-fulfilled
          (date)>
<!ATTLIST date-pct-article-22-39-fulfilled
          %register_attributes;>

<!ELEMENT pct-application-no-longer-effective
          ((country | region), date)+>
<!ATTLIST pct-application-no-longer-effective
          %register_attributes;>
<!-- END NOT EPO -->

<!-- TO DO: PFR for expert solution -->
<!ELEMENT bio-deposit
          (depositary, bio-accno, date?, term?, dtext?)>
<!ATTLIST bio-deposit
          dnum CDATA #IMPLIED
          id ID #IMPLIED
          num CDATA #REQUIRED
          url CDATA #IMPLIED
          access-limited-to-expert (yes | no) #IMPLIED
          %register_attributes;
>

<!ELEMENT depositary
          (#PCDATA | address)*>

<!ELEMENT bio-accno
          (#PCDATA)>

<!ELEMENT term
          (#PCDATA)>

<!-- TO DO: START NOT EPO -->
<!ELEMENT pct-or-regional-filing-data
          (document-id+, us-371c124-date?)>
<!ATTLIST pct-or-regional-filing-data
          %register_attributes;>

<!ELEMENT us-371c124-date
          (date)>

<!ELEMENT pct-or-regional-publishing-data
          (document-id+, gazette-reference?)>
<!ATTLIST pct-or-regional-publishing-data
          %register_attributes;>

<!ELEMENT defer-publication-of-search-report
          (date, gazette-reference)>
<!ATTLIST defer-publication-of-search-report
          %register_attributes;>
<!-- END NOT EPO -->

<!ELEMENT date-application-refused
          (date)>
<!ATTLIST date-application-refused
          %register_attributes;>

<!ELEMENT date-rights-reestablished
          (date)>
<!ATTLIST date-rights-reestablished
          %register_attributes;>

<!ELEMENT date-application-withdrawn-by-applicant
          (date)>
<!ATTLIST date-application-withdrawn-by-applicant
          %register_attributes;>

<!ELEMENT date-application-deemed-withdrawn
          (date)>
<!ATTLIST date-application-deemed-withdrawn
          %register_attributes;>

<!ELEMENT date-of-revocation
          (date)>
<!ATTLIST date-of-revocation
          %register_attributes;>

<!-- TO DO: START NOT EPO -->
<!ELEMENT cmea-havana-agreement
          (document-id+)>
<!ATTLIST cmea-havana-agreement
          %register_attributes;>
<!-- END NOT EPO-->

<!ELEMENT date-application-partially-withdrawn
          (date)>
<!ATTLIST date-application-partially-withdrawn
          reason CDATA #IMPLIED
          %register_attributes;
>

<!-- EPO usage
	opposition-data
		possibly multiple opponent ( addressbook, agent, opponent-status, date-opposition-filed )
		date-rejected
		date-terminated
		opposition-not-filed
-->
<!ELEMENT opposition-data
          (opponent | 
           date-rejected | date-terminated | opposition-not-filed)*>
<!ATTLIST opposition-data
          %register_attributes;>

<!ELEMENT opponent
          (addressbook, agent?, opponent-status?, date-opposition-filed?)>
<!ATTLIST opponent
					 sequence CDATA #REQUIRED>

<!--Attribute status has values 1-9 to indicate:
ADMISSIBLE - date admissable
- date inadmissable
- date deemed not to have been filed
- date opposition withdrawn
- date intervention
- date intervention admissable
- date intervention inadmissable
- date intervention deemed not filed
- date intervention withdrawn-->
<!ELEMENT opponent-status (date)>
<!ATTLIST opponent-status status CDATA #REQUIRED>

<!ELEMENT date-opposition-filed
          (date)>

<!--<!ELEMENT date-deemed-not-to-have-been-filed
          (date)>

<!ELEMENT date-inadmissable
          (date)>-->

<!ELEMENT date-rejected
          (date)>

<!ELEMENT date-terminated
          (date)>

<!ELEMENT opposition-not-filed
          (date?)>

<!-- TO DO: PFR  to be done new procedural and event tags -->
<!ELEMENT procedural-data (procedural-step+)>
<!ATTLIST procedural-data
          country CDATA #IMPLIED
          id ID #IMPLIED
          lang CDATA #IMPLIED
          status CDATA #IMPLIED
>

<!ELEMENT procedural-step (procedural-step-code, procedural-step-text+,
          procedural-step-date*,
          procedural-step-affected-states?, 
          time-limit?, procedural-step-result*,gazette-reference?)>
<!ATTLIST procedural-step
          id ID #REQUIRED
          procedure-step-phase ( international-search | 
          international-examination | entry-regional-phase | search | 
          examination | appeal | opposition | limitation | revocation |
          fees | undefined) #REQUIRED
          procedural-step-forecast ( yes | no ) #IMPLIED
          related-dossier-events IDREFS #IMPLIED
          related-file-wrapper-documents IDREFS #IMPLIED>

<!ELEMENT procedural-step-code (#PCDATA)>
<!ATTLIST procedural-step-code step-code-type CDATA #IMPLIED>

<!ELEMENT procedural-step-affected-states (country+)>

<!ELEMENT procedural-step-text (#PCDATA)>
<!ATTLIST procedural-step-text 
          step-text-type CDATA #IMPLIED>

<!ELEMENT procedural-step-result (#PCDATA)>
<!ATTLIST procedural-step-result 
          step-result-type CDATA #IMPLIED>

<!ELEMENT procedural-step-date (date)>
<!-- examples date-type: date-of-despatch, date-of-payment, date-effective, 
                         date-of-event -->
<!ATTLIST procedural-step-date step-date-type CDATA #IMPLIED>

<!ELEMENT time-limit (#PCDATA)>
<!ATTLIST time-limit time-limit-unit ( days | weeks | months ) #REQUIRED>

<!ELEMENT events-data (dossier-event+)>
<!ATTLIST events-data
          country CDATA #IMPLIED
          id ID #IMPLIED
          lang CDATA #IMPLIED
          status CDATA #IMPLIED
>

<!ELEMENT dossier-event ( event-date, event-code, event-text+, 
          gazette-reference?)>
<!ATTLIST dossier-event
          id ID #REQUIRED
          event-type ( new | change | deletion ) #REQUIRED 
          event-forecast ( yes | no ) #IMPLIED
          related-procedural-steps IDREFS #IMPLIED
          related-file-wrapper-documents IDREFS #IMPLIED>

<!ELEMENT event-date (date)>

<!ELEMENT event-code (#PCDATA)>
<!ATTLIST event-code event-code-type CDATA #IMPLIED>

<!ELEMENT event-text (#PCDATA)>
<!ATTLIST event-text 
          event-text-type CDATA #IMPLIED>

<!-- file wrapper
  TO DO: Check with Rachid
  TO DO: PFR  to be done 
-->
<!ELEMENT file-wrapper-data EMPTY>
<!ATTLIST file-wrapper-data
          country CDATA #IMPLIED
          id ID #IMPLIED
          lang CDATA #IMPLIED
          status CDATA #IMPLIED
>

<!-- TO DO: START OF EP SPECIFIC DATA 
      office-specific-bib-data defined as empty in ST.36 -->
<!ELEMENT office-specific-bib-data
          (ep-appeal-data*, ep-revocation-procedure*,
          ep-petition-review*, ep-limitation-procedure*)>
<!ATTLIST office-specific-bib-data
          file CDATA #REQUIRED
          id ID #IMPLIED
          lang CDATA #IMPLIED
          office CDATA #REQUIRED
          office-dtd CDATA #REQUIRED
          status CDATA #IMPLIED
>

<!ELEMENT ep-appeal-data (date?, ep-date-statement-of-grounds-filed?, 
          ep-date-interlocutory-revision?, ep-appeal-result?)>
<!ATTLIST ep-appeal-data
	appeal-phase (examination | opposition | revocation | limitation ) #IMPLIED
	appeal-num CDATA #IMPLIED
>

<!ELEMENT ep-date-statement-of-grounds-filed (date)>
<!ELEMENT ep-date-interlocutory-revision (date)>
<!ELEMENT ep-appeal-result (#PCDATA)>
<!ATTLIST ep-appeal-result date CDATA #IMPLIED>

<!-- Used for revocation on request from proprietor -->
<!ELEMENT ep-revocation-procedure (ep-revocation-procedure-date?, 
          ep-revocation-procedure-kind?, ep-revocation-procedure-decision?, 
          ep-revocation-procedure-paid?, ep-revocation-date-dispatch?, 
          ep-revocation-legal-effect?)>
<!ATTLIST ep-revocation-procedure
          %register_attributes;>
          
<!ELEMENT ep-revocation-procedure-date (date)>

<!ELEMENT ep-revocation-procedure-kind (#PCDATA)>

<!ELEMENT ep-revocation-procedure-decision (#PCDATA)>

<!ELEMENT ep-revocation-procedure-paid (date)>

<!ELEMENT ep-revocation-date-dispatch (date)>

<!ELEMENT ep-revocation-legal-effect (date)>

<!-- petition(s) for review of the outcome of an appeal -->
<!ELEMENT ep-petition-review (ep-petition-review-appeal-number?, 
          ep-petition-review-date?, ep-petition-review-petitioner-code?, 
          ep-petition-review-decision-date?, ep-petition-review-kind?)>
<!ATTLIST ep-petition-review
          petition-review-num CDATA #IMPLIED
          %register_attributes;
>

<!ELEMENT ep-petition-review-appeal-number (#PCDATA)>

<!ELEMENT ep-petition-review-date (date)>

<!ELEMENT ep-petition-review-petitioner-code (#PCDATA)>

<!ELEMENT ep-petition-review-decision-date (date)>

<!ELEMENT ep-petition-review-kind (#PCDATA)>

<!-- request for limitation of the patent-->
<!ELEMENT ep-limitation-procedure (ep-limitation-filing, 
          ep-limitation-rejection*, ep-limitation-allowed*)>
          
<!ELEMENT ep-limitation-filing (ep-limitation-filing-date?, ep-limitation-filing-decision?)>

<!ELEMENT ep-limitation-filing-date (date)>

<!ELEMENT ep-limitation-filing-decision (date?, text?)>

<!ELEMENT ep-limitation-rejection (ep-limitation-rejection-kind?, ep-limitation-rejection-dispatch-date?, ep-limitation-rejection-legal-date?)>
<!ATTLIST ep-limitation-rejection
          %register_attributes;>
          
<!ELEMENT ep-limitation-rejection-kind (#PCDATA)>

<!ELEMENT ep-limitation-rejection-dispatch-date (date)>

<!ELEMENT ep-limitation-rejection-legal-date (date)>

<!ELEMENT ep-limitation-allowed (ep-limitation-request-dispatch-date?, ep-limitation-request-pay-date?)>
<!ATTLIST ep-limitation-allowed
          %register_attributes;>

<!ELEMENT ep-limitation-request-dispatch-date (date)>

<!ELEMENT ep-limitation-request-pay-date (date)>

<!-- subject to acceptation of PFR ST.36/2010/001 -->
<!ELEMENT search-reports-information (search-report-information+)>

<!ELEMENT search-report-information (srep-request-date?, application-reference?, srep-request-withdrawn?, sisr-receipt-of-translation?, date-search-completed? , date-search-report-mailed?, date-correction-mailed? , place-of-search? , search-report-publication? , searcher?)>

<!ATTLIST search-report-information
                    id ID #IMPLIED
                    office CDATA #REQUIRED
                    search-type ( international-type | isr | sis | national | national-supplementary ) #REQUIRED
                    declaration-of-no-search ( yes | no | not-determined) #REQUIRED
                    status CDATA #IMPLIED
                    %register_attributes;>

<!ELEMENT sisr-receipt-of-translation (date)>
<!ELEMENT srep-request-withdrawn EMPTY>

<!--Date of request for search eg. on PCT Form 201

-->
<!ELEMENT srep-request-date  (date) >

<!ELEMENT date-correction-mailed (date)>
