All of the code samples in XQuery for Humanists are offered here to facilitate your learning of the material. You can download a zip file containing all the code from the book from this link:

Also, you can view each sample online and download them individually below.

In the book, many code samples were presented in partial form in the course of discussion. Here, the corresponding versions of the code samples here have been expanded, as needed, to ensure they can run as standalone queries. When a query cannot be run as a standalone query, it is shown with a “txt” file extension file rather than the “xq” file extension.

Change log

Date Version Change
March 22, 2020 1.0.0 Initial release

Individual code samples

Each code sample can be viewed online or downloaded in raw, plain text format via the following links.

No. Pp. Files
1 2 001-pp2.xml [raw]
2 3 002-pp3.xq [raw]
3 3 003-pp3.xq [raw]
4 10 004-pp10.json [raw]
5 10 005-pp10.json [raw]
6 11 006-pp11.txt [raw]
7 21 007-pp21.txt [raw]
8 22 008-pp22.xq [raw]
9 22 009-pp22.xml [raw]
10 24 010-pp24.xml [raw]
11 26 011-pp26.txt [raw]
12 26 012-pp26.xml [raw]
13 36 013-pp36.xml [raw]
14 36 014-pp36.xml [raw]
15 36 015-pp36.txt [raw]
16 36 016-pp36.xml [raw]
17 37 017-pp37.xml [raw]
18 37 018-pp37.xml [raw]
19 37 019-pp37.txt [raw]
20 37 020-pp37.txt [raw]
21 38 021-pp38.txt [raw]
22 42 022-pp42.xml [raw]
23 47 023-pp47.txt [raw]
24 48 024-pp48.xml [raw]
25 49 025-pp49.txt [raw]
26 49 026-pp49.xml [raw]
27 49 027-pp49.xml [raw]
28 50 028-pp50.xml [raw]
29 50 029-pp50.xml [raw]
30 51 030-pp51.xml [raw]
31 51 031-pp51.xml [raw]
32 51 032-pp51.xq [raw]
33 54 033-pp54.xml [raw]
34 56 034-pp56.xml [raw]
35 57 035-pp57.xq [raw]
36 58 036-pp58.xml [raw]
37 58 037-pp58.xq [raw]
38 59 038-pp59.xq [raw]
39 59 039-pp59.xq [raw]
40 60 040-pp60.xq [raw]
41 61 041-pp61.xq [raw]
42 62 042-pp62.xq [raw]
43 62 043-pp62.xq [raw]
44 62 044-pp62.xq [raw]
45 62 045-pp62.xq [raw]
46 62 046-pp62.xq [raw]
47 62 047-pp62.xq [raw]
48 63 048-pp63.xq [raw]
49 65 049-pp65.xq [raw]
50 66 050-pp66.xq [raw]
51 66 051-pp66.xq [raw]
52 67 052-pp67.xq [raw]
53 69 053-pp69.xq [raw]
54 70 054-pp70.xq [raw]
55 70 055-pp70.xq [raw]
56 71 056-pp71.xq [raw]
57 71 057-pp71.xq [raw]
58 72 058-pp72.xq [raw]
59 73 059-pp73.xq [raw]
60 73 060-pp73.xq [raw]
61 74 061-pp74.xq [raw]
62 75 062-pp75.xq [raw]
63 75 063-pp75.xq [raw]
64 77 064-pp77.xq [raw]
65 77 065-pp77.xq [raw]
66 80 066-pp80.xq [raw]
67 81 067-pp81.txt [raw]
68 81 068-pp81.txt [raw]
69 81 069-pp81.xq [raw]
70 82 070-pp82.xq [raw]
71 83 071-pp83.xq [raw]
72 84 072-pp84.xq [raw]
73 84 073-pp84.xq [raw]
74 85 074-pp85.xq [raw]
75 86 075-pp86.xq [raw]
76 86-87 076-pp86-87.xq [raw]
77 88 077-pp88.xq [raw]
78 89 078-pp89.xq [raw]
79 90 079-pp90.xml [raw]
80 91 080-pp91.xq [raw]
81 91 081-pp91.xq [raw]
82 92 082-pp92.xq [raw]
83 92 083-pp92.xq [raw]
84 93 084-pp93.xq [raw]
85 94 085-pp94.xq [raw]
86 94 086-pp94.xml [raw]
87 95 087-pp95.xq [raw]
88 95 088-pp95.xq [raw]
89 95 089-pp95.xq [raw]
90 95 090-pp95.xq [raw]
91 96 091-pp96.txt [raw]
92 97 092-pp97.xq [raw]
93 97 093-pp97.xq [raw]
94 98 094-pp98.xq [raw]
95 98 095-pp98.xq [raw]
96 98 096-pp98.xq [raw]
97 99 097-pp99.xq [raw]
98 99-100 098-pp99-100.txt [raw]
99 101 099-pp101.xq [raw]
100 102 100-pp102.xq [raw]
101 104 101-pp104.xq [raw]
102 109 102-pp109.xq [raw]
103 109 103-pp109.xq [raw]
104 111 104-pp111.xq [raw]
105 111 105-pp111.xq [raw]
106 111 106-pp111.xq [raw]
107 112 107-pp112.xq [raw]
108 112 108-pp112.xq [raw]
109 112 109-pp112.xq [raw]
110 112 110-pp112.xq [raw]
111 113 111-pp113.xq [raw]
112 114 112-pp114.xml [raw]
113 115 113-pp115.txt [raw]
114 116-117 114-pp116-117.xq [raw]
115 117 115-pp117.txt [raw]
116 117 116-pp117.xq [raw]
117 118 117-pp118.xq [raw]
118 119-120 118-pp119-120.txt [raw]
119 120 119-pp120.xq [raw]
120 122 120-pp122.txt [raw]
121 123 121-pp123.xq [raw]; tei-functions.xqm [raw]
122 126 122-pp126.xq [raw]; tei-functions.xqm [raw]
123 129 123-pp129.xml [raw]
124 130 124-pp130.xml [raw]
125 132 125-pp132.txt [raw]
126 132 126-pp132.xq [raw]
127 132 127-pp132.xq [raw]
128 133 128-pp133.xq [raw]
129 133 129-pp133.xq [raw]
130 134 130-pp134.xq [raw]
131 134 131-pp134.txt [raw]
132 135 132-pp135.xq [raw]
133 135 133-pp135.xq [raw]
134 136 134-pp136.xq [raw]
135 137 135-pp137.xq [raw]
136 137 136-pp137.xq [raw]
137 137 137-pp137.xq [raw]
138 138 138-pp138.xq [raw]
139 138 139-pp138.xq [raw]
140 138 140-pp138.xq [raw]
141 139 141-pp139.xml [raw]
142 140 142-pp140.xq [raw]
143 140 143-pp140.xq [raw]
144 140 144-pp140.xq [raw]
145 141 145-pp141.xq [raw]
146 142 146-pp142.xq [raw]
147 142 147-pp142.xq [raw]
148 142-143 148-pp142-143.xq [raw]
149 143 149-pp143.xq [raw]
150 143 150-pp143.xq [raw]
151 143-144 151-pp143-144.xq [raw]
152 144 152-pp144.xq [raw]
153 145 153-pp145.xq [raw]
154 145 154-pp145.xq [raw]
155 146 155-pp146.xq [raw]
156 146 156-pp146.xq [raw]
157 146 157-pp146.xq [raw]
158 146 158-pp146.xq [raw]
159 146 159-pp146.xq [raw]
160 146 160-pp146.xq [raw]
161 146 161-pp146.xq [raw]
162 147 162-pp147.xq [raw]
163 147 163-pp147.xq [raw]
164 147 164-pp147.xq [raw]
165 148 165-pp148.xq [raw]
166 148 166-pp148.xq [raw]
167 148 167-pp148.xq [raw]
168 148 168-pp148.xq [raw]
169 148 169-pp148.xq [raw]
170 148 170-pp148.xq [raw]
171 149 171-pp149.xq [raw]
172 149 172-pp149.xq [raw]
173 149 173-pp149.xq [raw]
174 150 174-pp150.xq [raw]
175 150 175-pp150.xq [raw]
176 150-151 176-pp150-151.xq [raw]
177 151 177-pp151.xq [raw]
178 151 178-pp151.xq [raw]
179 151 179-pp151.xq [raw]
180 151-152 180-pp151-152.xq [raw]
181 153 181-pp153.xml [raw]
182 153 182-pp153.xq [raw]
183 154 183-pp154.xq [raw]
184 155 184-pp155.xq [raw]
185 157 185-pp157.txt [raw]
186 157 186-pp157.xq [raw]
187 164 187-pp164.xq [raw]
188 165 188-pp165.xq [raw]
189 166 189-pp166.xq [raw]
190 166-167 190-pp166-167.xq [raw]
191 168 191-pp168.txt [raw]
192 168 192-pp168.xq [raw]
193 170 193-pp170.xq [raw]
194 170 194-pp170.xq [raw]
195 173 195-pp173.xq [raw]
196 174 196-pp174.xq [raw]
197 177 197-pp177.xq [raw]
198 179-180 198-pp179-180.xml [raw]
199 180 199-pp180.xml [raw]
200 182 200-pp182.txt [raw]
201 182-183 201-pp182-183.xq [raw]
202 185-186 202-pp185-186.xml [raw]
203 187 203-pp187.xml [raw]
204 187-188 204-pp187-188.xq [raw]
205 188-189 205-pp188-189.xq [raw]
206 191-195 206-pp191-195.xq [raw]
207 195-196 207-pp195-196.xq [raw]
208 197 208-pp197.xq [raw]
209 201 209-pp201.xml [raw]
210 202 210-pp202.xq [raw]
211 202 211-pp202.xml [raw]
212 202 212-pp202.xq [raw]
213 203 213-pp203.xml [raw]
214 203 214-pp203.xq [raw]
215 203-204 215-pp203-204.xq [raw]
216 205 216-pp205.xq [raw]
217 205 217-pp205.xq [raw]
218 205 218-pp205.xq [raw]
219 205 219-pp205.xq [raw]
220 205 220-pp205.xq [raw]
221 206 221-pp206.xq [raw]
222 206 222-pp206.xml [raw]
223 206 223-pp206.xq [raw]
224 207 224-pp207.xq [raw]
225 207-208 225-pp207-208.xml [raw]
226 208 226-pp208.xq [raw]
227 208-209 227-pp208-209.xml [raw]
228 209 228-pp209.xq [raw]
229 209 229-pp209.xml [raw]
230 210 230-pp210.xq [raw]
231 211 231-pp211.xml [raw]
232 211-212 232-pp211-212.xq [raw]
233 213 233-pp213.xq [raw]
234 214 234-pp214.xq [raw]
235 216 235-pp216.xq [raw]
236 216 236-pp216.xq [raw]
237 217 237-pp217.xq [raw]
238 218 238-pp218.xq [raw]
239 218 239-pp218.xq [raw]
240 218 240-pp218.xq [raw]
241 219 241-pp219.xml [raw]
242 221 242-pp221.xq [raw]
243 223 243-pp223.xml [raw]
244 225 244-pp225.xq [raw]
245 225 245-pp225.xq [raw]
246 225 246-pp225.xq [raw]
247 225 247-pp225.xq [raw]
248 226 248-pp226.xq [raw]
249 227 249-pp227.xq [raw]
250 227 250-pp227.xq [raw]
251 227 251-pp227.xq [raw]
252 227 252-pp227.xq [raw]
253 228 253-pp228.xq [raw]
254 229 254-pp229.xq [raw]
255 231-232 255-pp231-232.xml [raw]
256 232 256-pp232.xq [raw]
257 232 257-pp232.xq [raw]
258 232 258-pp232.xq [raw]
259 234 259-pp234.xq [raw]
260 234 260-pp234.xq [raw]
261 235 261-pp235.xq [raw]
262 235 262-pp235.xq [raw]
263 235 263-pp235.xq [raw]
264 235 264-pp235.xq [raw]
265 236 265-pp236.xq [raw]
266 236 266-pp236.xq [raw]
267 236 267-pp236.xq [raw]
268 236 268-pp236.xq [raw]
269 236 269-pp236.xq [raw]
270 237 270-pp237.xq [raw]
271 238 271-pp238.xq [raw]
272 238 272-pp238.xq [raw]
273 238 273-pp238.xq [raw]
274 238 274-pp238.xq [raw]
275 238 275-pp238.xq [raw]
276 238 276-pp238.xq [raw]
277 238 277-pp238.xq [raw]
278 238 278-pp238.xq [raw]
279 238 279-pp238.xq [raw]
280 239 280-pp239.xq [raw]
281 239 281-pp239.xq [raw]
282 239 282-pp239.xq [raw]
283 240 283-pp240.xq [raw]
284 240 284-pp240.txt [raw]
285 241 285-pp241.txt [raw]
286 241 286-pp241.txt [raw]
287 241 287-pp241.xq [raw]
288 241 288-pp241.xq [raw]
289 242-243 289-pp242-243.xq [raw]
290 243 290-pp243.txt [raw]
291 244 291-pp244.xq [raw]
292 245 292-pp245.xq [raw]
293 245 293-pp245.xq [raw]
294 245 294-pp245.xq [raw]
295 245 295-pp245.xq [raw]
296 245 296-pp245.xq [raw]
297 246 297-pp246.xq [raw]
298 246 298-pp246.xq [raw]
299 246 299-pp246.xq [raw]
300 247 300-pp247.xq [raw]
301 247 301-pp247.xq [raw]; stopwords.txt [raw]
302 248 302-pp248.xq [raw]
303 248 303-pp248.xq [raw]
304 248 304-pp248.xq [raw]
305 248 305-pp248.xq [raw]
306 249 306-pp249.xq [raw]
307 253 307-pp253.txt [raw]
308 253 308-pp253.txt [raw]
309 254 309-pp254.txt [raw]
310 255 310-pp255.xq [raw]
311 255-256 311-pp255-256.xq [raw]
312 259 312-pp259.xq [raw]
313 260 313-pp260.xq [raw]
314 261 314-pp261.xq [raw]
315 262 315-pp262.xq [raw]
316 263 316-pp263.xq [raw]
317 263 317-pp263.xq [raw]
318 263 318-pp263.xq [raw]
319 264 319-pp264.xq [raw]
320 272 320-pp272.json [raw]
321 272 321-pp272.json [raw]
322 272 322-pp272.json [raw]
323 273 323-pp273.xq [raw]
324 273-274 324-pp273-274.xq [raw]
325 274 325-pp274.xq [raw]
326 274 326-pp274.json [raw]
327 275 327-pp275.xq [raw]
328 275 328-pp275.xq [raw]
329 275 329-pp275.xq [raw]
330 276 330-pp276.xq [raw]
331 278 331-pp278.xq [raw]
332 278 332-pp278.xq [raw]
333 279 333-pp279.xml [raw]
334 279 334-pp279.xq [raw]
335 282 335-pp282.xq [raw]; books.csv [raw]
336 282 336-pp282.xq [raw]; books.csv [raw]
337 282 337-pp282.xq [raw]; books.csv [raw]
338 283 338-pp283.xq [raw]; books.csv [raw]
339 283 339-pp283.xq [raw]; books.csv [raw]
340 284-287 340-pp284-287.xq [raw]; books.csv [raw]
341 287 341-pp287.xml [raw]
342 290 342-pp290.xq [raw]; books.xml [raw]
343 288-290 343-pp288-290.xq [raw]; books.xml [raw]
344 292 344-pp292.xml [raw]
345 292 345-pp292.xq [raw]; books.xml [raw]; books.xsl [raw]
346 293 346-pp293.xml [raw]