<!--batch-payment.dtd

********************************************************************************
* revision history                                                             *
********************************************************************************

08/03/2017
..renamed fees procedure attribute value from UPP to UP

02/12/2016
..added optional 'rejected' attribute to 'fee' element structure

19/01/2016
..changed version number to v2-00
..added 'procedure' attribute to 'fees' element structure
..more then one element 'document-id' is allowed in 'fees' element structure
..made 'kind' element mandatory member of the 'document-id' element structure

30/10/2008
Written by Leo Sarasua(lsarasua@epo.org) and Paul Brewin(pbrewin@epo.org)
Modified by Viktar Arlou(varlou@epo.org)

10/07/2003 Created

See:
- Annex F
- "EPO Supplement to Official Journal, No. 2/1999", pp. 38-45. (diskette batch payment)
- MIPEX (fee renewal).
- fee-sheet.dtd, ep-request.dtd, renewal.dtd
-->
<!ELEMENT batch-payment  (header,detail,trailer) >

<!--Attribute ro: Receiving office: use ST.3 country code (it also includes EP, WO)
 payment-date CDATA #IMPLIED
-->
<!ATTLIST batch-payment
               dtd-version  CDATA    #REQUIRED 
               date-produced  CDATA    #REQUIRED 
               ro  CDATA    #REQUIRED  >

<!ELEMENT header  (sender,send-date,mode-of-payment,payment-reference-id?,
               receipt-request*) >

<!--Name and address of user-->
<!ELEMENT sender  ((name | (prefix?,(last-name | orgname),first-name?,middle-name?,
               suffix?,iid?,role?,orgname?,department?,synonym*)),registered-number?,
               address?,text?) >

<!--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  >

