<?xml version='1.0' encoding='UTF-8' ?>

<!--Generated by Turbo XML 2.4.2.7.-->

<!ENTITY % name_group "((name | (prefix? , (last-name | orgname) , first-name? , middle-name? , suffix? , iid? , role? , orgname? , department? , synonym*)) , registered-number?)">

<!ENTITY % address_group "((address-1? , address-2? , address-3? , mailcode? , pobox? , room? , address-floor? , building? , street? , city? , county? , state? , postcode? , country) | text)">

<!-- 
*********************************************************************************
*  library-transaction-v-1-2.dtd     2009 OCTOBER                               *
*********************************************************************************
*  PUBLIC "-//WIPO//DAS 1.2//EN" "library-transaction-v1-2.dtd"                 *
*********************************************************************************
*  http://www.wipo.int/pct-safe/epct/schemaDocs/1.5/library-transaction-v1-1.dtd*
*********************************************************************************
* contacts:                                                                     *
*  WIPO:Daniel Cheng; daniel.cheng@wipo.int                                     *
*  WIPO: Peter Waring; peter.waring@wipo.int                                    *
*********************************************************************************
* revision history                                                              *
*********************************************************************************
October 2007
..released version number as v0.1
February 2008
..released version number as v0.2 
..following comments from M Richardson
March 2008
..released version number as v0.3
..multiple requests for multiple library-entry-owners
..add operations
..add translations for future implementation
May 2008
..released version number as v1.0
..communicated to Offices for implementation
..add and rename operations
..remove partial-success in processing-status
July 2009
..released version number as v1.1
..add error code attribute and error reporting tag
..add in-progress in processing-status
September 2009
..released version number as v1.2
..add comments for storage-request (e.g. used for describing the reason of a withdrawal request)
October 2009
..keep released version number as v1.2
..add a new error code and message
July 2011
..released version number as v2.0
..add a new error code -12 
..add 'referencing-application' element is added for Offices to provide referencing application number which 
.. refers to either the later application claiming priority in case of get-document operation
..add 'parent' element should be used for Offices to provide the earlier national application which 
.. hosts the requested foreign priority document in case of get-document and add-entry operations
..add a new 'regcert' attribute for Trademark document
..add a new 'ip-type' attribute to support any type of IP applications
..add 'appl-type' and 'ip-type' attributes to parent element to support any type of IP applications
..add 'D' for route D add-entry operation

********************************************************************************

  ****************************************************************************
  *  DTD FOR Digital Access Service Library Transaction                       *
  * Contains both transaction request and response information                 *
  * for Both storage and retrieval use cases via PCT-EDI ONLY                 *
  *                                                                           *
  *  This is a production use DTD                                             *
  *   For further notes see the WIPO ST.36 standard.                          *
  *  see: http://pcteasy.wipo.int/efiling_standards/EFPage.htm                *
  *                                                                           *
  *  In developing this DTD we have taken into consideration:                 *
  *  - earlier versions of this dtd                                           *
  *  - Trilateral Common data dictionary                                      *
  *  - ISO 12083 dtds, etc                                                    *
  *  - PCT Annex F DTDs                                                       *
  * THE FOLLOWING STATEMENT IS DESIRED BUT NOT CURRENTLY TRUE                 *
  *  All elements are taken from ST.36 ICE (International Common Elements).   *
*  TDA IS OUT OF SCOPE therefore US IS OUT OF SCOPE                           *
*  THUS DOC-ID/PARENT REMAINS MANDATORY                                       *
  ****************************************************************************
  ***************************************************************************
  *  the dtd should continue to be developed, along the lines of             *
  * making a generic dtd, utilising ST.36 design principles and              *
  * elements. This will be submitted to for ST.36 and Annex F                *
  * approval bodies at a later time (TBD) when the dtd has reached           *
  * an appropriate state of maturity based on our initial implementation     * 
  * experiences.                                                             *
  *                                                                          *
  * The DTD is expected to be used by offices creating requests for          *
  * the posting of documents to the DAS based on requests from               *
  * applicants (paper or electronic) to be submitted by EDI.                 *
  * This did is not to be used to update the access list (only the           *
  *  document) therefore only new or withdraw operations are allowed.        *
  *                                                                          *
  *********************************************************************************                           
