-
Notifications
You must be signed in to change notification settings - Fork 0
/
database.xml
118 lines (117 loc) · 3.86 KB
/
database.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="database.xsl"?>
<!DOCTYPE database
[
<!ELEMENT database (books,readers,borrows)>
<!ELEMENT books (book+)>
<!ATTLIST book id CDATA #REQUIRED>
<!ELEMENT book (title,author)>
<!ELEMENT title (#PCDATA)>
<!ELEMENT author (#PCDATA)>
<!ELEMENT readers (reader+)>
<!ATTLIST reader id CDATA #REQUIRED>
<!ELEMENT reader (name,lastname,address)>
<!ELEMENT name (#PCDATA)>
<!ELEMENT lastname (#PCDATA)>
<!ELEMENT address (#PCDATA)>
<!ELEMENT borrows (borrow+)>
<!ATTLIST borrow id CDATA #REQUIRED>
<!ELEMENT borrow (startdate,enddate)>
<!ATTLIST borrow reader IDREF #REQUIRED>
<!ATTLIST borrow book IDREF #REQUIRED>
<!ELEMENT startdate (#PCDATA)>
<!ELEMENT enddate (#PCDATA)>
]>
<database>
<books>
<book id="Book1">
<title>Papierowy Mag</title>
<author>Holmberg</author>
</book>
<book id="Book2">
<title>Szklany Mag</title>
<author>Holmberg</author>
</book>
<book id="Book3">
<title>Mitologia Nordycka</title>
<author>Gaiman</author>
</book>
<book id="Book4">
<title>Amerykanscy Bogowie</title>
<author>Gaiman</author>
</book>
<book id="Book5">
<title>Eragon</title>
<author>Paolini</author>
</book>
<book id="Book6">
<title>Silmarilion</title>
<author>Tolkien</author>
</book>
</books>
<readers>
<reader id="Reader1">
<name>Jan</name>
<lastname>Nowak</lastname>
<address>Warszawa</address>
</reader>
<reader id="Reader2">
<name>Michał</name>
<lastname>Czajkowski</lastname>
<address>Kielce</address>
</reader>
<reader id="Reader3">
<name>Marcin</name>
<lastname>Chodorek</lastname>
<address>Nieskurzów Stary</address>
</reader>
<reader id="Reader4">
<name>Adam</name>
<lastname>Kowalski</lastname>
<address>Kraków</address>
</reader>
<reader id="Reader5">
<name>Adam</name>
<lastname>Małysz</lastname>
<address>Zakopane</address>
</reader>
</readers>
<borrows>
<borrow id="Borrow1" reader="Reader2" book="Book3">
<startdate>04/01/2021</startdate>
<enddate>04/02/2021</enddate>
</borrow>
<borrow id="Borrow2" reader="Reader1" book="Book2">
<startdate>10/01/2021</startdate>
<enddate>10/02/2021</enddate>
</borrow>
<borrow id="Borrow3" reader="Reader4" book="Book1">
<startdate>28/12/2020</startdate>
<enddate>28/01/2021</enddate>
</borrow>
<borrow id="Borrow4" reader="Reader3" book="Book5">
<startdate>17/12/2020</startdate>
<enddate>17/01/2021</enddate>
</borrow>
<borrow id="Borrow5" reader="Reader5" book="Book4">
<startdate>01/01/2021</startdate>
<enddate>01/02/2021</enddate>
</borrow>
<borrow id="Borrow6" reader="Reader1" book="Book1">
<startdate>01/01/2021</startdate>
<enddate>01/02/2021</enddate>
</borrow>
<borrow id="Borrow7" reader="Reader2" book="Book6">
<startdate>02/01/2021</startdate>
<enddate>02/02/2021</enddate>
</borrow>
<borrow id="Borrow8" reader="Reader5" book="Book3">
<startdate>03/01/2021</startdate>
<enddate>03/02/2021</enddate>
</borrow>
<borrow id="Borrow9" reader="Reader3" book="Book2">
<startdate>22/01/2021</startdate>
<enddate>22/02/2021</enddate>
</borrow>
</borrows>
</database>