Add the auction.dtd document type definition to the repository.
authorKim Nguyễn <kn@lri.fr>
Mon, 19 Mar 2012 17:41:12 +0000 (18:41 +0100)
committerKim Nguyễn <kn@lri.fr>
Tue, 20 Mar 2012 20:16:04 +0000 (21:16 +0100)
tests/docs/auction.dtd [new file with mode: 0644]

diff --git a/tests/docs/auction.dtd b/tests/docs/auction.dtd
new file mode 100644 (file)
index 0000000..f952cae
--- /dev/null
@@ -0,0 +1,114 @@
+<!--
+This is a short description of XMark DTD. XMark DTD models an Internet auction website. The main entities are: item, person, open auction, closed auction and category. Each entity has an unique identifier called id. 
+
+An item is described by name, region of provenience, featured, location, quantity, description, shipping, mailbox. The description element is a typical example of a text-centric XML element. It can be either a text (possibly marked up with bold, emph, and keyword tags) or a paragraph list. A paragraph list is composed of any number of list items. Each list item, recursively, is either a text or a paragraph list. A mailbox is a list of zero or more mail messages, each of them has from, to, date and text (as above). An item belongs to one or more categories. 
+
+A person is described by name, email address, phone, address, homepage, credit card, profile. The address has street, city, country, province, and zip code. The profile has income, education, gender, business, and age. A person can be interested in zero or more categories and can be watching zero or more open auctions. 
+
+An open auction is described by initial value, reserve, current value, privacy, annotation, quantity, type, start, and end. An annotation has an author (a person), a description (as above), and a degree of happiness. Moreover, an open auction has a seller (a person), an item, and zero or more bids. Each bid is described by date, time, bidding person, and increase. 
+
+A closed auction is described by seller (a person), buyer (a person), item, price, data, quantity, type, and annotation (as above).
+
+A category has a name and a description (as above). There is a category graph modelling a relationship between categories. 
+
+-->
+
+<!ELEMENT site            (regions, categories, catgraph, people, open_auctions, closed_auctions)>
+
+<!ELEMENT categories      (category+)>
+<!ELEMENT category        (name, description)>
+<!ATTLIST category        id ID #REQUIRED>
+<!ELEMENT name            (#PCDATA)>
+<!ELEMENT description     (text | parlist)>
+<!ELEMENT text            (#PCDATA | bold | keyword | emph)*>
+<!ELEMENT bold           (#PCDATA | bold | keyword | emph)*>
+<!ELEMENT keyword        (#PCDATA | bold | keyword | emph)*>
+<!ELEMENT emph           (#PCDATA | bold | keyword | emph)*>
+<!ELEMENT parlist        (listitem)*>
+<!ELEMENT listitem        (text | parlist)*>
+
+<!ELEMENT catgraph        (edge*)>
+<!ELEMENT edge            EMPTY>
+<!ATTLIST edge            from IDREF #REQUIRED to IDREF #REQUIRED>
+
+<!ELEMENT regions         (africa, asia, australia, europe, namerica, samerica)>
+<!ELEMENT africa          (item*)>
+<!ELEMENT asia            (item*)>
+<!ELEMENT australia       (item*)>
+<!ELEMENT namerica        (item*)>
+<!ELEMENT samerica        (item*)>
+<!ELEMENT europe          (item*)>
+<!ELEMENT item            (location, quantity, name, payment, description, shipping, incategory+, mailbox)>
+<!ATTLIST item            id ID #REQUIRED
+                          featured CDATA #IMPLIED>
+<!ELEMENT location        (#PCDATA)>
+<!ELEMENT quantity        (#PCDATA)>
+<!ELEMENT payment         (#PCDATA)>
+<!ELEMENT shipping        (#PCDATA)>
+<!ELEMENT reserve         (#PCDATA)>
+<!ELEMENT incategory      EMPTY>
+<!ATTLIST incategory      category IDREF #REQUIRED>
+<!ELEMENT mailbox         (mail*)>
+<!ELEMENT mail            (from, to, date, text)>
+<!ELEMENT from            (#PCDATA)>
+<!ELEMENT to              (#PCDATA)>
+<!ELEMENT date            (#PCDATA)>
+<!ELEMENT itemref         EMPTY>
+<!ATTLIST itemref         item IDREF #REQUIRED>
+<!ELEMENT personref       EMPTY>
+<!ATTLIST personref       person IDREF #REQUIRED>
+
+<!ELEMENT people          (person*)>
+<!ELEMENT person          (name, emailaddress, phone?, address?, homepage?, creditcard?, profile?, watches?)>
+<!ATTLIST person          id ID #REQUIRED>
+<!ELEMENT emailaddress    (#PCDATA)>
+<!ELEMENT phone           (#PCDATA)>
+<!ELEMENT address         (street, city, country, province?, zipcode)>
+<!ELEMENT street          (#PCDATA)>
+<!ELEMENT city            (#PCDATA)>
+<!ELEMENT province        (#PCDATA)>
+<!ELEMENT zipcode         (#PCDATA)>
+<!ELEMENT country         (#PCDATA)>
+<!ELEMENT homepage        (#PCDATA)>
+<!ELEMENT creditcard      (#PCDATA)>
+<!ELEMENT profile         (interest*, education?, gender?, business, age?)>
+<!ATTLIST profile         income CDATA #IMPLIED>
+<!ELEMENT interest        EMPTY>
+<!ATTLIST interest        category IDREF #REQUIRED>
+<!ELEMENT education       (#PCDATA)>
+<!ELEMENT income          (#PCDATA)>
+<!ELEMENT gender          (#PCDATA)>
+<!ELEMENT business        (#PCDATA)>
+<!ELEMENT age             (#PCDATA)>
+<!ELEMENT watches         (watch*)>
+<!ELEMENT watch           EMPTY>
+<!ATTLIST watch           open_auction IDREF #REQUIRED>
+
+<!ELEMENT open_auctions   (open_auction*)>
+<!ELEMENT open_auction    (initial, reserve?, bidder*, current, privacy?, itemref, seller, annotation, quantity, type, interval)>
+<!ATTLIST open_auction    id ID #REQUIRED>
+<!ELEMENT privacy         (#PCDATA)>
+<!ELEMENT initial         (#PCDATA)>
+<!ELEMENT bidder          (date, time, personref, increase)>
+<!ELEMENT seller          EMPTY>
+<!ATTLIST seller          person IDREF #REQUIRED>
+<!ELEMENT current         (#PCDATA)>
+<!ELEMENT increase        (#PCDATA)>
+<!ELEMENT type            (#PCDATA)>
+<!ELEMENT interval        (start, end)>
+<!ELEMENT start           (#PCDATA)>
+<!ELEMENT end             (#PCDATA)>
+<!ELEMENT time            (#PCDATA)>
+<!ELEMENT status          (#PCDATA)>
+<!ELEMENT amount          (#PCDATA)>
+
+<!ELEMENT closed_auctions (closed_auction*)>
+<!ELEMENT closed_auction  (seller, buyer, itemref, price, date, quantity, type, annotation?)>
+<!ELEMENT buyer           EMPTY>
+<!ATTLIST buyer           person IDREF #REQUIRED>
+<!ELEMENT price           (#PCDATA)>
+<!ELEMENT annotation      (author, description?, happiness)>
+
+<!ELEMENT author          EMPTY>
+<!ATTLIST author          person IDREF #REQUIRED>
+<!ELEMENT happiness       (#PCDATA)>