2 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.
4 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.
6 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.
8 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.
10 A closed auction is described by seller (a person), buyer (a person), item, price, data, quantity, type, and annotation (as above).
12 A category has a name and a description (as above). There is a category graph modelling a relationship between categories.
16 <!ELEMENT site (regions, categories, catgraph, people, open_auctions, closed_auctions)>
18 <!ELEMENT categories (category+)>
19 <!ELEMENT category (name, description)>
20 <!ATTLIST category id ID #REQUIRED>
21 <!ELEMENT name (#PCDATA)>
22 <!ELEMENT description (text | parlist)>
23 <!ELEMENT text (#PCDATA | bold | keyword | emph)*>
24 <!ELEMENT bold (#PCDATA | bold | keyword | emph)*>
25 <!ELEMENT keyword (#PCDATA | bold | keyword | emph)*>
26 <!ELEMENT emph (#PCDATA | bold | keyword | emph)*>
27 <!ELEMENT parlist (listitem)*>
28 <!ELEMENT listitem (text | parlist)*>
30 <!ELEMENT catgraph (edge*)>
32 <!ATTLIST edge from IDREF #REQUIRED to IDREF #REQUIRED>
34 <!ELEMENT regions (africa, asia, australia, europe, namerica, samerica)>
35 <!ELEMENT africa (item*)>
36 <!ELEMENT asia (item*)>
37 <!ELEMENT australia (item*)>
38 <!ELEMENT namerica (item*)>
39 <!ELEMENT samerica (item*)>
40 <!ELEMENT europe (item*)>
41 <!ELEMENT item (location, quantity, name, payment, description, shipping, incategory+, mailbox)>
42 <!ATTLIST item id ID #REQUIRED
43 featured CDATA #IMPLIED>
44 <!ELEMENT location (#PCDATA)>
45 <!ELEMENT quantity (#PCDATA)>
46 <!ELEMENT payment (#PCDATA)>
47 <!ELEMENT shipping (#PCDATA)>
48 <!ELEMENT reserve (#PCDATA)>
49 <!ELEMENT incategory EMPTY>
50 <!ATTLIST incategory category IDREF #REQUIRED>
51 <!ELEMENT mailbox (mail*)>
52 <!ELEMENT mail (from, to, date, text)>
53 <!ELEMENT from (#PCDATA)>
54 <!ELEMENT to (#PCDATA)>
55 <!ELEMENT date (#PCDATA)>
56 <!ELEMENT itemref EMPTY>
57 <!ATTLIST itemref item IDREF #REQUIRED>
58 <!ELEMENT personref EMPTY>
59 <!ATTLIST personref person IDREF #REQUIRED>
61 <!ELEMENT people (person*)>
62 <!ELEMENT person (name, emailaddress, phone?, address?, homepage?, creditcard?, profile?, watches?)>
63 <!ATTLIST person id ID #REQUIRED>
64 <!ELEMENT emailaddress (#PCDATA)>
65 <!ELEMENT phone (#PCDATA)>
66 <!ELEMENT address (street, city, country, province?, zipcode)>
67 <!ELEMENT street (#PCDATA)>
68 <!ELEMENT city (#PCDATA)>
69 <!ELEMENT province (#PCDATA)>
70 <!ELEMENT zipcode (#PCDATA)>
71 <!ELEMENT country (#PCDATA)>
72 <!ELEMENT homepage (#PCDATA)>
73 <!ELEMENT creditcard (#PCDATA)>
74 <!ELEMENT profile (interest*, education?, gender?, business, age?)>
75 <!ATTLIST profile income CDATA #IMPLIED>
76 <!ELEMENT interest EMPTY>
77 <!ATTLIST interest category IDREF #REQUIRED>
78 <!ELEMENT education (#PCDATA)>
79 <!ELEMENT income (#PCDATA)>
80 <!ELEMENT gender (#PCDATA)>
81 <!ELEMENT business (#PCDATA)>
82 <!ELEMENT age (#PCDATA)>
83 <!ELEMENT watches (watch*)>
84 <!ELEMENT watch EMPTY>
85 <!ATTLIST watch open_auction IDREF #REQUIRED>
87 <!ELEMENT open_auctions (open_auction*)>
88 <!ELEMENT open_auction (initial, reserve?, bidder*, current, privacy?, itemref, seller, annotation, quantity, type, interval)>
89 <!ATTLIST open_auction id ID #REQUIRED>
90 <!ELEMENT privacy (#PCDATA)>
91 <!ELEMENT initial (#PCDATA)>
92 <!ELEMENT bidder (date, time, personref, increase)>
93 <!ELEMENT seller EMPTY>
94 <!ATTLIST seller person IDREF #REQUIRED>
95 <!ELEMENT current (#PCDATA)>
96 <!ELEMENT increase (#PCDATA)>
97 <!ELEMENT type (#PCDATA)>
98 <!ELEMENT interval (start, end)>
99 <!ELEMENT start (#PCDATA)>
100 <!ELEMENT end (#PCDATA)>
101 <!ELEMENT time (#PCDATA)>
102 <!ELEMENT status (#PCDATA)>
103 <!ELEMENT amount (#PCDATA)>
105 <!ELEMENT closed_auctions (closed_auction*)>
106 <!ELEMENT closed_auction (seller, buyer, itemref, price, date, quantity, type, annotation?)>
107 <!ELEMENT buyer EMPTY>
108 <!ATTLIST buyer person IDREF #REQUIRED>
109 <!ELEMENT price (#PCDATA)>
110 <!ELEMENT annotation (author, description?, happiness)>
112 <!ELEMENT author EMPTY>
113 <!ATTLIST author person IDREF #REQUIRED>
114 <!ELEMENT happiness (#PCDATA)>