-->

<!ELEMENT library-transaction (storage-request-list?, retrieval-request-list?)>

<!--
 first version of DAS will support only transaction-type of 'request' or 'response'
-->
<!ATTLIST library-transaction id               ID     #IMPLIED
                              lang             CDATA  #REQUIRED
                              dtd-version      CDATA  #REQUIRED
                              file             CDATA  #REQUIRED
                              country          CDATA  #REQUIRED
                              date-produced    CDATA  #IMPLIED
                              transaction-id   CDATA  #IMPLIED
                              transaction-type  (acknowledgement | request | response)  #REQUIRED
                              sending-office   CDATA  #REQUIRED
                              recipient-office CDATA  #REQUIRED>

<!--
 'partial success' is supported for a library transaction, by recording the processing-status for EACH library entry
 this allows for the good documents to be posted on time (even when there are some entries that fail).  
-->
<!ELEMENT processing-status (complete-success | complete-rejection | in-progress)>

<!ELEMENT complete-success (#PCDATA)>

<!ELEMENT complete-rejection (#PCDATA)>
<!ATTLIST complete-rejection  errorcode   (-1 | -2 | -3 | -4 | -5 | -6 | -7 | -8 | -9 | -10 | -11 | -12)  #REQUIRED>
<!-- -1 "DUPLICATE (ENTRY ALREADY EXISTS)" --> 
<!-- -2 "INVALID FILE FORMAT" --> 
<!-- -3 "INVALID FILE" --> 
<!-- -4 "INVALID DATA" --> 
<!-- -5 "PDOC WITHDRAWN" --> 
<!-- -6 "ACCESS NOT AUTHORIZED" --> 
<!-- -7 "APPLICATION NUMBER NOT FOUND" --> 
<!-- -8 "FILE WAS NOT AVAILABLE (REQUESTED APPLICATION EXISTS BUT IS NOT CLEARED FOR DISSEMINATION, e.g. security)" --> 
<!-- -9 "DOCUMENT(S) WAS NOT AVAILABLE (COMPLETE SET OF REQUIRED DOCUMENTS FOR CERTIFIED COPY IS NOT AVAILABLE)" --> 
<!-- -10 "NO RESPONSE FROM OFF (REQUEST ENDED AFTER EXPIRATION OF A SPECIFIC TIMELINE (e.g. 30 days))" --> 
<!-- -11 "PDOC CANNOT BE WITHDRAWN (DOCUMENT ALREADY RETRIEVED BY OSF)" --> 
<!-- -12 "MISMATCHED PRIORITY FILING DATE" --> 

<!ELEMENT in-progress EMPTY>

<!--
 indication of errors found in structure and/or data values.  
-->
<!ELEMENT error-reporting (error-location+)>

<!--
 type of error in the input XML which is related to the XML structure or data value in attribute or tag.  
-->
<!ELEMENT error-location (#PCDATA)>
<!ATTLIST error-location  structure (yes | no)  #REQUIRED
				 data (yes | no)  #REQUIRED>

<!-- Owner can have multiple address book entries to handle transliterated addresses for the same physical address 
-->
<!ELEMENT library-entry-owner (addressbook+)>
<!--
  ADDRESSBOOK GROUP: 
  Holds name and contact information for individuals/organizations

  The LANG attribute is REQUIRED for certain document types,
  e.g., the JPO PCT Request where names and addresses may be repeated in two
    different languages. If no structure possible use text.
-->
<!ELEMENT addressbook ((%name_group; , address , phone* , fax* , email* , url* , ead* , dtext?) | text)>

<!ATTLIST addressbook  id   ID     #IMPLIED
                       lang CDATA  #IMPLIED>
<!--
  Descriptive text
-->
<!ELEMENT dtext (#PCDATA)>

<!--
  If no structure is possible, enter text (without mark-up)
-->
<!ELEMENT text (#PCDATA)>

<!--
  Universal Resource Locator; e.g. www.wipo.int
-->
<!ELEMENT url (#PCDATA)>

<!--
  Fax number
-->
<!ELEMENT fax (#PCDATA)>

<!--
  Telephone number
-->
<!ELEMENT phone (#PCDATA)>

<!--
  Email address
-->
<!ELEMENT email (#PCDATA)>

<!--
  Electronic address use for other than email
-->
<!ELEMENT ead (#PCDATA)>

<!--
  Address components:
  Address formats differ from country to country
  If no structure possible use text
-->
<!ELEMENT address (%address_group;)>

<!--
  Postal code or zip code
-->
<!ELEMENT postcode (#PCDATA)>

<!--
  Region of country; e.g., state, province, etc.
-->
<!ELEMENT state (#PCDATA)>

<!--
  County, parish, department, etc (mainly UK, USA)
-->
<!ELEMENT county (#PCDATA)>

<!--
  City or town name
-->
<!ELEMENT city (#PCDATA)>

<!--
  Street may contain house number or name
-->
<!ELEMENT street (#PCDATA)>

<!--
  Building information in address; e.g., Hoffman building
-->
<!ELEMENT building (#PCDATA)>

<!--
  Address floor; e.g., 10th
-->
<!ELEMENT address-floor (#PCDATA)>

<!--
  Address room; e.g., Room 55B
-->
<!ELEMENT room (#PCDATA)>

<!--
  Post Office Box number
-->
<!ELEMENT pobox (#PCDATA)>

<!--
  Organizational mail code
-->
<!ELEMENT mailcode (#PCDATA)>

<!--
  Address, third line
-->
<!ELEMENT address-3 (#PCDATA)>

<!--
  Address, second line
-->
<!ELEMENT address-2 (#PCDATA)>

<!--
  Address, first line
-->
<!ELEMENT address-1 (#PCDATA)>

<!--
  Registered number
-->
<!ELEMENT registered-number (#PCDATA)>

<!--
  Synonym
-->
<!ELEMENT synonym (#PCDATA)>

<!--
  Department, division, section, etc. name
-->
<!ELEMENT department (#PCDATA)>

<!--
  Organization name or company name
-->
<!ELEMENT orgname (#PCDATA)>

<!--
  Role; e.g., President, Chairman, etc.
-->
<!ELEMENT role (#PCDATA)>

<!--
  SDOBI : Individual id
-->
<!ELEMENT iid (#PCDATA)>

<!--
  Name suffix (e.g., II, Jr., Dip., Ing., BA, etc.)
-->
<!ELEMENT suffix (#PCDATA)>

<!--
  Middle name(s) or initial(s)
-->
<!ELEMENT middle-name (#PCDATA)>

<!--
  First or given name(s), initial(s)
-->
<!ELEMENT first-name (#PCDATA)>

<!--
  Last, family, surname
-->
<!ELEMENT last-name (#PCDATA)>

<!--
  Title: e.g., Mr., Mrs., Dr. etc
-->
<!ELEMENT prefix (#PCDATA)>

<!--
  Date: components of a date.  Format: YYYYMMDD
-->
<!ELEMENT date (#PCDATA)>

<!--
  Document kind code; e.g., A1
    (INID 13, ST.32:B130)
-->
<!ELEMENT kind (#PCDATA)>

<!-- Name: If no distinction or detail can be given. Also to be used for: personal (natural person) and corporate (legal entity) names-->
<!ELEMENT name (#PCDATA)>

<!ATTLIST name  name-type  (legal | natural)  #IMPLIED >
<!--
  The number of the referenced IP (or application) document
-->
<!ELEMENT doc-number (#PCDATA)>

<!--
  Country: use ST.3 country code; e.g. DE, FR, GB, NL, etc.
  Also includes EP, IB, WO
-->
<!ELEMENT country (#PCDATA)>

<!--
  Document identification refers to IP applications only.
  See WIPO ST.14
-->
<!ELEMENT document-id (country , doc-number , kind? , name? , date?)>

<!ATTLIST document-id  lang CDATA  #IMPLIED >

<!-- One library-entry contains:
((document-id | parent) - document identifiers  
wrapped-document - the document
access-control-list - an access control list applicable to the document
control-code - the access control code for use by the applicant
publicly-available - a flag denoting public availability
first-filing-office-confirmation-date - date when the First Office of Filing has confirmed to DAS the availability
applicant-confirmation-date - date when the applicant has confirmed to DAS the availability
processing-status - of the transaction reflected at the time of creation of the XML

A library-entry may refers to one document type and its' translations into one or many languages
-->
<!ELEMENT library-entry (document-id?, parent?, referencing-application?, library-entry-document-list?, access-control-list?, control-code?, publicly-available?, first-filing-office-confirmation-date?, applicant-confirmation-date?, processing-status?, error-reporting?)>

<!ATTLIST library-entry  id                     ID     #IMPLIED
                         appl-type              CDATA  #IMPLIED
                         ip-type              (industrial-design | patent | trademark | utility-model)  #REQUIRED
                         transaction-id         CDATA  #IMPLIED>

<!ELEMENT library-entry-document-list (library-entry-document+)>

<!ELEMENT library-entry-document (wrapped-document?)>

<!-- Properties of document:
document-type              - types of the document supported currently:
							 (pdoc (priority-document of any IP applications) or
 							  pdoccert (certificate page for availability of priority-document of any IP applications) or
 							  regcert (registration certificate for Trademark applications) or
							 tpdc (translation of priority-document of any IP applications), 
                                        should further document types be required they should be added in this list)
lang                       - language of the document
first-office-filing-date   - date when the document or the waiver form is furnished to the Office of First Filing
storage-date               - date when the document is added into DAS.
withdrawal-date            - date when the document is withdrawn from DAS.
-->
<!ATTLIST library-entry-document  document-type               (pdoc | pdoccert | regcert | tpdc)  #REQUIRED
				  lang                        CDATA  #IMPLIED
				  first-office-filing-date    CDATA  #IMPLIED
				  storage-date                CDATA  #IMPLIED
				  withdrawal-date    CDATA  #IMPLIED>

<!--
  List of Second Offices of Filing to which access permissions have been granted.
-->
<!ELEMENT access-control-list (country-access+)>

<!--
control-code - Access control code

  This Access control code can be attributed by:
    app - applicant
    off - office of first filing
    wipo - wipo.
-->
<!ELEMENT control-code (#PCDATA)>

<!ATTLIST control-code  type  (app | off | wipo)  #REQUIRED >

<!--
  Wrapped document referenced; e.g.record copy, certified priority document.

-->
<!ELEMENT wrapped-document EMPTY>

<!ATTLIST wrapped-document  status       CDATA  #IMPLIED
                            package-type  (wad | wasp | sep)  #REQUIRED
                            lang         CDATA  #IMPLIED
                            file         CDATA  #REQUIRED
                            id           ID     #IMPLIED >

<!ELEMENT first-filing-office-confirmation-date (date)>

<!ELEMENT applicant-confirmation-date (date)>

<!--
  PCT/RO/101 Box No. X:
  The signature must be that of the applicant (if there are several applicants, all
  must sign); however, the signature may be that of the agent, or the common
  representative, where a separate power of attorney appointing the agent or the
  common representative, respectively, or a copy of a general power of attorney is
  already in possession of the receiving Office, is furnished...
  (PCT Rules 4.1(d), 4.15, and 90)

  Indicate the capacity of the signer with 'signatory-capacity'

-->
<!ELEMENT signatory (%name_group; , address? , electronic-signature , signatory-capacity?)>

<!--
  A signature represented by electronic means

-->
<!ELEMENT electronic-signature (basic-signature | enhanced-signature)>

<!ATTLIST electronic-signature  place-signed CDATA  #IMPLIED
                                  date         CDATA  #REQUIRED >
<!--
  The capacity in which the person signs

-->
<!ELEMENT signatory-capacity (#PCDATA)>

<!--
  A non-PKI electronic signature

-->
<!ELEMENT basic-signature (fax-image | text-string | click-wrap)>

<!--
  A PKI / PKCS #7 digital signature data type

-->
<!ELEMENT enhanced-signature (pkcs7)>

<!--
  PKCS7 digital signature 

-->
<!ELEMENT pkcs7 EMPTY>

<!--
  A TIFF image of a signature

-->
<!ELEMENT fax-image EMPTY>

<!ATTLIST fax-image  file CDATA  #REQUIRED >
<!--
  A simple text string is to be used as the basic electronic signature;
  e.g., John Doe  <text-string>/jd/</text-string>

-->
<!ELEMENT text-string (#PCDATA)>

<!--
  A simple 'signature';
  e.g., clicking a button labeled 'accept' or 'I agree'

-->
<!ELEMENT click-wrap EMPTY>

<!--
AS US WILL NOT USE THIS ROUTE NOT REQUIRED IN XML
ELEMENT OPTIONAL IN LIBRARY-ENTRY REMOVED
<!ELEMENT national-identifier (#PCDATA)>
-->
<!ELEMENT parent (document-id?)>
<!ATTLIST parent appl-type            CDATA  #IMPLIED
                 ip-type              (industrial-design | patent | trademark | utility-model)  #REQUIRED>

<!ELEMENT referencing-application (document-id?)>
<!ATTLIST referencing-application 	appl-type            CDATA  #IMPLIED
                 ip-type              (industrial-design | patent | trademark | utility-model)  #REQUIRED>

<!ELEMENT country-access (country , access-grant-date?)>

<!ATTLIST country-access  access  (allow | revoke)  #IMPLIED >
<!--
  * presence indicates publicly available now (from the optionally included date)
-->
<!ELEMENT publicly-available (date?)>

<!--
access-grant-date NOT EXPECTED TO BE TRANSMITTED
but part of the database model
-->
<!ELEMENT access-grant-date (date)>

<!ELEMENT storage-request-list (storage-request+)>

<!ELEMENT storage-request (storage-library-entry-list, comments?)>

<!--
THE MEANING OF THE OPERATION attribute
- add-entry          - create a new library entry based on Unique key described in (document-id | parent)
- withdraw-entry     - DISABLE ACCESS to all documents defined by the unique key entries  
                       described in (document-id | parent) (system will retain inaccessible withdrawn entries)
- add-document       - ONLY add the document content
- withdraw-document  - ONLY withdraw the document content

For replacement request, two storage-requests should be used as in the order of 'withdraw' and 'add' by providing the appropriate
document properties.

NOTE UPDATE OF PROPERTIES INCL ACCESS CONTROL LIST/ CODE IS NOT PROVIDED FOR VIA XML
-->

<!ATTLIST storage-request  route  (A | B | C | D | U)  		            #REQUIRED 
	                   operation   (add-entry | withdraw-entry | add-document | withdraw-document)  #REQUIRED>

<!ELEMENT storage-library-entry-list (library-entry-owner-details?, library-entry+)>
 
<!ELEMENT library-entry-owner-details (library-entry-owner, signatory? , default-access-control? , storage-request-document?)>

<!ELEMENT default-access-control (access-control-list? , control-code?)>

<!--
  * holder for original document from applicant

-->
<!ELEMENT storage-request-document (wrapped-document)>

<!ELEMENT comments (#PCDATA)>

<!-- element to be used when retrieving a document
must be omitted when storing a document
-->
<!ELEMENT retrieval-request-list (retrieval-request+)>

<!ELEMENT retrieval-request (retrieval-library-entry-list)>

<!ELEMENT retrieval-library-entry-list (library-entry+)>

<!--
THE MEANING OF THE OPERATION attribute
- get-document        - get the document content (and properties)
- get-properties      - ONLY get the document properties
                      described in (document-id | parent) (system will retain inaccessible withdrawn entries)

NOTE UPDATE OF PROPERTIES INCL ACCESS CONTROL LIST/ CODE IS NOT PROVIDED FOR VIA XML
-->
<!ATTLIST retrieval-request operation (get-document | get-properties)  #REQUIRED>