<!--Title: e.g., Mr., Mrs., Dr. etc-->
<!ELEMENT prefix  (#PCDATA) >

<!--last, family, surname-->
<!ELEMENT last-name  (#PCDATA) >

<!--organisation name or company name - 
Use with "Legal person"-->
<!ELEMENT orgname  (#PCDATA) >

<!--First or given name(s), initial(s)-->
<!ELEMENT first-name  (#PCDATA) >

<!--middle name(s) or initial(s)-->
<!ELEMENT middle-name  (#PCDATA) >

<!--name suffix (e.g., II, Jr., Dip., Ing., BA, etc.)-->
<!ELEMENT suffix  (#PCDATA) >

<!--individual id
for applicant as employee use this tag for the authorisation number-->
<!ELEMENT iid  (#PCDATA) >

<!--role, e.g. President, Chairman, etc.-->
<!ELEMENT role  (#PCDATA) >

<!--department, division, section, etc. name-->
<!ELEMENT department  (#PCDATA) >

<!--Another possible form of writing the name
(eg. transliterations from non Latin languages,
IBM instead of "International Business Machines", etc...)-->
<!ELEMENT synonym  (#PCDATA) >

<!--registered, customer number,
Use for APPR and FREP-->
<!ELEMENT registered-number  (#PCDATA) >

<!--address components:
Address formats differ from country to country
If no structure possible use text-->
<!ELEMENT address  ((address-1?,address-2?,address-3?,mailcode?,pobox?,room?,
               address-floor?,building?,street?,city?,county?,state?,postcode?,
               country) | text) >

<!--Address, first line-->
<!ELEMENT address-1  (#PCDATA) >

<!--Address, second line-->
<!ELEMENT address-2  (#PCDATA) >

<!--Address, third line-->
<!ELEMENT address-3  (#PCDATA) >

<!--organizational mail code-->
<!ELEMENT mailcode  (#PCDATA) >

<!--Post Office Box number-->
<!ELEMENT pobox  (#PCDATA) >

<!--address room; e.g., Room 55B-->
<!ELEMENT room  (#PCDATA) >

<!--address floor, e.g., 10th-->
<!ELEMENT address-floor  (#PCDATA) >

<!--building information in address, e.g., Hoffman building-->
<!ELEMENT building  (#PCDATA) >

<!--street may contain house number or name-->
<!ELEMENT street  (#PCDATA) >

<!--City or town name-->
<!ELEMENT city  (#PCDATA) >

<!--County, parish, department, etc (mainly UK, USA)-->
<!ELEMENT county  (#PCDATA) >

<!--Region of country e.g. state, province, etc.-->
<!ELEMENT state  (#PCDATA) >

<!--postal code or zip code-->
<!ELEMENT postcode  (#PCDATA) >

<!--Country: use ST.3 country code, e.g. DE, FR, GB, NL, etc.
Also includes EP, WO-->
<!ELEMENT country  (#PCDATA) >

<!--If no structure is possible, enter text (without mark-up)-->
<!ELEMENT text  (#PCDATA) >

<!--Date on which payment request is sent. Format YYYYMMDD.-->
<!ELEMENT send-date  (#PCDATA) >

<!ELEMENT mode-of-payment  (deposit-account?, text?) >

<!ATTLIST mode-of-payment
               payment-type (auto | bank-draft | cash | charge | cheque | coupons | 
               deposit | ccard | credit-card | giro | postal-order | stamps | other)   #REQUIRED 
               currency  CDATA    #IMPLIED  >

<!--Authorization to charge or credit deposit account
-->
<!ELEMENT deposit-account  (authorization?,account-no,signatories?) >

<!--Type(s) of authorization
-->
<!ELEMENT authorization  (total-fee?,deficiency-credit?) >

<!--Authorization to charge the total fees indicated.
-->
<!ELEMENT total-fee   EMPTY  >

<!--Authorization to charge any deficiency or credit any overpayment.
-->
<!ELEMENT deficiency-credit   EMPTY  >

<!--deposit account number
-->
<!ELEMENT account-no  (#PCDATA) >

<!--signatories
-->
<!ELEMENT signatories  (signatory+) >

<!--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)
This means that orgname alone cannot be used in this case.
Indicate the capacity of the signer with 'signatory-capacity'
-->
<!ELEMENT signatory  (((name | (prefix?,last-name,first-name,middle-name?,suffix?,
               iid?,role?,orgname?,department?,synonym*)),registered-number?),
               address?,electronic-signature?,signatory-capacity?) >

<!--A signature represented by electronic means
-->
<!ELEMENT electronic-signature  (basic-signature | enhanced-signature) >

<!ATTLIST electronic-signature
               date  CDATA    #REQUIRED 
               place-signed  CDATA    #IMPLIED  >

<!--A non-PKI electronic signature
-->
<!ELEMENT basic-signature  (fax-image | text-string | click-wrap) >

<!--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  >

<!--A PKI / PKCS #7 digital signature data type
-->
<!ELEMENT enhanced-signature  (pkcs7) >

<!--PKCS7 digital signature
-->
<!ELEMENT pkcs7   EMPTY  >

<!--the capacity in which the person signs
-->
<!ELEMENT signatory-capacity  (#PCDATA) >

<!--Applicant's or agent's payment reference. 12 characters maximum.-->
<!ELEMENT payment-reference-id  (#PCDATA) >

<!--Receipt of the payment requested by user.
Possible attribute values:
E: electronic receipt; (default)
P: paper receipt, specifying debited fees;
O: other possible form of receipt;-->
<!ELEMENT receipt-request  (#PCDATA) >

<!ATTLIST receipt-request
               receipt-code (E | P | O)   #IMPLIED  >

<!--One record for each of the payments being made.-->
<!ELEMENT detail  (fees+) >

<!ELEMENT fees  (document-id+,file-reference-id?,owner*,fee*) >

<!ATTLIST fees procedure (EP | PCT | UP) #REQUIRED>

<!--Document identification refers to patents and patent
applications only. See WIPO ST.14.
In the case of EPO batch-payment this must always be the application number.-->
<!ELEMENT document-id  (country,doc-number,kind,name?,date?) >

<!ATTLIST document-id
               lang  CDATA    #IMPLIED  >

<!ELEMENT doc-number  (#PCDATA) >

<!--document kind code:
- application for application number (default)
- publication for publication/patent number
-->
<!ELEMENT kind  (#PCDATA) >

<!--Document Date.
Format YYYYMMDD.-->
<!ELEMENT date  (#PCDATA) >

<!--Applicant's or agent's file reference. 12 characters maximum.-->
<!ELEMENT file-reference-id  (#PCDATA) >

<!--Owner or applicant (reference number).-->
<!ELEMENT owner  (#PCDATA) >

<!--A fee (or payment) record.-->
<!ELEMENT 	fee  (type-of-fee,fee-sub-amount,fee-factor,fine*,fee-reduction*,
               fee-total-amount,fee-date-due?,text?,country*) >

<!-- Presence of the 'rejected' attribute with non-empty value indicates that payment is not accepted,
     value describes reason. -->
<!ATTLIST fee
               rejected  CDATA    #IMPLIED
               currency  CDATA    #IMPLIED  >

<!--A code that describes the payment being made.-->
<!ELEMENT type-of-fee  (#PCDATA) >

<!--Unitary value of the fee.-->
<!ELEMENT fee-sub-amount  (#PCDATA) >

<!--How many times is the fee applied. Default value = 1-->
<!ELEMENT fee-factor  (#PCDATA) >

<!--Any possible fines to be paid w.r.t. this fee.-->
<!ELEMENT fine  (#PCDATA) >

<!ATTLIST fine
               fine-code  CDATA    #IMPLIED  >

<!--Any possible reductions applicable to this fee.-->
<!ELEMENT fee-reduction  (#PCDATA) >

<!ATTLIST fee-reduction
               reduction-code  CDATA    #IMPLIED  >

<!--The total amount to be paid for this fee.
fee-total-amount = fee-sub-amount * fee-factor + sum(fines) - sum(reductions)-->
<!ELEMENT fee-total-amount  (#PCDATA) >

<!--Date on which payment is due.
Format YYYYMMDD.-->
<!ELEMENT fee-date-due  (#PCDATA) >

<!ELEMENT trailer  (mode-of-payment?,batch-pay-total-amount?,total-records) >

<!--The sum of all fees for this transaction
Note that more than one total amount may be permitted,
as there may be multiple currencies in which payment is due.
-->
<!ELEMENT batch-pay-total-amount  (#PCDATA) >

<!ATTLIST batch-pay-total-amount
               currency  CDATA    #REQUIRED  >

<!--Total number of records (fees) to be debited in the batch.-->
<!ELEMENT total-records  (#PCDATA) >

