[This local archive copy is from the official and canonical URL, http://www.receipt.org/dridtd.htm, 1999-01-19; please refer to the canonical source document if possible.]
Kent M. Davidson
Differential, Inc.
Revision 0.9
This document is a work in progress of the Digital Receipt DTD specification,
and is subject to change.
Feedback is welcome by e-mailing the above address.
This document may be distributed freely provided it is not altered or modified in any way.
This DTD specification contains labeled sections which contains information about the various elements in the DTD:
XML: |
The raw XML text which appears in the DTD | ||||||
Use: |
How this particular Element should be used within an XML document, and the intention of the data within the element. | ||||||
Parents: |
The other elements which may include this element | ||||||
Children: |
The child elements which may be included within this element | ||||||
Attributes: |
Contains a chart in the format:
|
||||||
Notes: |
Any special notes when creating or generating this element | ||||||
Example: |
An example use of this element in context. |
XML: |
<?xml version="1.0" encoding="US-ASCII"?> <!-- Document Type Definition for Generic Digital Receipts --> |
|||||||||
Use: |
A well-formed XML DTD document must begin with the version of XML it is implemented using, as well as the default encoding of the document. The XML header must include at least this information in order for compatible XML parsers to be able to ready this DTD. | |||||||||
Parents: |
No parents. | |||||||||
Children: |
No children. | |||||||||
Attributes: |
|
|||||||||
Notes: |
See the XML specification. |
XML: |
<!ELEMENT receipt (raw_receipt, signature+)> <!ATTLIST receipt version CDATA #REQUIRED type CDATA #REQUIRED unique_id ID #REQUIRED > |
||||||||||||
Use: |
The receipt element is the master container for a digital receipt. It contains a single raw_receipt, and at least one signature. A digital receipt, while in transit, may accumulate multiple signatures depending on the workflow the number of parties who validate the accuracy of a receipt. | ||||||||||||
Parents: |
No parents. | ||||||||||||
Children: |
raw_receipt signature |
||||||||||||
Attributes: |
|
||||||||||||
Notes: |
A single entity of a Digital Receipt contains a single <receipt>...</receipt> element. | ||||||||||||
Example: |
See Example section. |
XML: |
<!ELEMENT raw_receipt ( issuer, recipients+, issue_date, first_signing_date, primary_content, related_receipts* ) > |
Use: |
The raw_receipt element is the core of a receipt itself . Each signature of a receipt actually signs aspects of the raw_receipt data as the content being signed. The raw_receipt element in a receipt contains the issuing entity, one or more recipients, the date of issue, the first signature date, and a list of zero or more related receipt IDs. |
Parents: |
receipt |
Children: |
issuer recipients issue_date first_signing_date primary_content related_receipts |
Attributes: |
None. |
Notes: |
None. |
Example: |
See Example section. |
XML: |
<!ELEMENT issuer (entity)> |
Use: |
The issuer element is a container which labels the entity which actually issued the receipt originally. A single issuer exists for a receipt. The original generator of a receipt should fill in the issuer entity as itself. |
Parents: |
raw_receipt |
Children: |
entity |
Attributes: |
None. |
Notes: |
None. |
Example: |
<issuer> <entity id = "283018246192387" printed_name = "Aiden the Auditor" logoURL = "http://www.auditor-service.com/images/logo.gif"> </entity> </issuer> |
XML: |
<!ELEMENT recipients (entity+)> |
Use: |
The recipients element is a container for one or more recipients entites. When a receipt is originally issued, the parties that the original issuer relays the receipt to should fill in the recipients section before signing the receipt. |
Parents: |
raw_receipt |
Children: |
entity |
Attributes: |
None. |
Notes: |
None. |
Example: |
<recipients> <entity id = "283018246192387" printed_name = "Aiden the Auditor" logoURL = "http://www.auditor-service.com/images/logo.gif"> </entity> </recipients> |
XML: |
<!ELEMENT issue_date (date)> |
Use: |
The issue_date element is a container for a date element. The issue date is the original date of issue of a receipt by the issuer. |
Parents: |
raw_receipt |
Children: |
date |
Attributes: |
None. |
Notes: |
None. |
Example: |
<issue_date> <date year = "1998" month = "10" day = "2" hour = "22" minute = "45" second = "31"> </date> </issue_date> |
XML: |
<!ELEMENT first_signing_date (date)> |
Use: |
The first_signing_date element is a container for a date element. The first signing date is the original date of signing by any party. |
Parents: |
raw_receipt |
Children: |
date |
Attributes: |
None. |
Notes: |
None. |
Example: |
<first_signing_date> <date year = "1998" month = "10" day = "2" hour = "22" minute = "45" second = "31"> </date> </first_signing_date> |
XML: |
<!ELEMENT primary_content(description,primary_document)> <!ATTLIST primary_content id CDATA #REQUIRED type CDATA #IMPLIED status CDATA #IMPLIED > |
||||||||||||
Use: |
The primary_content element serves as the container for the actual receipt data. | ||||||||||||
Parents: |
raw_receipt | ||||||||||||
Children: |
description primary_document |
||||||||||||
Attributes: |
|
||||||||||||
Notes: |
None. | ||||||||||||
Example: |
XML: |
<!ELEMENT description (#PCDATA)> |
Use: |
The description element delimits a string which outlines a description of the containing element. The description is not meant to be parsed, but instead must be displayed to the user through some form of user interface. |
Parents: |
primary_content |
Children: |
None. |
Attributes: |
None. |
Notes: |
CHANGE: Include international languages in specification |
Example: |
<description> Document transferred by Extranet Courier service <\description> |
XML: |
<!ELEMENT primary_document ANY> |
Use: |
The intention of the primary_document element is to allow developers to create their own document types which can extend the receipt basic DTD type. The example section shows how this can be done. |
Parents: |
primary_content |
Children: |
User-defined. |
Attributes: |
None. |
Notes: |
None. |
Example: |
<primary_document> Traded 100 Shares ORCL via e-Trade </primary_document> |
XML: |
<!ELEMENT related_receipts EMPTY> <!ATTLIST related_receipts id ID #REQUIRED relationship CDATA #REQUIRED > |
|||||||||
Use: |
A receipt may contain zero or more related_receipts elements. Receipts which are coordinated and represent some form of workflow should be connected via the unique ID of the related receipts and the relationship. | |||||||||
Parents: |
raw_receipt | |||||||||
Children: |
None. | |||||||||
Attributes: |
|
|||||||||
Notes: |
CHANGE: Update relationship to be standardized enumerated type. | |||||||||
Example: |
XML: |
<!ELEMENT signature (signing_date+)> <!ATTLIST signature sigid CDATA #REQUIRED comment CDATA #REQUIRED algorithm CDATA #REQUIRED signature CDATA #REQUIRED signor_id CDATA #REQUIRED key_id CDATA #REQUIRED certificate CDATA #IMPLIED > |
||||||||||||||||||||||||
Use: |
The signature element is the core of the digital receipt which signs the content and provides the legal verifiability of the receipt document, as well as providing linkages to the X.509 certificates which orignated the signatures. | ||||||||||||||||||||||||
Parents: |
receipt | ||||||||||||||||||||||||
Children: |
signing_date | ||||||||||||||||||||||||
Attributes: |
|
||||||||||||||||||||||||
Notes: |
None. | ||||||||||||||||||||||||
Example: |
<signature sigid = "AUTH::20:01:01:01:64::2" comment = "sign 2" algorithm = "SHA1withDSA" signor_id = "AUTH::20:01:01:01:64" key_id = "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCyjxUoaZLEtDUcs+X6" "HCi6fkcsfo2gjQwOfhETSCeV/deJb4r4MGvZxMMxyO+cSuGaVEEhXiXT" "lz5lQPKpqNsIwimKKK1UC7gmklJPScbWl/VvnkHlHbYtDLocj2sxxMYR" "orPlhMcxG2y8jx9dtXKGuscjk6S3A2ei0Egy2iyXIwIDAQAB" transaction = "true" signature = "go8ZbiNmwI1bxGuW+Z4fyCVNU0IFbitfjGCBhM5rm2I9ffW6eaKNDeyic" "X//4FFsf6tCvpR+ZMTCkh8v8lH/62JK69yxHStnfqtYwN4NWcJkBK18RC" "DQGIEK35c2+XR93QVn875GwQr+eORxdE9a6ym4aFgdJ4xmllr5fbkoHoM=" > |
XML: |
<!ELEMENT entity EMPTY> <!ATTLIST entity id CDATA #REQUIRED printed_name CDATA #IMPLIED logoURL CDATA #IMPLIED > |
||||||||||||
Use: |
An entity represents a member involved in a transaction. | ||||||||||||
Parents: |
issuer recipients |
||||||||||||
Children: |
None. | ||||||||||||
Attributes: |
|
||||||||||||
Notes: |
None. | ||||||||||||
Example: |
<entity id = "283018246192387" printed_name = "Aiden the Auditor" logoURL = "http://www.auditor-service.com/images/logo.gif"> </entity> |
XML: |
<!ELEMENT signing_date (date)> |
Use: |
The signing date element is a container for the date element, and indicates when a signature on a receipt was executed. |
Parents: |
signature |
Children: |
date |
Attributes: |
None. |
Notes: |
None. |
Example: |
<signing_date> <date year="1998" month="8" day="22"> </date> </signing_date> |
XML: |
<!ELEMENT date EMPTY> <!ATTLIST date year CDATA #REQUIRED month CDATA #REQUIRED day CDATA #REQUIRED hour CDATA #IMPLIED minute CDATA #IMPLIED second CDATA #IMPLIED > |
|||||||||||||||||||||
Use: |
Just like any legal document, a digital receipt requires at least the day, month, and year in a date format. Hours, minutes, and seconds are optional. Dates are used to stamp the time on receipt to indicate when particular actions were taken. | |||||||||||||||||||||
Parents: |
first_signing_date issue_date signing_date |
|||||||||||||||||||||
Children: |
None. | |||||||||||||||||||||
Attributes: |
|
|||||||||||||||||||||
Notes: |
All dates are specified in GMT. CHANGE: Support alternate time zones. CHANGE: There will be a potential change in this spec to support a standardized date format. Also, definition will be expanded to include trusted time specification. |
|||||||||||||||||||||
Example: |
<date year="1999" month="1" day="18" hour="10" minute="32" second="44"> </date> |
<!DOCTYPE receipt SYSTEM "dri.dtd" [ <!-- Override the default primary document definition --> <!ELEMENT primary_document (InsuranceRequest | InsuranceResponse)> <!ELEMENT InsuranceRequest (InsurablePurchase)> <!ATTLIST InsuranceRequest RequestId CDATA #REQUIRED AmountRequested CDATA #REQUIRED > <!ELEMENT InsurablePurchase ( Supplier, Manufacturer, PurchaseItem ) > <!ELEMENT Supplier EMPTY> <!ATTLIST Supplier Name CDATA #REQUIRED Id CDATA #REQUIRED > <!ELEMENT Manufacturer EMPTY> <!ATTLIST Manufacturer Name CDATA #REQUIRED Id CDATA #REQUIRED > <!ELEMENT PurchaseItem EMPTY> <!ATTLIST PurchaseItem ProductCode CDATA #REQUIRED> ProductName CDATA #REQUIRED> ProductPrice CDATA #REQUIRED> Quantity CDATA #REQUIRED> Amount CDATA #REQUIRED> <!ELEMENT InsuranceResponse (InsuranceDenial | InsuranceApproval)> <!ELEMENT InsuranceDenial (Insurable)> <!ATTLIST InsuranceDenial RequestId CDATA #REQUIRED Reason CDATA #REQUIRED > <!ELEMENT InsuranceApproval (InsuranceAmount, Insurable)> <!ATTLIST InsuranceApproval RequestId CDATA #REQUIRED Reason CDATA #REQUIRED > ]>
<?xml version = "1.0"?> <!DOCTYPE receipt SYSTEM "insurance.dtd"> <receipt version = "1.000" type = "insurance request" unique_id = "AUTH::20:01:01:01:64::000111"> <raw_receipt> <issuer> <entity id = "283018246192387" printed_name = "Aiden the Auditor" logoURL = "http://www.auditor-service.com/images/logo.gif"> </entity> </issuer> <recipients> <entity id = "8287493634920367" printed_name = "Maya Manufacturing" logoURL = "ftp://ftp.maya.com/pub/maya.GIF"> </entity> </recipients> <recipients> <entity id = "8287493634920367" printed_name = "Global Industries Notary" logoURL = "http://www.global.com/logo.GIF"> </entity> </recipients> <issue_date> <date year = "1998" month = "10" day = "2" hour = "22" minute = "43" second = "14"> </date> </issue_date> <first_signing_date> <date year = "1998" month = "10" day = "2" hour = "22" minute = "43" second = "14"> </date> </first_signing_date> <related_receipts id = "AUTH::20:01:01:01:64::000105" relationship = "57876568"> </related_receipts> <related_receipts id = "AUTH::20:01:01:01:64::000103" relationship = "57876568"> </related_receipts> <primary_data> <description> Insurance request for insurable purchase. </description> <primary_document> <!-- The content of the receipt--> <InsuranceRequest RequestId = "13927" AmountRequested = "5000000"> <InsurablePurchase> <Supplier Name = "TP2" Id = "S1234"> </Supplier> <Manufacturer Name = "MF1" Id = "M4567"> </Manufacturer> </InsurablePurchase> </InsuranceRequest> </primary_document> </primary_data> </raw_receipt> <signature sigid = "AUTH::20:01:01:01:64::1" type = "signature" reason = "Fulfilled" comment = "sign 1" algorithm = "MD5WithRSAEncryption" signor_id = "AUTH::20:01:01:01:64" key_id = "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCyjxUoaZLEtDUcs+X6HCi6fkcsfo2gjQwOfhETSCeV/deJb4r4MGvZxMMxyO+cSuGaVEEhXiXTlz5lQPKpqNsIwimKKK1UC7gmklJPScbWl/VvnkHlHbYtDLocj2sxxMYRorPlhMcxG2y8jx9dtXKGuscjk6S3A2ei0Egy2iyXIwIDAQAB" transaction = "true" signature = "GbQzb1WT0Hgo8yPy8XV7WjU9hZXV0XIsQh+DSHxItsxGuosMd6/Z7Ekhbg26qB/mtsLSNNLMsCL0OW/94eBU/AQR2CXP5v+2q8iiw+BK1iJfdGxpY6ekjX/BiJpajeLnkyyCh6AC1ffb/taGbSCR/j6LFqWy8rzE0aaKS8taqss=" > <signing_date> <date year = "1998" month = "10" day = "2" hour = "22" minute = "45" second = "3"> </date> </signing_date> </signature> <signature sigid = "AUTH::20:01:01:01:64::2" type = "signature" reason = "Received" comment = "sign 2" algorithm = "MD5WithRSAEncryption" signor_id = "AUTH::20:01:01:01:64" key_id = "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCyjxUoaZLEtDUcs+X6HCi6fkcsfo2gjQwOfhETSCeV/deJb4r4MGvZxMMxyO+cSuGaVEEhXiXTlz5lQPKpqNsIwimKKK1UC7gmklJPScbWl/VvnkHlHbYtDLocj2sxxMYRorPlhMcxG2y8jx9dtXKGuscjk6S3A2ei0Egy2iyXIwIDAQAB" transaction = "true" signature = "go8ZbiNmwI1bxGuW+Z4fyCVNU0IFbitfjGCBhM5rm2I9ffW6eaKNDeyicX//4FFsf6tCvpR+ZMTCkh8v8lH/62JK69yxHStnfqtYwN4NWcJkBK18RCDQGIEK35c2+XR93QVn875GwQr+eORxdE9a6ym4aFgdJ4xmllr5fbkoHoM=" > <signing_date> <date year = "1998" month = "10" day = "2" hour = "22" minute = "45" second = "31"> </date> </signing_date> </signature> </receipt>
<?xml version="1.0" encoding="US-ASCII"?> <!-- Document Type Definition for Generic Digital Receipts --> <!-- Copyright Differential, Inc. 1998 --> <!-- { Start of DOCTYPE receipt --> <!ELEMENT receipt (raw_receipt, signature+)> <!ATTLIST receipt version CDATA #REQUIRED type CDATA #REQUIRED unique_id ID #REQUIRED > <!ELEMENT raw_receipt ( issuer, recipients+, issue_date, first_signing_date, primary_content, related_receipts* ) > <!ELEMENT issuer (entity)> <!ELEMENT recipients (entity)+> <!ELEMENT issue_date (date)> <!ELEMENT first_signing_date (date)> <!ELEMENT primary_content(description,primary_document)> <!ATTLIST primary_content id CDATA #REQUIRED type CDATA #IMPLIED status CDATA #IMPLIED > <!ELEMENT description (#PCDATA)> <!-- Applications override the "primary_document" element with domain-specific definitions --> <!ELEMENT primary_document ANY> <!ELEMENT related_receipts EMPTY> <!ATTLIST related_receipts id CDATA #REQUIRED relationship CDATA #REQUIRED > <!ELEMENT signature (signing_date+) > <!ATTLIST signature sigid CDATA #REQUIRED comment CDATA #REQUIRED algorithm CDATA #REQUIRED signature CDATA #REQUIRED signor_id CDATA #REQUIRED key_id CDATA #REQUIRED certificate CDATA #IMPLIED > <!ELEMENT entity (#PCDATA)> <!ATTLIST entity id CDATA #REQUIRED logoURL CDATA #IMPLIED > <!ELEMENT signing_date (date)> <!ELEMENT date EMPTY> <!ATTLIST date year CDATA #REQUIRED month CDATA #REQUIRED day CDATA #REQUIRED hours CDATA #IMPLIED minutes CDATA #IMPLIED seconds CDATA #IMPLIED > <!-- End of DOCTYPE receipt } -->
The XML Recommended Specification from the World Wide Web Consortium (W3C):