26 |
--------------------------------------------------------------------------------
/_drafts/2020-03-16-welcome.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: post
3 | title: "Welcome to XQuery for Humanists!"
4 | date: 2020-03-12 01:52:58 -0400
5 | ---
6 |
7 | We are thrilled that XQuery for Humanists is now available to the world!
--------------------------------------------------------------------------------
/_includes/authors.html:
--------------------------------------------------------------------------------
1 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/android-chrome-192x192.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coding4humanists/xquery4humanists/7c00d1ed4ae5b0e9dca14f6633cd72bdb0162469/android-chrome-192x192.png
--------------------------------------------------------------------------------
/android-chrome-512x512.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coding4humanists/xquery4humanists/7c00d1ed4ae5b0e9dca14f6633cd72bdb0162469/android-chrome-512x512.png
--------------------------------------------------------------------------------
/apple-touch-icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coding4humanists/xquery4humanists/7c00d1ed4ae5b0e9dca14f6633cd72bdb0162469/apple-touch-icon.png
--------------------------------------------------------------------------------
/code/004-pp10/004-pp10.json:
--------------------------------------------------------------------------------
1 | {
2 | "books":
3 | [
4 | "Hacking the Academy",
5 | "Digital Critical Editions"
6 | ]
7 | }
8 |
--------------------------------------------------------------------------------
/code/004-pp10/index.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: page
3 | title: Pp. 10 (no. 4)
4 | permalink: /code/004-pp10/
5 | ---
6 |
7 | This code sample is adapted from Clifford B. Anderson and Joseph C. Wicentowski,
8 | [_XQuery for Humanists_](/) (College Station: Texas A&M University Press, 2020), 10.
9 | Download this code sample in its [raw form](/code/004-pp10/004-pp10.json).
10 | View the source on [GitHub](https://github.com/coding4humanists/xquery4humanists/blob/release/code/004-pp10/004-pp10.json).
11 |
12 | ```json
13 | {
14 | "books":
15 | [
16 | "Hacking the Academy",
17 | "Digital Critical Editions"
18 | ]
19 | }
20 |
21 | ```
22 |
--------------------------------------------------------------------------------
/code/005-pp10/005-pp10.json:
--------------------------------------------------------------------------------
1 | ["i", "ii", "iii", 1, 2, 3, 4, 5, 6]
--------------------------------------------------------------------------------
/code/005-pp10/index.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: page
3 | title: Pp. 10 (no. 5)
4 | permalink: /code/005-pp10/
5 | ---
6 |
7 | This code sample is adapted from Clifford B. Anderson and Joseph C. Wicentowski,
8 | [_XQuery for Humanists_](/) (College Station: Texas A&M University Press, 2020), 10.
9 | Download this code sample in its [raw form](/code/005-pp10/005-pp10.json).
10 | View the source on [GitHub](https://github.com/coding4humanists/xquery4humanists/blob/release/code/005-pp10/005-pp10.json).
11 |
12 | ```json
13 | ["i", "ii", "iii", 1, 2, 3, 4, 5, 6]
14 | ```
15 |
--------------------------------------------------------------------------------
/code/006-pp11/006-pp11.txt:
--------------------------------------------------------------------------------
1 | @prefix schema: .
2 |
3 | schema:name
4 | "Karl Barth and the Making of Evangelical Theology"@en .
--------------------------------------------------------------------------------
/code/006-pp11/index.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: page
3 | title: Pp. 11 (no. 6)
4 | permalink: /code/006-pp11/
5 | ---
6 |
7 | This code sample is adapted from Clifford B. Anderson and Joseph C. Wicentowski,
8 | [_XQuery for Humanists_](/) (College Station: Texas A&M University Press, 2020), 11.
9 | Download this code sample in its [raw form](/code/006-pp11/006-pp11.txt).
10 | View the source on [GitHub](https://github.com/coding4humanists/xquery4humanists/blob/release/code/006-pp11/006-pp11.txt).
11 |
12 | ```ttl
13 | @prefix schema: .
14 |
15 | schema:name
16 | "Karl Barth and the Making of Evangelical Theology"@en .
17 | ```
18 |
--------------------------------------------------------------------------------
/code/007-pp21/007-pp21.txt:
--------------------------------------------------------------------------------
1 | brew cask install java exist-db oxygen-xml-editor
2 | brew install basex saxon
--------------------------------------------------------------------------------
/code/007-pp21/index.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: page
3 | title: Pp. 21 (no. 7)
4 | permalink: /code/007-pp21/
5 | ---
6 |
7 | This code sample is adapted from Clifford B. Anderson and Joseph C. Wicentowski,
8 | [_XQuery for Humanists_](/) (College Station: Texas A&M University Press, 2020), 21.
9 | Download this code sample in its [raw form](/code/007-pp21/007-pp21.txt).
10 | View the source on [GitHub](https://github.com/coding4humanists/xquery4humanists/blob/release/code/007-pp21/007-pp21.txt).
11 |
12 | ```bash
13 | brew cask install java exist-db oxygen-xml-editor
14 | brew install basex saxon
15 | ```
16 |
--------------------------------------------------------------------------------
/code/008-pp22/008-pp22.xq:
--------------------------------------------------------------------------------
1 | xquery version "3.1";
2 |
3 | Hello World!
--------------------------------------------------------------------------------
/code/008-pp22/index.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: page
3 | title: Pp. 22 (no. 8)
4 | permalink: /code/008-pp22/
5 | ---
6 |
7 | This code sample is adapted from Clifford B. Anderson and Joseph C. Wicentowski,
8 | [_XQuery for Humanists_](/) (College Station: Texas A&M University Press, 2020), 22.
9 | Download this code sample in its [raw form](/code/008-pp22/008-pp22.xq).
10 | View the source on [GitHub](https://github.com/coding4humanists/xquery4humanists/blob/release/code/008-pp22/008-pp22.xq).
11 |
12 | ```xquery
13 | xquery version "3.1";
14 |
15 | Hello World!
16 | ```
17 |
--------------------------------------------------------------------------------
/code/009-pp22/009-pp22.xml:
--------------------------------------------------------------------------------
1 | Hello World!
--------------------------------------------------------------------------------
/code/009-pp22/index.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: page
3 | title: Pp. 22 (no. 9)
4 | permalink: /code/009-pp22/
5 | ---
6 |
7 | This code sample is adapted from Clifford B. Anderson and Joseph C. Wicentowski,
8 | [_XQuery for Humanists_](/) (College Station: Texas A&M University Press, 2020), 22.
9 | Download this code sample in its [raw form](/code/009-pp22/009-pp22.xml).
10 | View the source on [GitHub](https://github.com/coding4humanists/xquery4humanists/blob/release/code/009-pp22/009-pp22.xml).
11 |
12 | ```xml
13 | Hello World!
14 | ```
15 |
--------------------------------------------------------------------------------
/code/010-pp24/010-pp24.xml:
--------------------------------------------------------------------------------
1 |
2 | Hello World!
--------------------------------------------------------------------------------
/code/010-pp24/index.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: page
3 | title: Pp. 24 (no. 10)
4 | permalink: /code/010-pp24/
5 | ---
6 |
7 | This code sample is adapted from Clifford B. Anderson and Joseph C. Wicentowski,
8 | [_XQuery for Humanists_](/) (College Station: Texas A&M University Press, 2020), 24.
9 | Download this code sample in its [raw form](/code/010-pp24/010-pp24.xml).
10 | View the source on [GitHub](https://github.com/coding4humanists/xquery4humanists/blob/release/code/010-pp24/010-pp24.xml).
11 |
12 | ```xml
13 |
14 | Hello World!
15 | ```
16 |
--------------------------------------------------------------------------------
/code/011-pp26/011-pp26.txt:
--------------------------------------------------------------------------------
1 | java -cp /Users/joe/SaxonHE9-9-0-1J/saxon9he.jar net.sf.saxon.Query hello-world.xq
--------------------------------------------------------------------------------
/code/011-pp26/index.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: page
3 | title: Pp. 26 (no. 11)
4 | permalink: /code/011-pp26/
5 | ---
6 |
7 | This code sample is adapted from Clifford B. Anderson and Joseph C. Wicentowski,
8 | [_XQuery for Humanists_](/) (College Station: Texas A&M University Press, 2020), 26.
9 | Download this code sample in its [raw form](/code/011-pp26/011-pp26.txt).
10 | View the source on [GitHub](https://github.com/coding4humanists/xquery4humanists/blob/release/code/011-pp26/011-pp26.txt).
11 |
12 | ```bash
13 | java -cp /Users/joe/SaxonHE9-9-0-1J/saxon9he.jar net.sf.saxon.Query hello-world.xq
14 | ```
15 |
--------------------------------------------------------------------------------
/code/012-pp26/012-pp26.xml:
--------------------------------------------------------------------------------
1 | Hello World!
--------------------------------------------------------------------------------
/code/012-pp26/index.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: page
3 | title: Pp. 26 (no. 12)
4 | permalink: /code/012-pp26/
5 | ---
6 |
7 | This code sample is adapted from Clifford B. Anderson and Joseph C. Wicentowski,
8 | [_XQuery for Humanists_](/) (College Station: Texas A&M University Press, 2020), 26.
9 | Download this code sample in its [raw form](/code/012-pp26/012-pp26.xml).
10 | View the source on [GitHub](https://github.com/coding4humanists/xquery4humanists/blob/release/code/012-pp26/012-pp26.xml).
11 |
12 | ```xml
13 | Hello World!
14 | ```
15 |
--------------------------------------------------------------------------------
/code/013-pp36/013-pp36.xml:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/code/013-pp36/index.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: page
3 | title: Pp. 36 (no. 13)
4 | permalink: /code/013-pp36/
5 | ---
6 |
7 | This code sample is adapted from Clifford B. Anderson and Joseph C. Wicentowski,
8 | [_XQuery for Humanists_](/) (College Station: Texas A&M University Press, 2020), 36.
9 | Download this code sample in its [raw form](/code/013-pp36/013-pp36.xml).
10 | View the source on [GitHub](https://github.com/coding4humanists/xquery4humanists/blob/release/code/013-pp36/013-pp36.xml).
11 |
12 | ```xml
13 |
14 | ```
15 |
--------------------------------------------------------------------------------
/code/014-pp36/014-pp36.xml:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/code/014-pp36/index.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: page
3 | title: Pp. 36 (no. 14)
4 | permalink: /code/014-pp36/
5 | ---
6 |
7 | This code sample is adapted from Clifford B. Anderson and Joseph C. Wicentowski,
8 | [_XQuery for Humanists_](/) (College Station: Texas A&M University Press, 2020), 36.
9 | Download this code sample in its [raw form](/code/014-pp36/014-pp36.xml).
10 | View the source on [GitHub](https://github.com/coding4humanists/xquery4humanists/blob/release/code/014-pp36/014-pp36.xml).
11 |
12 | ```xml
13 |
14 | ```
15 |
--------------------------------------------------------------------------------
/code/015-pp36/015-pp36.txt:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/code/015-pp36/index.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: page
3 | title: Pp. 36 (no. 15)
4 | permalink: /code/015-pp36/
5 | ---
6 |
7 | This code sample is adapted from Clifford B. Anderson and Joseph C. Wicentowski,
8 | [_XQuery for Humanists_](/) (College Station: Texas A&M University Press, 2020), 36.
9 | Download this code sample in its [raw form](/code/015-pp36/015-pp36.txt).
10 | View the source on [GitHub](https://github.com/coding4humanists/xquery4humanists/blob/release/code/015-pp36/015-pp36.txt).
11 |
12 | ```text
13 |
14 |
15 | ```
16 |
--------------------------------------------------------------------------------
/code/016-pp36/016-pp36.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/code/016-pp36/index.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: page
3 | title: Pp. 36 (no. 16)
4 | permalink: /code/016-pp36/
5 | ---
6 |
7 | This code sample is adapted from Clifford B. Anderson and Joseph C. Wicentowski,
8 | [_XQuery for Humanists_](/) (College Station: Texas A&M University Press, 2020), 36.
9 | Download this code sample in its [raw form](/code/016-pp36/016-pp36.xml).
10 | View the source on [GitHub](https://github.com/coding4humanists/xquery4humanists/blob/release/code/016-pp36/016-pp36.xml).
11 |
12 | ```xml
13 |
14 |
15 |
16 |
17 | ```
18 |
--------------------------------------------------------------------------------
/code/017-pp37/017-pp37.xml:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/code/017-pp37/index.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: page
3 | title: Pp. 37 (no. 17)
4 | permalink: /code/017-pp37/
5 | ---
6 |
7 | This code sample is adapted from Clifford B. Anderson and Joseph C. Wicentowski,
8 | [_XQuery for Humanists_](/) (College Station: Texas A&M University Press, 2020), 37.
9 | Download this code sample in its [raw form](/code/017-pp37/017-pp37.xml).
10 | View the source on [GitHub](https://github.com/coding4humanists/xquery4humanists/blob/release/code/017-pp37/017-pp37.xml).
11 |
12 | ```xml
13 |
14 | ```
15 |
--------------------------------------------------------------------------------
/code/018-pp37/018-pp37.xml:
--------------------------------------------------------------------------------
1 | Barack Obama
--------------------------------------------------------------------------------
/code/018-pp37/index.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: page
3 | title: Pp. 37 (no. 18)
4 | permalink: /code/018-pp37/
5 | ---
6 |
7 | This code sample is adapted from Clifford B. Anderson and Joseph C. Wicentowski,
8 | [_XQuery for Humanists_](/) (College Station: Texas A&M University Press, 2020), 37.
9 | Download this code sample in its [raw form](/code/018-pp37/018-pp37.xml).
10 | View the source on [GitHub](https://github.com/coding4humanists/xquery4humanists/blob/release/code/018-pp37/018-pp37.xml).
11 |
12 | ```xml
13 | Barack Obama
14 | ```
15 |
--------------------------------------------------------------------------------
/code/019-pp37/019-pp37.txt:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/code/019-pp37/index.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: page
3 | title: Pp. 37 (no. 19)
4 | permalink: /code/019-pp37/
5 | ---
6 |
7 | This code sample is adapted from Clifford B. Anderson and Joseph C. Wicentowski,
8 | [_XQuery for Humanists_](/) (College Station: Texas A&M University Press, 2020), 37.
9 | Download this code sample in its [raw form](/code/019-pp37/019-pp37.txt).
10 | View the source on [GitHub](https://github.com/coding4humanists/xquery4humanists/blob/release/code/019-pp37/019-pp37.txt).
11 |
12 | ```xml-fragment
13 |
14 | ```
15 |
--------------------------------------------------------------------------------
/code/020-pp37/020-pp37.txt:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/code/020-pp37/index.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: page
3 | title: Pp. 37 (no. 20)
4 | permalink: /code/020-pp37/
5 | ---
6 |
7 | This code sample is adapted from Clifford B. Anderson and Joseph C. Wicentowski,
8 | [_XQuery for Humanists_](/) (College Station: Texas A&M University Press, 2020), 37.
9 | Download this code sample in its [raw form](/code/020-pp37/020-pp37.txt).
10 | View the source on [GitHub](https://github.com/coding4humanists/xquery4humanists/blob/release/code/020-pp37/020-pp37.txt).
11 |
12 | ```xml-fragment
13 |
14 | ```
15 |
--------------------------------------------------------------------------------
/code/021-pp38/021-pp38.txt:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/code/021-pp38/index.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: page
3 | title: Pp. 38 (no. 21)
4 | permalink: /code/021-pp38/
5 | ---
6 |
7 | This code sample is adapted from Clifford B. Anderson and Joseph C. Wicentowski,
8 | [_XQuery for Humanists_](/) (College Station: Texas A&M University Press, 2020), 38.
9 | Download this code sample in its [raw form](/code/021-pp38/021-pp38.txt).
10 | View the source on [GitHub](https://github.com/coding4humanists/xquery4humanists/blob/release/code/021-pp38/021-pp38.txt).
11 |
12 | ```text
13 |
14 | ```
15 |
--------------------------------------------------------------------------------
/code/022-pp42/022-pp42.xml:
--------------------------------------------------------------------------------
1 |
In the first day of the first year of the second
2 | millennium, I looked outside my window, hoping to see hovercrafts
3 | flying by.
--------------------------------------------------------------------------------
/code/023-pp47/023-pp47.txt:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/code/023-pp47/index.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: page
3 | title: Pp. 47 (no. 23)
4 | permalink: /code/023-pp47/
5 | ---
6 |
7 | This code sample is adapted from Clifford B. Anderson and Joseph C. Wicentowski,
8 | [_XQuery for Humanists_](/) (College Station: Texas A&M University Press, 2020), 47.
9 | Download this code sample in its [raw form](/code/023-pp47/023-pp47.txt).
10 | View the source on [GitHub](https://github.com/coding4humanists/xquery4humanists/blob/release/code/023-pp47/023-pp47.txt).
11 |
12 | ```text
13 |
14 | ```
15 |
--------------------------------------------------------------------------------
/code/024-pp48/024-pp48.xml:
--------------------------------------------------------------------------------
1 | War and Peace
--------------------------------------------------------------------------------
/code/024-pp48/index.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: page
3 | title: Pp. 48 (no. 24)
4 | permalink: /code/024-pp48/
5 | ---
6 |
7 | This code sample is adapted from Clifford B. Anderson and Joseph C. Wicentowski,
8 | [_XQuery for Humanists_](/) (College Station: Texas A&M University Press, 2020), 48.
9 | Download this code sample in its [raw form](/code/024-pp48/024-pp48.xml).
10 | View the source on [GitHub](https://github.com/coding4humanists/xquery4humanists/blob/release/code/024-pp48/024-pp48.xml).
11 |
12 | ```xml
13 | War and Peace
14 | ```
15 |
--------------------------------------------------------------------------------
/code/025-pp49/025-pp49.txt:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/code/025-pp49/index.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: page
3 | title: Pp. 49 (no. 25)
4 | permalink: /code/025-pp49/
5 | ---
6 |
7 | This code sample is adapted from Clifford B. Anderson and Joseph C. Wicentowski,
8 | [_XQuery for Humanists_](/) (College Station: Texas A&M University Press, 2020), 49.
9 | Download this code sample in its [raw form](/code/025-pp49/025-pp49.txt).
10 | View the source on [GitHub](https://github.com/coding4humanists/xquery4humanists/blob/release/code/025-pp49/025-pp49.txt).
11 |
12 | ```text
13 |
16 | ```
17 |
--------------------------------------------------------------------------------
/code/026-pp49/026-pp49.xml:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/code/026-pp49/index.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: page
3 | title: Pp. 49 (no. 26)
4 | permalink: /code/026-pp49/
5 | ---
6 |
7 | This code sample is adapted from Clifford B. Anderson and Joseph C. Wicentowski,
8 | [_XQuery for Humanists_](/) (College Station: Texas A&M University Press, 2020), 49.
9 | Download this code sample in its [raw form](/code/026-pp49/026-pp49.xml).
10 | View the source on [GitHub](https://github.com/coding4humanists/xquery4humanists/blob/release/code/026-pp49/026-pp49.xml).
11 |
12 | ```xml
13 |
16 | ```
17 |
--------------------------------------------------------------------------------
/code/027-pp49/027-pp49.xml:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/code/027-pp49/index.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: page
3 | title: Pp. 49 (no. 27)
4 | permalink: /code/027-pp49/
5 | ---
6 |
7 | This code sample is adapted from Clifford B. Anderson and Joseph C. Wicentowski,
8 | [_XQuery for Humanists_](/) (College Station: Texas A&M University Press, 2020), 49.
9 | Download this code sample in its [raw form](/code/027-pp49/027-pp49.xml).
10 | View the source on [GitHub](https://github.com/coding4humanists/xquery4humanists/blob/release/code/027-pp49/027-pp49.xml).
11 |
12 | ```xml
13 |
16 | ```
17 |
--------------------------------------------------------------------------------
/code/028-pp50/028-pp50.xml:
--------------------------------------------------------------------------------
1 |
Hello!
I am an XML Document.
--------------------------------------------------------------------------------
/code/028-pp50/index.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: page
3 | title: Pp. 50 (no. 28)
4 | permalink: /code/028-pp50/
5 | ---
6 |
7 | This code sample is adapted from Clifford B. Anderson and Joseph C. Wicentowski,
8 | [_XQuery for Humanists_](/) (College Station: Texas A&M University Press, 2020), 50.
9 | Download this code sample in its [raw form](/code/028-pp50/028-pp50.xml).
10 | View the source on [GitHub](https://github.com/coding4humanists/xquery4humanists/blob/release/code/028-pp50/028-pp50.xml).
11 |
12 | ```xml
13 |
--------------------------------------------------------------------------------
/code/030-pp51/index.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: page
3 | title: Pp. 51 (no. 30)
4 | permalink: /code/030-pp51/
5 | ---
6 |
7 | This code sample is adapted from Clifford B. Anderson and Joseph C. Wicentowski,
8 | [_XQuery for Humanists_](/) (College Station: Texas A&M University Press, 2020), 51.
9 | Download this code sample in its [raw form](/code/030-pp51/030-pp51.xml).
10 | View the source on [GitHub](https://github.com/coding4humanists/xquery4humanists/blob/release/code/030-pp51/030-pp51.xml).
11 |
12 | ```xml
13 |
--------------------------------------------------------------------------------
/code/031-pp51/index.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: page
3 | title: Pp. 51 (no. 31)
4 | permalink: /code/031-pp51/
5 | ---
6 |
7 | This code sample is adapted from Clifford B. Anderson and Joseph C. Wicentowski,
8 | [_XQuery for Humanists_](/) (College Station: Texas A&M University Press, 2020), 51.
9 | Download this code sample in its [raw form](/code/031-pp51/031-pp51.xml).
10 | View the source on [GitHub](https://github.com/coding4humanists/xquery4humanists/blob/release/code/031-pp51/031-pp51.xml).
11 |
12 | ```xml
13 |
--------------------------------------------------------------------------------
/code/032-pp51/index.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: page
3 | title: Pp. 51 (no. 32)
4 | permalink: /code/032-pp51/
5 | ---
6 |
7 | This code sample is adapted from Clifford B. Anderson and Joseph C. Wicentowski,
8 | [_XQuery for Humanists_](/) (College Station: Texas A&M University Press, 2020), 51.
9 | Download this code sample in its [raw form](/code/032-pp51/032-pp51.xq).
10 | View the source on [GitHub](https://github.com/coding4humanists/xquery4humanists/blob/release/code/032-pp51/032-pp51.xq).
11 |
12 | ```xquery
13 | declare boundary-space preserve;
14 |
15 |
Hello!
I am an XML
16 | Document.
17 | ```
18 |
--------------------------------------------------------------------------------
/code/033-pp54/033-pp54.xml:
--------------------------------------------------------------------------------
1 |
2 | Dear
3 | Mr.
4 | Obama,
6 |
--------------------------------------------------------------------------------
/code/034-pp56/034-pp56.xml:
--------------------------------------------------------------------------------
1 |
2 | Primo Levi: The Matter of a Life
3 | Berel Lang
4 | November 26, 2013
5 |
6 | New Haven
7 | Yale University Press
8 |
9 | 0300137230
10 | 978-0300137231
11 |
--------------------------------------------------------------------------------
/code/035-pp57/035-pp57.xq:
--------------------------------------------------------------------------------
1 | xquery version "3.1";
2 |
3 | declare context item := document {
4 |
5 | Primo Levi: The Matter of a Life
6 | Berel Lang
7 | November 26, 2013
8 |
9 | New Haven
10 | Yale University Press
11 |
12 | 0300137230
13 | 978-0300137231
14 |
15 | };
16 |
17 | /child::book/child::title
--------------------------------------------------------------------------------
/code/036-pp58/036-pp58.xml:
--------------------------------------------------------------------------------
1 | Primo Levi: The Matter of a Life
--------------------------------------------------------------------------------
/code/036-pp58/index.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: page
3 | title: Pp. 58 (no. 36)
4 | permalink: /code/036-pp58/
5 | ---
6 |
7 | This code sample is adapted from Clifford B. Anderson and Joseph C. Wicentowski,
8 | [_XQuery for Humanists_](/) (College Station: Texas A&M University Press, 2020), 58.
9 | Download this code sample in its [raw form](/code/036-pp58/036-pp58.xml).
10 | View the source on [GitHub](https://github.com/coding4humanists/xquery4humanists/blob/release/code/036-pp58/036-pp58.xml).
11 |
12 | ```xml
13 | Primo Levi: The Matter of a Life
14 | ```
15 |
--------------------------------------------------------------------------------
/code/037-pp58/037-pp58.xq:
--------------------------------------------------------------------------------
1 | xquery version "3.1";
2 |
3 | declare context item := document {
4 |
5 | Primo Levi: The Matter of a Life
6 | Berel Lang
7 | November 26, 2013
8 |
9 | New Haven
10 | Yale University Press
11 |
12 | 0300137230
13 | 978-0300137231
14 |
15 | };
16 |
17 | /child::book/child::title/child::text()
--------------------------------------------------------------------------------
/code/038-pp59/038-pp59.xq:
--------------------------------------------------------------------------------
1 | xquery version "3.1";
2 |
3 | declare context item := document {
4 |
5 | Primo Levi: The Matter of a Life
6 | Berel Lang
7 | November 26, 2013
8 |
9 | New Haven
10 | Yale University Press
11 |
12 | 0300137230
13 | 978-0300137231
14 |
15 | };
16 |
17 | /child::book/child::identifier[attribute::type = "ISBN-13"]/
18 | child::text()
--------------------------------------------------------------------------------
/code/039-pp59/039-pp59.xq:
--------------------------------------------------------------------------------
1 | xquery version "3.1";
2 |
3 | declare context item := document {
4 |
5 | Primo Levi: The Matter of a Life
6 | Berel Lang
7 | November 26, 2013
8 |
9 | New Haven
10 | Yale University Press
11 |
12 | 0300137230
13 | 978-0300137231
14 |
15 | };
16 |
17 | /descendant-or-self::identifier[attribute::type = "ISBN-13"]/
18 | child::text()
--------------------------------------------------------------------------------
/code/040-pp60/040-pp60.xq:
--------------------------------------------------------------------------------
1 | xquery version "3.1";
2 |
3 | declare context item := document {
4 |
5 | Primo Levi: The Matter of a Life
6 | Berel Lang
7 | November 26, 2013
8 |
9 | New Haven
10 | Yale University Press
11 |
12 | 0300137230
13 | 978-0300137231
14 |
15 | };
16 |
17 | /descendant-or-self::press[child::text() = "Yale University Press"]
--------------------------------------------------------------------------------
/code/041-pp61/041-pp61.xq:
--------------------------------------------------------------------------------
1 | xquery version "3.1";
2 |
3 | declare context item := document {
4 |
5 | Primo Levi: The Matter of a Life
6 | Berel Lang
7 | November 26, 2013
8 |
9 | New Haven
10 | Yale University Press
11 |
12 | 0300137230
13 | 978-0300137231
14 |
15 | };
16 |
17 | /descendant-or-self::press[child::text() = "Yale University Press"]/
18 | parent::publisher/preceding-sibling::title/text()
--------------------------------------------------------------------------------
/code/042-pp62/042-pp62.xq:
--------------------------------------------------------------------------------
1 | xquery version "3.1";
2 |
3 | declare context item := document {
4 |
5 | Primo Levi: The Matter of a Life
6 | Berel Lang
7 | November 26, 2013
8 |
9 | New Haven
10 | Yale University Press
11 |
12 | 0300137230
13 | 978-0300137231
14 |
15 | };
16 |
17 | /child::book/child::title
--------------------------------------------------------------------------------
/code/043-pp62/043-pp62.xq:
--------------------------------------------------------------------------------
1 | xquery version "3.1";
2 |
3 | declare context item := document {
4 |
5 | Primo Levi: The Matter of a Life
6 | Berel Lang
7 | November 26, 2013
8 |
9 | New Haven
10 | Yale University Press
11 |
12 | 0300137230
13 | 978-0300137231
14 |
15 | };
16 |
17 | /book/title
--------------------------------------------------------------------------------
/code/044-pp62/044-pp62.xq:
--------------------------------------------------------------------------------
1 | xquery version "3.1";
2 |
3 | declare context item := document {
4 |
5 | Primo Levi: The Matter of a Life
6 | Berel Lang
7 | November 26, 2013
8 |
9 | New Haven
10 | Yale University Press
11 |
12 | 0300137230
13 | 978-0300137231
14 |
15 | };
16 |
17 | /book/identifier[@type = "ISBN-13"]
--------------------------------------------------------------------------------
/code/045-pp62/045-pp62.xq:
--------------------------------------------------------------------------------
1 | xquery version "3.1";
2 |
3 | declare context item := document {
4 |
5 | Primo Levi: The Matter of a Life
6 | Berel Lang
7 | November 26, 2013
8 |
9 | New Haven
10 | Yale University Press
11 |
12 | 0300137230
13 | 978-0300137231
14 |
15 | };
16 |
17 | //press
--------------------------------------------------------------------------------
/code/046-pp62/046-pp62.xq:
--------------------------------------------------------------------------------
1 | xquery version "3.1";
2 |
3 | declare context item := document {
4 |
5 | Primo Levi: The Matter of a Life
6 | Berel Lang
7 | November 26, 2013
8 |
9 | New Haven
10 | Yale University Press
11 |
12 | 0300137230
13 | 978-0300137231
14 |
15 | };
16 |
17 | //press/..
--------------------------------------------------------------------------------
/code/047-pp62/047-pp62.xq:
--------------------------------------------------------------------------------
1 | xquery version "3.1";
2 |
3 | declare context item := document {
4 |
5 | Primo Levi: The Matter of a Life
6 | Berel Lang
7 | November 26, 2013
8 |
9 | New Haven
10 | Yale University Press
11 |
12 | 0300137230
13 | 978-0300137231
14 |
15 | };
16 |
17 | //identifier[. = "0300137230"]/preceding-sibling::title
--------------------------------------------------------------------------------
/code/048-pp63/048-pp63.xq:
--------------------------------------------------------------------------------
1 | xquery version "3.1";
2 |
3 | declare context item := document {
4 |
5 | Primo Levi: The Matter of a Life
6 | Berel Lang
7 | November 26, 2013
8 |
9 | New Haven
10 | Yale University Press
11 |
12 | 0300137230
13 | 978-0300137231
14 |
15 | };
16 |
17 | //identifier[self::node() = "0300137230"]/preceding-sibling::title
--------------------------------------------------------------------------------
/code/049-pp65/049-pp65.xq:
--------------------------------------------------------------------------------
1 | xquery version "3.1";
2 |
3 | declare context item := document {
4 |
5 | Primo Levi: The Matter of a Life
6 | Berel Lang
7 | November 26, 2013
8 |
9 | New Haven
10 | Yale University Press
11 |
12 | 0300137230
13 | 978-0300137231
14 |
15 | };
16 |
17 | fn:concat(/book/title, " by ", /book/author)
--------------------------------------------------------------------------------
/code/050-pp66/050-pp66.xq:
--------------------------------------------------------------------------------
1 | xquery version "3.1";
2 |
3 | declare context item := document {
4 |
5 | Primo Levi: The Matter of a Life
6 | Berel Lang
7 | November 26, 2013
8 |
9 | New Haven
10 | Yale University Press
11 |
12 | 0300137230
13 | 978-0300137231
14 |
15 | };
16 |
17 | /book/identifier/@type
--------------------------------------------------------------------------------
/code/051-pp66/051-pp66.xq:
--------------------------------------------------------------------------------
1 | xquery version "3.1";
2 |
3 | declare context item := document {
4 |
5 | Primo Levi: The Matter of a Life
6 | Berel Lang
7 | November 26, 2013
8 |
9 | New Haven
10 | Yale University Press
11 |
12 | 0300137230
13 | 978-0300137231
14 |
15 | };
16 |
17 | /book/identifier/@type/fn:string(.)
--------------------------------------------------------------------------------
/code/052-pp67/052-pp67.xq:
--------------------------------------------------------------------------------
1 | xquery version "3.1";
2 |
3 | declare context item := document {
4 |
5 | Primo Levi: The Matter of a Life
6 | Berel Lang
7 | November 26, 2013
8 |
9 | New Haven
10 | Yale University Press
11 |
12 | 0300137230
13 | 978-0300137231
14 |
15 | };
16 |
17 | /book/identifier/@type/fn:string()
--------------------------------------------------------------------------------
/code/053-pp69/053-pp69.xq:
--------------------------------------------------------------------------------
1 | xquery version "3.1";
2 |
3 | declare context item := document {
4 |
5 | Primo Levi: The Matter of a Life
6 | Berel Lang
7 | November 26, 2013
8 |
9 | New Haven
10 | Yale University Press
11 |
12 | 0300137230
13 | 978-0300137231
14 |
15 | };
16 |
17 | /book/publisher/press/fn:contains(., "University Press")
--------------------------------------------------------------------------------
/code/054-pp70/054-pp70.xq:
--------------------------------------------------------------------------------
1 | xquery version "3.1";
2 |
3 | declare context item := document {
4 |
5 | Primo Levi: The Matter of a Life
6 | Berel Lang
7 | November 26, 2013
8 |
9 | New Haven
10 | Yale University Press
11 |
12 | 0300137230
13 | 978-0300137231
14 |
15 | };
16 |
17 | /book/publisher/press[fn:contains(., "University Press")]/text()
--------------------------------------------------------------------------------
/code/055-pp70/055-pp70.xq:
--------------------------------------------------------------------------------
1 | xquery version "3.1";
2 |
3 | declare context item := document {
4 |
5 | Primo Levi: The Matter of a Life
6 | Berel Lang
7 | November 26, 2013
8 |
9 | New Haven
10 | Yale University Press
11 |
12 | 0300137230
13 | 978-0300137231
14 |
15 | };
16 |
17 | /book/identifier/fn:string-length(.)
--------------------------------------------------------------------------------
/code/056-pp71/056-pp71.xq:
--------------------------------------------------------------------------------
1 | xquery version "3.1";
2 |
3 | declare context item := document {
4 |
5 | Primo Levi: The Matter of a Life
6 | Berel Lang
7 | November 26, 2013
8 |
9 | New Haven
10 | Yale University Press
11 |
12 | 0300137230
13 | 978-0300137231
14 |
15 | };
16 |
17 | fn:replace("978-0300137231", "-", "")
--------------------------------------------------------------------------------
/code/057-pp71/057-pp71.xq:
--------------------------------------------------------------------------------
1 | xquery version "3.1";
2 |
3 | declare context item := document {
4 |
5 | Primo Levi: The Matter of a Life
6 | Berel Lang
7 | November 26, 2013
8 |
9 | New Haven
10 | Yale University Press
11 |
12 | 0300137230
13 | 978-0300137231
14 |
15 | };
16 |
17 | /book/identifier/fn:replace(., "-", "")
--------------------------------------------------------------------------------
/code/058-pp72/058-pp72.xq:
--------------------------------------------------------------------------------
1 | xquery version "3.1";
2 |
3 | declare context item := document {
4 |
5 | Primo Levi: The Matter of a Life
6 | Berel Lang
7 | November 26, 2013
8 |
9 | New Haven
10 | Yale University Press
11 |
12 | 0300137230
13 | 978-0300137231
14 |
15 | };
16 |
17 | /book/identifier/fn:string-length(fn:replace(., "-", ""))
--------------------------------------------------------------------------------
/code/059-pp73/059-pp73.xq:
--------------------------------------------------------------------------------
1 | xquery version "3.1";
2 |
3 | declare context item := document {
4 |
5 | Primo Levi: The Matter of a Life
6 | Berel Lang
7 | November 26, 2013
8 |
9 | New Haven
10 | Yale University Press
11 |
12 | 0300137230
13 | 978-0300137231
14 |
15 | };
16 |
17 | //identifier/@*
--------------------------------------------------------------------------------
/code/060-pp73/060-pp73.xq:
--------------------------------------------------------------------------------
1 | xquery version "3.1";
2 |
3 | declare context item := document {
4 |
5 | Primo Levi: The Matter of a Life
6 | Berel Lang
7 | November 26, 2013
8 |
9 | New Haven
10 | Yale University Press
11 |
12 | 0300137230
13 | 978-0300137231
14 |
15 | };
16 |
17 | /book[date/@year gt "2012"]
--------------------------------------------------------------------------------
/code/061-pp74/061-pp74.xq:
--------------------------------------------------------------------------------
1 | xquery version "3.1";
2 |
3 | declare context item := document {
4 |
5 | Primo Levi: The Matter of a Life
6 | Berel Lang
7 | November 26, 2013
8 |
9 | New Haven
10 | Yale University Press
11 |
12 | 0300137230
13 | 978-0300137231
14 |
15 | };
16 |
17 | /book[date/@year/xs:integer(.) gt 2012]
--------------------------------------------------------------------------------
/code/062-pp75/062-pp75.xq:
--------------------------------------------------------------------------------
1 | xquery version "3.1";
2 |
3 | declare context item := document {
4 |
5 | Primo Levi: The Matter of a Life
6 | Berel Lang
7 | November 26, 2013
8 |
9 | New Haven
10 | Yale University Press
11 |
12 | 0300137230
13 | 978-0300137231
14 |
15 | };
16 |
17 | /book/(author|creator)
--------------------------------------------------------------------------------
/code/063-pp75/063-pp75.xq:
--------------------------------------------------------------------------------
1 | xquery version "3.1";
2 |
3 | declare context item := document {
4 |
5 | Primo Levi: The Matter of a Life
6 | Berel Lang
7 | November 26, 2013
8 |
9 | New Haven
10 | Yale University Press
11 |
12 | 0300137230
13 | 978-0300137231
14 |
15 | };
16 |
17 | /book/identifier[fn:position() = (1 to 2)]
--------------------------------------------------------------------------------
/code/064-pp77/064-pp77.xq:
--------------------------------------------------------------------------------
1 | xquery version "3.1";
2 |
3 | declare context item := document {
4 |
5 | Primo Levi: The Matter of a Life
6 | Berel Lang
7 | November 26, 2013
8 |
9 | New Haven
10 | Yale University Press
11 |
12 | 0300137230
13 | 978-0300137231
14 |
15 | };
16 |
17 | /descendant-or-self::press[self::node() = "Yale University Press"]/parent::publisher/preceding-sibling::title/text()
--------------------------------------------------------------------------------
/code/065-pp77/065-pp77.xq:
--------------------------------------------------------------------------------
1 | xquery version "3.1";
2 |
3 | declare context item := document {
4 |
5 | Primo Levi: The Matter of a Life
6 | Berel Lang
7 | November 26, 2013
8 |
9 | New Haven
10 | Yale University Press
11 |
12 | 0300137230
13 | 978-0300137231
14 |
15 | };
16 |
17 | /book/identifier/fn:string-length(fn:replace(.,"-", ""))
--------------------------------------------------------------------------------
/code/066-pp80/066-pp80.xq:
--------------------------------------------------------------------------------
1 | xquery version "3.1";
2 |
3 | fn:concat("Nashville", ", ", "TN")
--------------------------------------------------------------------------------
/code/066-pp80/index.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: page
3 | title: Pp. 80 (no. 66)
4 | permalink: /code/066-pp80/
5 | ---
6 |
7 | This code sample is adapted from Clifford B. Anderson and Joseph C. Wicentowski,
8 | [_XQuery for Humanists_](/) (College Station: Texas A&M University Press, 2020), 80.
9 | Download this code sample in its [raw form](/code/066-pp80/066-pp80.xq).
10 | View the source on [GitHub](https://github.com/coding4humanists/xquery4humanists/blob/release/code/066-pp80/066-pp80.xq).
11 |
12 | ```xquery
13 | xquery version "3.1";
14 |
15 | fn:concat("Nashville", ", ", "TN")
16 | ```
17 |
--------------------------------------------------------------------------------
/code/067-pp81/067-pp81.txt:
--------------------------------------------------------------------------------
1 | declare namespace tei = "http://www.tei-c.org/ns/1.0";
--------------------------------------------------------------------------------
/code/067-pp81/index.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: page
3 | title: Pp. 81 (no. 67)
4 | permalink: /code/067-pp81/
5 | ---
6 |
7 | This code sample is adapted from Clifford B. Anderson and Joseph C. Wicentowski,
8 | [_XQuery for Humanists_](/) (College Station: Texas A&M University Press, 2020), 81.
9 | Download this code sample in its [raw form](/code/067-pp81/067-pp81.txt).
10 | View the source on [GitHub](https://github.com/coding4humanists/xquery4humanists/blob/release/code/067-pp81/067-pp81.txt).
11 |
12 | ```text
13 | declare namespace tei = "http://www.tei-c.org/ns/1.0";
14 | ```
15 |
--------------------------------------------------------------------------------
/code/068-pp81/068-pp81.txt:
--------------------------------------------------------------------------------
1 | declare default element namespace "http://www.tei-c.org/ns/1.0";
--------------------------------------------------------------------------------
/code/068-pp81/index.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: page
3 | title: Pp. 81 (no. 68)
4 | permalink: /code/068-pp81/
5 | ---
6 |
7 | This code sample is adapted from Clifford B. Anderson and Joseph C. Wicentowski,
8 | [_XQuery for Humanists_](/) (College Station: Texas A&M University Press, 2020), 81.
9 | Download this code sample in its [raw form](/code/068-pp81/068-pp81.txt).
10 | View the source on [GitHub](https://github.com/coding4humanists/xquery4humanists/blob/release/code/068-pp81/068-pp81.txt).
11 |
12 | ```text
13 | declare default element namespace "http://www.tei-c.org/ns/1.0";
14 | ```
15 |
--------------------------------------------------------------------------------
/code/069-pp81/069-pp81.xq:
--------------------------------------------------------------------------------
1 | xquery version "3.1";
2 |
3 | declare default element namespace "http://www.tei-c.org/ns/1.0";
4 |
5 |
--------------------------------------------------------------------------------
/code/069-pp81/index.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: page
3 | title: Pp. 81 (no. 69)
4 | permalink: /code/069-pp81/
5 | ---
6 |
7 | This code sample is adapted from Clifford B. Anderson and Joseph C. Wicentowski,
8 | [_XQuery for Humanists_](/) (College Station: Texas A&M University Press, 2020), 81.
9 | Download this code sample in its [raw form](/code/069-pp81/069-pp81.xq).
10 | View the source on [GitHub](https://github.com/coding4humanists/xquery4humanists/blob/release/code/069-pp81/069-pp81.xq).
11 |
12 | ```xquery
13 | xquery version "3.1";
14 |
15 | declare default element namespace "http://www.tei-c.org/ns/1.0";
16 |
17 |
18 | ```
19 |
--------------------------------------------------------------------------------
/code/070-pp82/070-pp82.xq:
--------------------------------------------------------------------------------
1 | xquery version "3.1";
2 |
3 | declare namespace tei = "http://www.tei-c.org/ns/1.0";
4 |
5 |
--------------------------------------------------------------------------------
/code/070-pp82/index.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: page
3 | title: Pp. 82 (no. 70)
4 | permalink: /code/070-pp82/
5 | ---
6 |
7 | This code sample is adapted from Clifford B. Anderson and Joseph C. Wicentowski,
8 | [_XQuery for Humanists_](/) (College Station: Texas A&M University Press, 2020), 82.
9 | Download this code sample in its [raw form](/code/070-pp82/070-pp82.xq).
10 | View the source on [GitHub](https://github.com/coding4humanists/xquery4humanists/blob/release/code/070-pp82/070-pp82.xq).
11 |
12 | ```xquery
13 | xquery version "3.1";
14 |
15 | declare namespace tei = "http://www.tei-c.org/ns/1.0";
16 |
17 |
18 | ```
19 |
--------------------------------------------------------------------------------
/code/071-pp83/071-pp83.xq:
--------------------------------------------------------------------------------
1 | xquery version "3.1";
2 |
3 | declare namespace tei = "http://www.tei-c.org/ns/1.0";
4 |
5 |
--------------------------------------------------------------------------------
/code/071-pp83/index.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: page
3 | title: Pp. 83 (no. 71)
4 | permalink: /code/071-pp83/
5 | ---
6 |
7 | This code sample is adapted from Clifford B. Anderson and Joseph C. Wicentowski,
8 | [_XQuery for Humanists_](/) (College Station: Texas A&M University Press, 2020), 83.
9 | Download this code sample in its [raw form](/code/071-pp83/071-pp83.xq).
10 | View the source on [GitHub](https://github.com/coding4humanists/xquery4humanists/blob/release/code/071-pp83/071-pp83.xq).
11 |
12 | ```xquery
13 | xquery version "3.1";
14 |
15 | declare namespace tei = "http://www.tei-c.org/ns/1.0";
16 |
17 |
18 | ```
19 |
--------------------------------------------------------------------------------
/code/072-pp84/072-pp84.xq:
--------------------------------------------------------------------------------
1 | xquery version "3.1";
2 |
3 | declare namespace tei = "http://www.tei-c.org/ns/1.0";
4 |
5 |
6 | fn:concat("Nashville", ", ", "TN")
7 |
--------------------------------------------------------------------------------
/code/073-pp84/073-pp84.xq:
--------------------------------------------------------------------------------
1 | xquery version "3.1";
2 |
3 | declare namespace tei = "http://www.tei-c.org/ns/1.0";
4 |
5 |
6 | { fn:concat("Nashville", ", ", "TN") }
7 |
--------------------------------------------------------------------------------
/code/074-pp85/074-pp85.xq:
--------------------------------------------------------------------------------
1 | xquery version "3.1";
2 |
3 |
Wicentowski is { fn:string-length("Wicentowski") }
4 | letters long in the Roman alphabet, but only
5 | { fn:string-length("ウィセントースキ") }
6 | in Japanese kana.
--------------------------------------------------------------------------------
/code/075-pp86/075-pp86.xq:
--------------------------------------------------------------------------------
1 | fn:string-length( fn:replace("978-0300137231", "-", "") )
--------------------------------------------------------------------------------
/code/075-pp86/index.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: page
3 | title: Pp. 86 (no. 75)
4 | permalink: /code/075-pp86/
5 | ---
6 |
7 | This code sample is adapted from Clifford B. Anderson and Joseph C. Wicentowski,
8 | [_XQuery for Humanists_](/) (College Station: Texas A&M University Press, 2020), 86.
9 | Download this code sample in its [raw form](/code/075-pp86/075-pp86.xq).
10 | View the source on [GitHub](https://github.com/coding4humanists/xquery4humanists/blob/release/code/075-pp86/075-pp86.xq).
11 |
12 | ```xquery
13 | fn:string-length( fn:replace("978-0300137231", "-", "") )
14 | ```
15 |
--------------------------------------------------------------------------------
/code/076-pp86-87/076-pp86-87.xq:
--------------------------------------------------------------------------------
1 | let $isbn := "978-0300137231"
2 | let $isbn-without-dash := fn:replace($isbn, "-", "")
3 | return
4 | fn:string-length($isbn-without-dash)
--------------------------------------------------------------------------------
/code/076-pp86-87/index.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: page
3 | title: Pp. 86-87 (no. 76)
4 | permalink: /code/076-pp86-87/
5 | ---
6 |
7 | This code sample is adapted from Clifford B. Anderson and Joseph C. Wicentowski,
8 | [_XQuery for Humanists_](/) (College Station: Texas A&M University Press, 2020), 86-87.
9 | Download this code sample in its [raw form](/code/076-pp86-87/076-pp86-87.xq).
10 | View the source on [GitHub](https://github.com/coding4humanists/xquery4humanists/blob/release/code/076-pp86-87/076-pp86-87.xq).
11 |
12 | ```xquery
13 | let $isbn := "978-0300137231"
14 | let $isbn-without-dash := fn:replace($isbn, "-", "")
15 | return
16 | fn:string-length($isbn-without-dash)
17 | ```
18 |
--------------------------------------------------------------------------------
/code/078-pp89/078-pp89.xq:
--------------------------------------------------------------------------------
1 | xquery version "3.1";
2 |
3 | declare context item := document {
4 |
5 | Primo Levi: The Matter of a Life
6 | Berel Lang
7 | November 26, 2013
8 |
9 | New Haven
10 | Yale University Press
11 |
12 | 0300137230
13 | 978-0300137231
14 |
15 | };
16 |
17 | declare variable $book := ./book;
18 |
19 | for $isbn in $book/identifier
20 | return
21 | fn:concat( fn:string($isbn/@type), $isbn/text() )
--------------------------------------------------------------------------------
/code/079-pp90/079-pp90.xml:
--------------------------------------------------------------------------------
1 |
2 | Primo Levi: The Matter of a Life
3 | Berel Lang
4 | November 26, 2013
5 |
6 | New Haven
7 | Yale University Press
8 |
9 | 0300137230
10 | 978-0300137231
11 | 840803708
12 |
--------------------------------------------------------------------------------
/code/082-pp92/082-pp92.xq:
--------------------------------------------------------------------------------
1 | xquery version "3.1";
2 |
3 | declare context item := document {
4 |
5 | Primo Levi: The Matter of a Life
6 | Berel Lang
7 | November 26, 2013
8 |
9 | New Haven
10 | Yale University Press
11 |
12 | 0300137230
13 | 978-0300137231
14 | 840803708
15 |
16 | };
17 |
18 | declare variable $book := ./book;
19 |
20 | $book/identifier[@type = ("ISBN-10", "ISBN-13")]/text()
--------------------------------------------------------------------------------
/code/083-pp92/083-pp92.xq:
--------------------------------------------------------------------------------
1 | xquery version "3.1";
2 |
3 | declare context item := document {
4 |
5 | Primo Levi: The Matter of a Life
6 | Berel Lang
7 | November 26, 2013
8 |
9 | New Haven
10 | Yale University Press
11 |
12 | 0300137230
13 | 978-0300137231
14 | 840803708
15 |
16 | };
17 |
18 | declare variable $book := ./book;
19 |
20 | $book/identifier/@type = ("ISBN-10", "ISBN-13")
--------------------------------------------------------------------------------
/code/084-pp93/084-pp93.xq:
--------------------------------------------------------------------------------
1 | xquery version "3.1";
2 |
3 | let $title := se questo è un uomo
4 | let $titolo := se questo è un uomo
5 | let $titel := $title
6 | return
7 | $title is $titolo
--------------------------------------------------------------------------------
/code/085-pp94/085-pp94.xq:
--------------------------------------------------------------------------------
1 | xquery version "3.1";
2 |
3 | let $title := se questo è un uomo
4 | let $titolo := se questo è un uomo
5 | let $titel := $title
6 | return
7 | $title is $titel
--------------------------------------------------------------------------------
/code/086-pp94/086-pp94.xml:
--------------------------------------------------------------------------------
1 |
2 | Interdisciplining Digital Humanities
3 | Hacking the Academy
4 | New Companion to Digital Humanities
5 | Macroanalysis
6 | Emergence of the Digital Humanities
7 | Digital Critical Editions
8 | Digital Humanities
9 |
--------------------------------------------------------------------------------
/code/087-pp95/087-pp95.xq:
--------------------------------------------------------------------------------
1 | xquery version "3.1";
2 |
3 | declare context item := document {
4 |
5 | Interdisciplining Digital Humanities
6 | Hacking the Academy
7 | New Companion to Digital Humanities
8 | Macroanalysis
9 | Emergence of the Digital Humanities
10 | Digital Critical Editions
11 | Digital Humanities
12 |
13 | };
14 |
15 | declare variable $list := ./list;
16 |
17 | let $books := $list/book
18 | for $book in $books
19 | return
20 | $book
--------------------------------------------------------------------------------
/code/088-pp95/088-pp95.xq:
--------------------------------------------------------------------------------
1 | xquery version "3.1";
2 |
3 | declare context item := document {
4 |
5 | Interdisciplining Digital Humanities
6 | Hacking the Academy
7 | New Companion to Digital Humanities
8 | Macroanalysis
9 | Emergence of the Digital Humanities
10 | Digital Critical Editions
11 | Digital Humanities
12 |
13 | };
14 |
15 | declare variable $list := ./list;
16 |
17 | let $books := $list/book
18 | for $book in $books
19 | order by $book/@date
20 | return
21 | $book
--------------------------------------------------------------------------------
/code/089-pp95/089-pp95.xq:
--------------------------------------------------------------------------------
1 | xquery version "3.1";
2 |
3 | declare context item := document {
4 |
5 | Interdisciplining Digital Humanities
6 | Hacking the Academy
7 | New Companion to Digital Humanities
8 | Macroanalysis
9 | Emergence of the Digital Humanities
10 | Digital Critical Editions
11 | Digital Humanities
12 |
13 | };
14 |
15 | declare variable $list := ./list;
16 |
17 | let $books := $list/book
18 | for $book in $books
19 | order by $book/@date descending
20 | return
21 | $book
--------------------------------------------------------------------------------
/code/091-pp96/091-pp96.txt:
--------------------------------------------------------------------------------
1 | Emergence of the Digital Humanities
2 | Hacking the Academy
3 | Macroanalysis
4 | Digital Critical Editions
5 | Digital Humanities
6 | Interdisciplining Digital Humanities
7 | New Companion to Digital Humanities
--------------------------------------------------------------------------------
/code/092-pp97/092-pp97.xq:
--------------------------------------------------------------------------------
1 | xquery version "3.1";
2 |
3 | declare context item := document {
4 |
5 | Interdisciplining Digital Humanities
6 | Hacking the Academy
7 | New Companion to Digital Humanities
8 | Macroanalysis
9 | Emergence of the Digital Humanities
10 | Digital Critical Editions
11 | Digital Humanities
12 |
13 | };
14 |
15 | declare variable $list := ./list;
16 |
17 | for $book at $n in $list/book
18 | return
19 | fn:concat($n, ". ", $book/text())
--------------------------------------------------------------------------------
/code/093-pp97/093-pp97.xq:
--------------------------------------------------------------------------------
1 | xquery version "3.1";
2 |
3 | declare context item := document {
4 |
5 | Interdisciplining Digital Humanities
6 | Hacking the Academy
7 | New Companion to Digital Humanities
8 | Macroanalysis
9 | Emergence of the Digital Humanities
10 | Digital Critical Editions
11 | Digital Humanities
12 |
13 | };
14 |
15 | declare variable $list := ./list;
16 |
17 | for $book at $n in $list/book
18 | order by $book/text()
19 | return
20 | fn:concat($n, ". ", $book/text())
--------------------------------------------------------------------------------
/code/098-pp99-100/098-pp99-100.txt:
--------------------------------------------------------------------------------
1 |
2 | New Companion to Digital Humanities
3 |
4 |
5 | Digital Humanities
6 | Interdisciplining Digital Humanities
7 |
8 |
9 | Digital Critical Editions
10 |
11 |
12 | Emergence of the Digital Humanities
13 | Hacking the Academy
14 | Macroanalysis
15 |
--------------------------------------------------------------------------------
/code/100-pp102/100-pp102.xq:
--------------------------------------------------------------------------------
1 | if (XQuery for Humanists) then
2 | "A wonderful book"
3 | else
4 | "A doorstop"
--------------------------------------------------------------------------------
/code/100-pp102/index.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: page
3 | title: Pp. 102 (no. 100)
4 | permalink: /code/100-pp102/
5 | ---
6 |
7 | This code sample is adapted from Clifford B. Anderson and Joseph C. Wicentowski,
8 | [_XQuery for Humanists_](/) (College Station: Texas A&M University Press, 2020), 102.
9 | Download this code sample in its [raw form](/code/100-pp102/100-pp102.xq).
10 | View the source on [GitHub](https://github.com/coding4humanists/xquery4humanists/blob/release/code/100-pp102/100-pp102.xq).
11 |
12 | ```xquery
13 | if (XQuery for Humanists) then
14 | "A wonderful book"
15 | else
16 | "A doorstop"
17 | ```
18 |
--------------------------------------------------------------------------------
/code/102-pp109/102-pp109.xq:
--------------------------------------------------------------------------------
1 | fn:substring("I love XQuery", 8)
--------------------------------------------------------------------------------
/code/102-pp109/index.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: page
3 | title: Pp. 109 (no. 102)
4 | permalink: /code/102-pp109/
5 | ---
6 |
7 | This code sample is adapted from Clifford B. Anderson and Joseph C. Wicentowski,
8 | [_XQuery for Humanists_](/) (College Station: Texas A&M University Press, 2020), 109.
9 | Download this code sample in its [raw form](/code/102-pp109/102-pp109.xq).
10 | View the source on [GitHub](https://github.com/coding4humanists/xquery4humanists/blob/release/code/102-pp109/102-pp109.xq).
11 |
12 | ```xquery
13 | fn:substring("I love XQuery", 8)
14 | ```
15 |
--------------------------------------------------------------------------------
/code/103-pp109/103-pp109.xq:
--------------------------------------------------------------------------------
1 | fn:substring("I love XQuery", 3, 4)
--------------------------------------------------------------------------------
/code/103-pp109/index.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: page
3 | title: Pp. 109 (no. 103)
4 | permalink: /code/103-pp109/
5 | ---
6 |
7 | This code sample is adapted from Clifford B. Anderson and Joseph C. Wicentowski,
8 | [_XQuery for Humanists_](/) (College Station: Texas A&M University Press, 2020), 109.
9 | Download this code sample in its [raw form](/code/103-pp109/103-pp109.xq).
10 | View the source on [GitHub](https://github.com/coding4humanists/xquery4humanists/blob/release/code/103-pp109/103-pp109.xq).
11 |
12 | ```xquery
13 | fn:substring("I love XQuery", 3, 4)
14 | ```
15 |
--------------------------------------------------------------------------------
/code/104-pp111/104-pp111.xq:
--------------------------------------------------------------------------------
1 | ("New York", "Paris", "Tokyo", "Buenos Aires")
--------------------------------------------------------------------------------
/code/104-pp111/index.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: page
3 | title: Pp. 111 (no. 104)
4 | permalink: /code/104-pp111/
5 | ---
6 |
7 | This code sample is adapted from Clifford B. Anderson and Joseph C. Wicentowski,
8 | [_XQuery for Humanists_](/) (College Station: Texas A&M University Press, 2020), 111.
9 | Download this code sample in its [raw form](/code/104-pp111/104-pp111.xq).
10 | View the source on [GitHub](https://github.com/coding4humanists/xquery4humanists/blob/release/code/104-pp111/104-pp111.xq).
11 |
12 | ```xquery
13 | ("New York", "Paris", "Tokyo", "Buenos Aires")
14 | ```
15 |
--------------------------------------------------------------------------------
/code/105-pp111/105-pp111.xq:
--------------------------------------------------------------------------------
1 | fn:head(("New York", "Paris", "Tokyo", "Buenos Aires"))
--------------------------------------------------------------------------------
/code/105-pp111/index.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: page
3 | title: Pp. 111 (no. 105)
4 | permalink: /code/105-pp111/
5 | ---
6 |
7 | This code sample is adapted from Clifford B. Anderson and Joseph C. Wicentowski,
8 | [_XQuery for Humanists_](/) (College Station: Texas A&M University Press, 2020), 111.
9 | Download this code sample in its [raw form](/code/105-pp111/105-pp111.xq).
10 | View the source on [GitHub](https://github.com/coding4humanists/xquery4humanists/blob/release/code/105-pp111/105-pp111.xq).
11 |
12 | ```xquery
13 | fn:head(("New York", "Paris", "Tokyo", "Buenos Aires"))
14 | ```
15 |
--------------------------------------------------------------------------------
/code/106-pp111/106-pp111.xq:
--------------------------------------------------------------------------------
1 | fn:tail(("New York", "Paris", "Tokyo", "Buenos Aires"))
--------------------------------------------------------------------------------
/code/106-pp111/index.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: page
3 | title: Pp. 111 (no. 106)
4 | permalink: /code/106-pp111/
5 | ---
6 |
7 | This code sample is adapted from Clifford B. Anderson and Joseph C. Wicentowski,
8 | [_XQuery for Humanists_](/) (College Station: Texas A&M University Press, 2020), 111.
9 | Download this code sample in its [raw form](/code/106-pp111/106-pp111.xq).
10 | View the source on [GitHub](https://github.com/coding4humanists/xquery4humanists/blob/release/code/106-pp111/106-pp111.xq).
11 |
12 | ```xquery
13 | fn:tail(("New York", "Paris", "Tokyo", "Buenos Aires"))
14 | ```
15 |
--------------------------------------------------------------------------------
/code/107-pp112/107-pp112.xq:
--------------------------------------------------------------------------------
1 | fn:index-of(("New York", "Paris", "Tokyo", "BuenosAires"), "Tokyo")
--------------------------------------------------------------------------------
/code/107-pp112/index.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: page
3 | title: Pp. 112 (no. 107)
4 | permalink: /code/107-pp112/
5 | ---
6 |
7 | This code sample is adapted from Clifford B. Anderson and Joseph C. Wicentowski,
8 | [_XQuery for Humanists_](/) (College Station: Texas A&M University Press, 2020), 112.
9 | Download this code sample in its [raw form](/code/107-pp112/107-pp112.xq).
10 | View the source on [GitHub](https://github.com/coding4humanists/xquery4humanists/blob/release/code/107-pp112/107-pp112.xq).
11 |
12 | ```xquery
13 | fn:index-of(("New York", "Paris", "Tokyo", "BuenosAires"), "Tokyo")
14 | ```
15 |
--------------------------------------------------------------------------------
/code/108-pp112/108-pp112.xq:
--------------------------------------------------------------------------------
1 | ("New York", "Paris", "Tokyo", "Buenos Aires")[3]
--------------------------------------------------------------------------------
/code/108-pp112/index.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: page
3 | title: Pp. 112 (no. 108)
4 | permalink: /code/108-pp112/
5 | ---
6 |
7 | This code sample is adapted from Clifford B. Anderson and Joseph C. Wicentowski,
8 | [_XQuery for Humanists_](/) (College Station: Texas A&M University Press, 2020), 112.
9 | Download this code sample in its [raw form](/code/108-pp112/108-pp112.xq).
10 | View the source on [GitHub](https://github.com/coding4humanists/xquery4humanists/blob/release/code/108-pp112/108-pp112.xq).
11 |
12 | ```xquery
13 | ("New York", "Paris", "Tokyo", "Buenos Aires")[3]
14 | ```
15 |
--------------------------------------------------------------------------------
/code/109-pp112/109-pp112.xq:
--------------------------------------------------------------------------------
1 | ("New York", "Paris", "Tokyo", "Buenos Aires")[position() = (1, 3)]
--------------------------------------------------------------------------------
/code/109-pp112/index.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: page
3 | title: Pp. 112 (no. 109)
4 | permalink: /code/109-pp112/
5 | ---
6 |
7 | This code sample is adapted from Clifford B. Anderson and Joseph C. Wicentowski,
8 | [_XQuery for Humanists_](/) (College Station: Texas A&M University Press, 2020), 112.
9 | Download this code sample in its [raw form](/code/109-pp112/109-pp112.xq).
10 | View the source on [GitHub](https://github.com/coding4humanists/xquery4humanists/blob/release/code/109-pp112/109-pp112.xq).
11 |
12 | ```xquery
13 | ("New York", "Paris", "Tokyo", "Buenos Aires")[position() = (1, 3)]
14 | ```
15 |
--------------------------------------------------------------------------------
/code/110-pp112/110-pp112.xq:
--------------------------------------------------------------------------------
1 | fn:subsequence(("New York", "Paris", "Tokyo", "Buenos Aires"), 3)
--------------------------------------------------------------------------------
/code/110-pp112/index.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: page
3 | title: Pp. 112 (no. 110)
4 | permalink: /code/110-pp112/
5 | ---
6 |
7 | This code sample is adapted from Clifford B. Anderson and Joseph C. Wicentowski,
8 | [_XQuery for Humanists_](/) (College Station: Texas A&M University Press, 2020), 112.
9 | Download this code sample in its [raw form](/code/110-pp112/110-pp112.xq).
10 | View the source on [GitHub](https://github.com/coding4humanists/xquery4humanists/blob/release/code/110-pp112/110-pp112.xq).
11 |
12 | ```xquery
13 | fn:subsequence(("New York", "Paris", "Tokyo", "Buenos Aires"), 3)
14 | ```
15 |
--------------------------------------------------------------------------------
/code/111-pp113/111-pp113.xq:
--------------------------------------------------------------------------------
1 | fn:subsequence(("New York", "Paris", "Tokyo", "BuenosAires"), 2, 2)
--------------------------------------------------------------------------------
/code/111-pp113/index.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: page
3 | title: Pp. 113 (no. 111)
4 | permalink: /code/111-pp113/
5 | ---
6 |
7 | This code sample is adapted from Clifford B. Anderson and Joseph C. Wicentowski,
8 | [_XQuery for Humanists_](/) (College Station: Texas A&M University Press, 2020), 113.
9 | Download this code sample in its [raw form](/code/111-pp113/111-pp113.xq).
10 | View the source on [GitHub](https://github.com/coding4humanists/xquery4humanists/blob/release/code/111-pp113/111-pp113.xq).
11 |
12 | ```xquery
13 | fn:subsequence(("New York", "Paris", "Tokyo", "BuenosAires"), 2, 2)
14 | ```
15 |
--------------------------------------------------------------------------------
/code/112-pp114/112-pp114.xml:
--------------------------------------------------------------------------------
1 |
2 | Citizens at Last
3 | The Woman Suffrage Movement in Texas
4 |
--------------------------------------------------------------------------------
/code/113-pp115/113-pp115.txt:
--------------------------------------------------------------------------------
1 | xquery version "3.1";
2 |
3 | declare namespace tei = "http://www.tei-c.org/ns/1.0";
4 |
5 | declare function local:make-tei-title(
6 | $title as xs:string,
7 | $subtitle as xs:string?
8 | ) as element(tei:title) {
9 | (: the function will go here :)
10 | };
--------------------------------------------------------------------------------
/code/114-pp116-117/114-pp116-117.xq:
--------------------------------------------------------------------------------
1 | xquery version "3.1";
2 |
3 | declare namespace tei = "http://www.tei-c.org/ns/1.0";
4 |
5 | declare function local:make-tei-title(
6 | $title as xs:string,
7 | $subtitle as xs:string?
8 | ) as element(tei:title) {
9 |
10 | { $title }
11 | { $subtitle }
12 |
13 | };
14 |
15 | local:make-tei-title("Citizens at Last","The Woman Suffrage Movement in Texas")
--------------------------------------------------------------------------------
/code/115-pp117/115-pp117.txt:
--------------------------------------------------------------------------------
1 | declare function local:make-tei-title($title, $subtitle) {
2 | (: ... :)
3 | };
--------------------------------------------------------------------------------
/code/115-pp117/index.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: page
3 | title: Pp. 117 (no. 115)
4 | permalink: /code/115-pp117/
5 | ---
6 |
7 | This code sample is adapted from Clifford B. Anderson and Joseph C. Wicentowski,
8 | [_XQuery for Humanists_](/) (College Station: Texas A&M University Press, 2020), 117.
9 | Download this code sample in its [raw form](/code/115-pp117/115-pp117.txt).
10 | View the source on [GitHub](https://github.com/coding4humanists/xquery4humanists/blob/release/code/115-pp117/115-pp117.txt).
11 |
12 | ```text
13 | declare function local:make-tei-title($title, $subtitle) {
14 | (: ... :)
15 | };
16 | ```
17 |
--------------------------------------------------------------------------------
/code/116-pp117/116-pp117.xq:
--------------------------------------------------------------------------------
1 | xquery version "3.1";
2 |
3 | declare namespace tei = "http://www.tei-c.org/ns/1.0";
4 |
5 | declare function local:make-tei-title($title, $subtitle) {
6 |
7 | { $title }
8 | { $subtitle }
9 |
10 | };
11 |
12 | local:make-tei-title(
13 | Citizens at Last,
14 | ("The Woman Suffrage Movement in Texas", "and Tennessee")
15 | )
--------------------------------------------------------------------------------
/code/117-pp118/117-pp118.xq:
--------------------------------------------------------------------------------
1 | let $title := "Citizens at Last"
2 | let $subtitle := "The Woman Suffrage Movement in Texas"
3 | let $join-titles :=
4 | function($title as xs:string, $subtitle as xs:string)
5 | as xs:string {
6 | fn:concat($title, ": ", $subtitle)
7 | }
8 | return
9 | $join-titles($title, $subtitle)
--------------------------------------------------------------------------------
/code/118-pp119-120/118-pp119-120.txt:
--------------------------------------------------------------------------------
1 | import module namespace functx = "http://www.functx.com"
2 | at "http://www.xqueryfunctions.com/xq/functx-1.0-doc-2007-01.xq";
--------------------------------------------------------------------------------
/code/118-pp119-120/index.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: page
3 | title: Pp. 119-120 (no. 118)
4 | permalink: /code/118-pp119-120/
5 | ---
6 |
7 | This code sample is adapted from Clifford B. Anderson and Joseph C. Wicentowski,
8 | [_XQuery for Humanists_](/) (College Station: Texas A&M University Press, 2020), 119-120.
9 | Download this code sample in its [raw form](/code/118-pp119-120/118-pp119-120.txt).
10 | View the source on [GitHub](https://github.com/coding4humanists/xquery4humanists/blob/release/code/118-pp119-120/118-pp119-120.txt).
11 |
12 | ```text
13 | import module namespace functx = "http://www.functx.com"
14 | at "http://www.xqueryfunctions.com/xq/functx-1.0-doc-2007-01.xq";
15 | ```
16 |
--------------------------------------------------------------------------------
/code/119-pp120/119-pp120.xq:
--------------------------------------------------------------------------------
1 | xquery version "3.1";
2 |
3 | import module namespace functx = "http://www.functx.com"
4 | at "http://www.xqueryfunctions.com/xq/functx-1.0-doc-2007-01.xq";
5 |
6 | functx:month-name-en("2016-04-15")
--------------------------------------------------------------------------------
/code/120-pp122/120-pp122.txt:
--------------------------------------------------------------------------------
1 | xquery version "3.1";
2 |
3 | module namespace tf = "http://xquery.forhumanists.org/tei-functions";
4 |
5 | declare namespace tei = "http://www.tei-c.org/ns/1.0";
6 |
7 | declare function tf:make-tei-title(
8 | $title as xs:string,
9 | $subtitle as xs:string?)
10 | as element(tei:title) {
11 |
12 | { $title }
13 | { $subtitle }
14 |
15 | };
--------------------------------------------------------------------------------
/code/121-pp123/121-pp123.xq:
--------------------------------------------------------------------------------
1 | xquery version "3.1";
2 |
3 | import module namespace tf = "http://xquery.forhumanists.org/tei-functions"
4 | at "tei-functions.xqm";
5 | (: Change the path to the file as necessary :)
6 |
7 | tf:make-tei-title(
8 | "citizens at last",
9 | "the woman suffrage movement in Texas"
10 | )
--------------------------------------------------------------------------------
/code/122-pp126/122-pp126.xq:
--------------------------------------------------------------------------------
1 | xquery version "3.1";
2 |
3 | import module namespace tf = "http://xquery.forhumanists.org/tei-functions"
4 | at "tei-functions.xqm";
5 | (: Change the path to the file as necessary :)
6 |
7 | tf:make-tei-title(
8 | "citizens at last",
9 | "the woman suffrage movement in Texas"
10 | )
--------------------------------------------------------------------------------
/code/123-pp129/123-pp129.xml:
--------------------------------------------------------------------------------
1 |
2 | Shinpei
3 | Gotō
4 |
--------------------------------------------------------------------------------
/code/123-pp129/index.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: page
3 | title: Pp. 129 (no. 123)
4 | permalink: /code/123-pp129/
5 | ---
6 |
7 | This code sample is adapted from Clifford B. Anderson and Joseph C. Wicentowski,
8 | [_XQuery for Humanists_](/) (College Station: Texas A&M University Press, 2020), 129.
9 | Download this code sample in its [raw form](/code/123-pp129/123-pp129.xml).
10 | View the source on [GitHub](https://github.com/coding4humanists/xquery4humanists/blob/release/code/123-pp129/123-pp129.xml).
11 |
12 | ```xml
13 |
14 | Shinpei
15 | Gotō
16 |
17 | ```
18 |
--------------------------------------------------------------------------------
/code/124-pp130/124-pp130.xml:
--------------------------------------------------------------------------------
1 |
2 |
DEN Kenjirō
3 |
GOTŌ Shinpei
4 |
KODAMA Gentarō
5 |
--------------------------------------------------------------------------------
/code/124-pp130/index.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: page
3 | title: Pp. 130 (no. 124)
4 | permalink: /code/124-pp130/
5 | ---
6 |
7 | This code sample is adapted from Clifford B. Anderson and Joseph C. Wicentowski,
8 | [_XQuery for Humanists_](/) (College Station: Texas A&M University Press, 2020), 130.
9 | Download this code sample in its [raw form](/code/124-pp130/124-pp130.xml).
10 | View the source on [GitHub](https://github.com/coding4humanists/xquery4humanists/blob/release/code/124-pp130/124-pp130.xml).
11 |
12 | ```xml
13 |
14 |
DEN Kenjirō
15 |
GOTŌ Shinpei
16 |
KODAMA Gentarō
17 |
18 | ```
19 |
--------------------------------------------------------------------------------
/code/125-pp132/125-pp132.txt:
--------------------------------------------------------------------------------
1 | $identifier/@type/fn:string()
--------------------------------------------------------------------------------
/code/125-pp132/index.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: page
3 | title: Pp. 132 (no. 125)
4 | permalink: /code/125-pp132/
5 | ---
6 |
7 | This code sample is adapted from Clifford B. Anderson and Joseph C. Wicentowski,
8 | [_XQuery for Humanists_](/) (College Station: Texas A&M University Press, 2020), 132.
9 | Download this code sample in its [raw form](/code/125-pp132/125-pp132.txt).
10 | View the source on [GitHub](https://github.com/coding4humanists/xquery4humanists/blob/release/code/125-pp132/125-pp132.txt).
11 |
12 | ```text
13 | $identifier/@type/fn:string()
14 | ```
15 |
--------------------------------------------------------------------------------
/code/126-pp132/126-pp132.xq:
--------------------------------------------------------------------------------
1 | xquery version "3.1";
2 |
3 | declare variable $book-count := 100;
4 |
5 | "You have " || $book-count || " books in the database."
--------------------------------------------------------------------------------
/code/126-pp132/index.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: page
3 | title: Pp. 132 (no. 126)
4 | permalink: /code/126-pp132/
5 | ---
6 |
7 | This code sample is adapted from Clifford B. Anderson and Joseph C. Wicentowski,
8 | [_XQuery for Humanists_](/) (College Station: Texas A&M University Press, 2020), 132.
9 | Download this code sample in its [raw form](/code/126-pp132/126-pp132.xq).
10 | View the source on [GitHub](https://github.com/coding4humanists/xquery4humanists/blob/release/code/126-pp132/126-pp132.xq).
11 |
12 | ```xquery
13 | xquery version "3.1";
14 |
15 | declare variable $book-count := 100;
16 |
17 | "You have " || $book-count || " books in the database."
18 | ```
19 |
--------------------------------------------------------------------------------
/code/127-pp132/127-pp132.xq:
--------------------------------------------------------------------------------
1 | xquery version "3.1";
2 |
3 | declare variable $book-count := 100;
4 |
5 | fn:concat("You have ", $book-count, " books in the database.")
--------------------------------------------------------------------------------
/code/127-pp132/index.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: page
3 | title: Pp. 132 (no. 127)
4 | permalink: /code/127-pp132/
5 | ---
6 |
7 | This code sample is adapted from Clifford B. Anderson and Joseph C. Wicentowski,
8 | [_XQuery for Humanists_](/) (College Station: Texas A&M University Press, 2020), 132.
9 | Download this code sample in its [raw form](/code/127-pp132/127-pp132.xq).
10 | View the source on [GitHub](https://github.com/coding4humanists/xquery4humanists/blob/release/code/127-pp132/127-pp132.xq).
11 |
12 | ```xquery
13 | xquery version "3.1";
14 |
15 | declare variable $book-count := 100;
16 |
17 | fn:concat("You have ", $book-count, " books in the database.")
18 | ```
19 |
--------------------------------------------------------------------------------
/code/128-pp133/128-pp133.xq:
--------------------------------------------------------------------------------
1 | fn:concat("red", " ", "white", " ", "blue")
--------------------------------------------------------------------------------
/code/128-pp133/index.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: page
3 | title: Pp. 133 (no. 128)
4 | permalink: /code/128-pp133/
5 | ---
6 |
7 | This code sample is adapted from Clifford B. Anderson and Joseph C. Wicentowski,
8 | [_XQuery for Humanists_](/) (College Station: Texas A&M University Press, 2020), 133.
9 | Download this code sample in its [raw form](/code/128-pp133/128-pp133.xq).
10 | View the source on [GitHub](https://github.com/coding4humanists/xquery4humanists/blob/release/code/128-pp133/128-pp133.xq).
11 |
12 | ```xquery
13 | fn:concat("red", " ", "white", " ", "blue")
14 | ```
15 |
--------------------------------------------------------------------------------
/code/129-pp133/129-pp133.xq:
--------------------------------------------------------------------------------
1 | xquery version "3.1";
2 |
3 | declare variable $colors := ("red", "white", "blue");
4 |
5 | fn:string-join($colors, " ")
--------------------------------------------------------------------------------
/code/129-pp133/index.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: page
3 | title: Pp. 133 (no. 129)
4 | permalink: /code/129-pp133/
5 | ---
6 |
7 | This code sample is adapted from Clifford B. Anderson and Joseph C. Wicentowski,
8 | [_XQuery for Humanists_](/) (College Station: Texas A&M University Press, 2020), 133.
9 | Download this code sample in its [raw form](/code/129-pp133/129-pp133.xq).
10 | View the source on [GitHub](https://github.com/coding4humanists/xquery4humanists/blob/release/code/129-pp133/129-pp133.xq).
11 |
12 | ```xquery
13 | xquery version "3.1";
14 |
15 | declare variable $colors := ("red", "white", "blue");
16 |
17 | fn:string-join($colors, " ")
18 | ```
19 |
--------------------------------------------------------------------------------
/code/130-pp134/130-pp134.xq:
--------------------------------------------------------------------------------
1 | xquery version "3.1";
2 |
3 | declare variable $colors := ("red", "white", "blue");
4 |
5 | fn:string-join($colors)
--------------------------------------------------------------------------------
/code/130-pp134/index.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: page
3 | title: Pp. 134 (no. 130)
4 | permalink: /code/130-pp134/
5 | ---
6 |
7 | This code sample is adapted from Clifford B. Anderson and Joseph C. Wicentowski,
8 | [_XQuery for Humanists_](/) (College Station: Texas A&M University Press, 2020), 134.
9 | Download this code sample in its [raw form](/code/130-pp134/130-pp134.xq).
10 | View the source on [GitHub](https://github.com/coding4humanists/xquery4humanists/blob/release/code/130-pp134/130-pp134.xq).
11 |
12 | ```xquery
13 | xquery version "3.1";
14 |
15 | declare variable $colors := ("red", "white", "blue");
16 |
17 | fn:string-join($colors)
18 | ```
19 |
--------------------------------------------------------------------------------
/code/131-pp134/131-pp134.txt:
--------------------------------------------------------------------------------
1 | @prefix foaf: .
2 |
3 | _:xqywg a foaf:Group ;
4 | foaf:name "XQuery Working Group" .
--------------------------------------------------------------------------------
/code/131-pp134/index.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: page
3 | title: Pp. 134 (no. 131)
4 | permalink: /code/131-pp134/
5 | ---
6 |
7 | This code sample is adapted from Clifford B. Anderson and Joseph C. Wicentowski,
8 | [_XQuery for Humanists_](/) (College Station: Texas A&M University Press, 2020), 134.
9 | Download this code sample in its [raw form](/code/131-pp134/131-pp134.txt).
10 | View the source on [GitHub](https://github.com/coding4humanists/xquery4humanists/blob/release/code/131-pp134/131-pp134.txt).
11 |
12 | ```text
13 | @prefix foaf: .
14 |
15 | _:xqywg a foaf:Group ;
16 | foaf:name "XQuery Working Group" .
17 | ```
18 |
--------------------------------------------------------------------------------
/code/132-pp135/132-pp135.xq:
--------------------------------------------------------------------------------
1 | ``[
2 | @prefix foaf: .
3 |
4 | _:xqywg a foaf:Group;
5 | foaf:name "XQuery Working Group" .
6 | ]``
--------------------------------------------------------------------------------
/code/132-pp135/index.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: page
3 | title: Pp. 135 (no. 132)
4 | permalink: /code/132-pp135/
5 | ---
6 |
7 | This code sample is adapted from Clifford B. Anderson and Joseph C. Wicentowski,
8 | [_XQuery for Humanists_](/) (College Station: Texas A&M University Press, 2020), 135.
9 | Download this code sample in its [raw form](/code/132-pp135/132-pp135.xq).
10 | View the source on [GitHub](https://github.com/coding4humanists/xquery4humanists/blob/release/code/132-pp135/132-pp135.xq).
11 |
12 | ```xquery
13 | ``[
14 | @prefix foaf: .
15 |
16 | _:xqywg a foaf:Group;
17 | foaf:name "XQuery Working Group" .
18 | ]``
19 | ```
20 |
--------------------------------------------------------------------------------
/code/133-pp135/133-pp135.xq:
--------------------------------------------------------------------------------
1 | let $name := "XQuery Working Group"
2 | return
3 | ``[
4 | @prefix foaf: .
5 |
6 | _:xqywg a foaf:Group;
7 | foaf:name "`{ $name }`" .
8 | ]``
--------------------------------------------------------------------------------
/code/134-pp136/134-pp136.xq:
--------------------------------------------------------------------------------
1 | ("China", "Russia", "Japan")
--------------------------------------------------------------------------------
/code/134-pp136/index.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: page
3 | title: Pp. 136 (no. 134)
4 | permalink: /code/134-pp136/
5 | ---
6 |
7 | This code sample is adapted from Clifford B. Anderson and Joseph C. Wicentowski,
8 | [_XQuery for Humanists_](/) (College Station: Texas A&M University Press, 2020), 136.
9 | Download this code sample in its [raw form](/code/134-pp136/134-pp136.xq).
10 | View the source on [GitHub](https://github.com/coding4humanists/xquery4humanists/blob/release/code/134-pp136/134-pp136.xq).
11 |
12 | ```xquery
13 | ("China", "Russia", "Japan")
14 | ```
15 |
--------------------------------------------------------------------------------
/code/135-pp137/135-pp137.xq:
--------------------------------------------------------------------------------
1 | (("China", "Russia", "Japan"), ("Mexico", "Canada", "United States"))
--------------------------------------------------------------------------------
/code/135-pp137/index.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: page
3 | title: Pp. 137 (no. 135)
4 | permalink: /code/135-pp137/
5 | ---
6 |
7 | This code sample is adapted from Clifford B. Anderson and Joseph C. Wicentowski,
8 | [_XQuery for Humanists_](/) (College Station: Texas A&M University Press, 2020), 137.
9 | Download this code sample in its [raw form](/code/135-pp137/135-pp137.xq).
10 | View the source on [GitHub](https://github.com/coding4humanists/xquery4humanists/blob/release/code/135-pp137/135-pp137.xq).
11 |
12 | ```xquery
13 | (("China", "Russia", "Japan"), ("Mexico", "Canada", "United States"))
14 | ```
15 |
--------------------------------------------------------------------------------
/code/136-pp137/136-pp137.xq:
--------------------------------------------------------------------------------
1 | ("China", "Russia", "Japan", "Mexico", "Canada", "United States")
--------------------------------------------------------------------------------
/code/136-pp137/index.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: page
3 | title: Pp. 137 (no. 136)
4 | permalink: /code/136-pp137/
5 | ---
6 |
7 | This code sample is adapted from Clifford B. Anderson and Joseph C. Wicentowski,
8 | [_XQuery for Humanists_](/) (College Station: Texas A&M University Press, 2020), 137.
9 | Download this code sample in its [raw form](/code/136-pp137/136-pp137.xq).
10 | View the source on [GitHub](https://github.com/coding4humanists/xquery4humanists/blob/release/code/136-pp137/136-pp137.xq).
11 |
12 | ```xquery
13 | ("China", "Russia", "Japan", "Mexico", "Canada", "United States")
14 | ```
15 |
--------------------------------------------------------------------------------
/code/137-pp137/137-pp137.xq:
--------------------------------------------------------------------------------
1 | declare function local:find-string($test as xs:string?) as xs:string? {
2 | if ($test) then
3 | "I found a string"
4 | else
5 | ()
6 | };
7 |
8 | local:find-string("test")
--------------------------------------------------------------------------------
/code/138-pp138/138-pp138.xq:
--------------------------------------------------------------------------------
1 | declare function local:find-string($test as xs:string?) as xs:string? {
2 | if ($test) then
3 | "I found a string"
4 | else
5 | ()
6 | };
7 |
8 | local:find-string(())
--------------------------------------------------------------------------------
/code/139-pp138/139-pp138.xq:
--------------------------------------------------------------------------------
1 | ((), "China", "Russia", (), "Turkey")
--------------------------------------------------------------------------------
/code/139-pp138/index.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: page
3 | title: Pp. 138 (no. 139)
4 | permalink: /code/139-pp138/
5 | ---
6 |
7 | This code sample is adapted from Clifford B. Anderson and Joseph C. Wicentowski,
8 | [_XQuery for Humanists_](/) (College Station: Texas A&M University Press, 2020), 138.
9 | Download this code sample in its [raw form](/code/139-pp138/139-pp138.xq).
10 | View the source on [GitHub](https://github.com/coding4humanists/xquery4humanists/blob/release/code/139-pp138/139-pp138.xq).
11 |
12 | ```xquery
13 | ((), "China", "Russia", (), "Turkey")
14 | ```
15 |
--------------------------------------------------------------------------------
/code/140-pp138/140-pp138.xq:
--------------------------------------------------------------------------------
1 | ("", "China", "Russia", "", "Turkey")
--------------------------------------------------------------------------------
/code/140-pp138/index.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: page
3 | title: Pp. 138 (no. 140)
4 | permalink: /code/140-pp138/
5 | ---
6 |
7 | This code sample is adapted from Clifford B. Anderson and Joseph C. Wicentowski,
8 | [_XQuery for Humanists_](/) (College Station: Texas A&M University Press, 2020), 138.
9 | Download this code sample in its [raw form](/code/140-pp138/140-pp138.xq).
10 | View the source on [GitHub](https://github.com/coding4humanists/xquery4humanists/blob/release/code/140-pp138/140-pp138.xq).
11 |
12 | ```xquery
13 | ("", "China", "Russia", "", "Turkey")
14 | ```
15 |
--------------------------------------------------------------------------------
/code/141-pp139/141-pp139.xml:
--------------------------------------------------------------------------------
1 |
2 | On Teaching XQuery to Digital Humanists
3 | https://orcid.org/0000-0003-0328-0792
4 | 10.4242/BalisageVol13.Anderson01
5 |
--------------------------------------------------------------------------------
/code/142-pp140/142-pp140.xq:
--------------------------------------------------------------------------------
1 | map { "title": "On Teaching XQuery to Digital Humanists"}
--------------------------------------------------------------------------------
/code/142-pp140/index.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: page
3 | title: Pp. 140 (no. 142)
4 | permalink: /code/142-pp140/
5 | ---
6 |
7 | This code sample is adapted from Clifford B. Anderson and Joseph C. Wicentowski,
8 | [_XQuery for Humanists_](/) (College Station: Texas A&M University Press, 2020), 140.
9 | Download this code sample in its [raw form](/code/142-pp140/142-pp140.xq).
10 | View the source on [GitHub](https://github.com/coding4humanists/xquery4humanists/blob/release/code/142-pp140/142-pp140.xq).
11 |
12 | ```xquery
13 | map { "title": "On Teaching XQuery to Digital Humanists"}
14 | ```
15 |
--------------------------------------------------------------------------------
/code/143-pp140/143-pp140.xq:
--------------------------------------------------------------------------------
1 | fn:serialize(
2 | map { "title": "On Teaching XQuery to Digital Humanists" },
3 | map { "method" : "adaptive" }
4 | )
--------------------------------------------------------------------------------
/code/143-pp140/index.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: page
3 | title: Pp. 140 (no. 143)
4 | permalink: /code/143-pp140/
5 | ---
6 |
7 | This code sample is adapted from Clifford B. Anderson and Joseph C. Wicentowski,
8 | [_XQuery for Humanists_](/) (College Station: Texas A&M University Press, 2020), 140.
9 | Download this code sample in its [raw form](/code/143-pp140/143-pp140.xq).
10 | View the source on [GitHub](https://github.com/coding4humanists/xquery4humanists/blob/release/code/143-pp140/143-pp140.xq).
11 |
12 | ```xquery
13 | fn:serialize(
14 | map { "title": "On Teaching XQuery to Digital Humanists" },
15 | map { "method" : "adaptive" }
16 | )
17 | ```
18 |
--------------------------------------------------------------------------------
/code/144-pp140/144-pp140.xq:
--------------------------------------------------------------------------------
1 | map {
2 | "title": "On Teaching XQuery to Digital Humanists",
3 | "author": "https://orcid.org/0000-0003-0328-0792",
4 | "identifier": "10.4242/BalisageVol13.Anderson01"
5 | }
--------------------------------------------------------------------------------
/code/145-pp141/145-pp141.xq:
--------------------------------------------------------------------------------
1 | xquery version "3.1";
2 |
3 | let $article :=
4 | map {
5 | "title": "On Teaching XQuery to Digital Humanists",
6 | "author": "https://orcid.org/0000-0003-0328-0792",
7 | "identifier": "10.4242/BalisageVol13.Anderson01"
8 | }
9 | return
10 | $article("title")
--------------------------------------------------------------------------------
/code/146-pp142/146-pp142.xq:
--------------------------------------------------------------------------------
1 | xquery version "3.1";
2 |
3 | let $article :=
4 | map {
5 | "title": "On Teaching XQuery to Digital Humanists",
6 | "author": "https://orcid.org/0000-0003-0328-0792",
7 | "identifier": "10.4242/BalisageVol13.Anderson01"
8 | }
9 | return
10 | $article?title
--------------------------------------------------------------------------------
/code/147-pp142/147-pp142.xq:
--------------------------------------------------------------------------------
1 | xquery version "3.1";
2 |
3 | let $article :=
4 | map {
5 | "title with
2 | 37027
3 | 37210
4 | 37209
5 | 37212
6 |
--------------------------------------------------------------------------------
/code/182-pp153/182-pp153.xq:
--------------------------------------------------------------------------------
1 | let $zip-codes :=
2 |
3 | 37027
4 | 37210
5 | 37209
6 | 37212
7 |
8 | for $zip-code in $zip-codes/zip-code
9 | return
10 | $zip-code/text()
--------------------------------------------------------------------------------
/code/183-pp154/183-pp154.xq:
--------------------------------------------------------------------------------
1 | let $zip-codes :=
2 |
3 | 37027
4 | 37210
5 | 37209
6 | 37212
7 |
8 | let $city :=$zip-codes/@city
9 | for $zip-code in $zip-codes/zip-code
10 | return
11 | $zip-code/text()
--------------------------------------------------------------------------------
/code/184-pp155/184-pp155.xq:
--------------------------------------------------------------------------------
1 | xquery version "3.1";
2 |
3 | let $sentence := "This is a a test of of windowing"
4 | let $words := fn:tokenize($sentence, " ")
5 | for tumbling window $w in $words
6 | start $start-word at $pos
7 | next $next-word
8 | when $start-word eq $next-word
9 | return
10 | { $start-word }
--------------------------------------------------------------------------------
/code/185-pp157/185-pp157.txt:
--------------------------------------------------------------------------------
1 | I hope you
2 | hope you have
3 | you have a
4 | have a nice
5 | a nice day
--------------------------------------------------------------------------------
/code/185-pp157/index.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: page
3 | title: Pp. 157 (no. 185)
4 | permalink: /code/185-pp157/
5 | ---
6 |
7 | This code sample is adapted from Clifford B. Anderson and Joseph C. Wicentowski,
8 | [_XQuery for Humanists_](/) (College Station: Texas A&M University Press, 2020), 157.
9 | Download this code sample in its [raw form](/code/185-pp157/185-pp157.txt).
10 | View the source on [GitHub](https://github.com/coding4humanists/xquery4humanists/blob/release/code/185-pp157/185-pp157.txt).
11 |
12 | ```xml-fragment
13 | I hope you
14 | hope you have
15 | you have a
16 | have a nice
17 | a nice day
18 | ```
19 |
--------------------------------------------------------------------------------
/code/186-pp157/186-pp157.xq:
--------------------------------------------------------------------------------
1 | xquery version "3.1";
2 |
3 | let $sentence := "I hope you have a nice day!"
4 | let $tokens := fn:tokenize($sentence, " ")
5 | let $ngram-length := 3
6 |
7 | for sliding window $ngram in $tokens
8 | start at $starting-pos
9 | when true()
10 | only end at $ending-pos
11 | when $ending-pos - $starting-pos + 1 eq $ngram-length
12 | return
13 | { $ngram }
--------------------------------------------------------------------------------
/code/187-pp164/187-pp164.xq:
--------------------------------------------------------------------------------
1 | xquery version "3.1";
2 |
3 | let $id := 1
4 | let $id := $id + 1
5 | return
6 | $id
--------------------------------------------------------------------------------
/code/187-pp164/index.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: page
3 | title: Pp. 164 (no. 187)
4 | permalink: /code/187-pp164/
5 | ---
6 |
7 | This code sample is adapted from Clifford B. Anderson and Joseph C. Wicentowski,
8 | [_XQuery for Humanists_](/) (College Station: Texas A&M University Press, 2020), 164.
9 | Download this code sample in its [raw form](/code/187-pp164/187-pp164.xq).
10 | View the source on [GitHub](https://github.com/coding4humanists/xquery4humanists/blob/release/code/187-pp164/187-pp164.xq).
11 |
12 | ```xquery
13 | xquery version "3.1";
14 |
15 | let $id := 1
16 | let $id := $id + 1
17 | return
18 | $id
19 | ```
20 |
--------------------------------------------------------------------------------
/code/188-pp165/188-pp165.xq:
--------------------------------------------------------------------------------
1 | xquery version "3.1";
2 |
3 | let $name := "Franklin D. Roosevelt"
4 | let $url := fn:lower-case($name)
5 | let $url := fn:replace($url, "\W+", "-")
6 | return
7 | $url
--------------------------------------------------------------------------------
/code/189-pp166/189-pp166.xq:
--------------------------------------------------------------------------------
1 | xquery version "3.1";
2 |
3 | let $name := "Franklin D. Roosevelt"
4 | let $url := fn:replace(fn:lower-case($name), "\W+", "-")
5 | return
6 | $url
--------------------------------------------------------------------------------
/code/189-pp166/index.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: page
3 | title: Pp. 166 (no. 189)
4 | permalink: /code/189-pp166/
5 | ---
6 |
7 | This code sample is adapted from Clifford B. Anderson and Joseph C. Wicentowski,
8 | [_XQuery for Humanists_](/) (College Station: Texas A&M University Press, 2020), 166.
9 | Download this code sample in its [raw form](/code/189-pp166/189-pp166.xq).
10 | View the source on [GitHub](https://github.com/coding4humanists/xquery4humanists/blob/release/code/189-pp166/189-pp166.xq).
11 |
12 | ```xquery
13 | xquery version "3.1";
14 |
15 | let $name := "Franklin D. Roosevelt"
16 | let $url := fn:replace(fn:lower-case($name), "\W+", "-")
17 | return
18 | $url
19 | ```
20 |
--------------------------------------------------------------------------------
/code/190-pp166-167/190-pp166-167.xq:
--------------------------------------------------------------------------------
1 | xquery version "3.1";
2 |
3 | let $name := "Franklin D. Roosevelt"
4 | let $url := fn:lower-case($name) => fn:replace("\W+", "-")
5 | return
6 | $url
--------------------------------------------------------------------------------
/code/191-pp168/191-pp168.txt:
--------------------------------------------------------------------------------
1 | var eggs = 0;
2 | for (i = 0; i < 6; i++)
3 | {
4 | eggs = eggs + 1;
5 | console.log(eggs + " eggs");
6 | }
--------------------------------------------------------------------------------
/code/191-pp168/index.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: page
3 | title: Pp. 168 (no. 191)
4 | permalink: /code/191-pp168/
5 | ---
6 |
7 | This code sample is adapted from Clifford B. Anderson and Joseph C. Wicentowski,
8 | [_XQuery for Humanists_](/) (College Station: Texas A&M University Press, 2020), 168.
9 | Download this code sample in its [raw form](/code/191-pp168/191-pp168.txt).
10 | View the source on [GitHub](https://github.com/coding4humanists/xquery4humanists/blob/release/code/191-pp168/191-pp168.txt).
11 |
12 | ```javascript
13 | var eggs = 0;
14 | for (i = 0; i < 6; i++)
15 | {
16 | eggs = eggs + 1;
17 | console.log(eggs + " eggs");
18 | }
19 | ```
20 |
--------------------------------------------------------------------------------
/code/192-pp168/192-pp168.xq:
--------------------------------------------------------------------------------
1 | xquery version "3.1";
2 |
3 | for $egg in 1 to 6
4 | return
5 | $egg || " eggs"
--------------------------------------------------------------------------------
/code/192-pp168/index.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: page
3 | title: Pp. 168 (no. 192)
4 | permalink: /code/192-pp168/
5 | ---
6 |
7 | This code sample is adapted from Clifford B. Anderson and Joseph C. Wicentowski,
8 | [_XQuery for Humanists_](/) (College Station: Texas A&M University Press, 2020), 168.
9 | Download this code sample in its [raw form](/code/192-pp168/192-pp168.xq).
10 | View the source on [GitHub](https://github.com/coding4humanists/xquery4humanists/blob/release/code/192-pp168/192-pp168.xq).
11 |
12 | ```xquery
13 | xquery version "3.1";
14 |
15 | for $egg in 1 to 6
16 | return
17 | $egg || " eggs"
18 | ```
19 |
--------------------------------------------------------------------------------
/code/193-pp170/193-pp170.xq:
--------------------------------------------------------------------------------
1 | xquery version "3.1";
2 |
3 | ("PLEASE", "DO", "NOT", "SHOUT") ! fn:lower-case(.)
--------------------------------------------------------------------------------
/code/193-pp170/index.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: page
3 | title: Pp. 170 (no. 193)
4 | permalink: /code/193-pp170/
5 | ---
6 |
7 | This code sample is adapted from Clifford B. Anderson and Joseph C. Wicentowski,
8 | [_XQuery for Humanists_](/) (College Station: Texas A&M University Press, 2020), 170.
9 | Download this code sample in its [raw form](/code/193-pp170/193-pp170.xq).
10 | View the source on [GitHub](https://github.com/coding4humanists/xquery4humanists/blob/release/code/193-pp170/193-pp170.xq).
11 |
12 | ```xquery
13 | xquery version "3.1";
14 |
15 | ("PLEASE", "DO", "NOT", "SHOUT") ! fn:lower-case(.)
16 | ```
17 |
--------------------------------------------------------------------------------
/code/194-pp170/194-pp170.xq:
--------------------------------------------------------------------------------
1 | (1 to 6) ! (. || " eggs")
--------------------------------------------------------------------------------
/code/194-pp170/index.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: page
3 | title: Pp. 170 (no. 194)
4 | permalink: /code/194-pp170/
5 | ---
6 |
7 | This code sample is adapted from Clifford B. Anderson and Joseph C. Wicentowski,
8 | [_XQuery for Humanists_](/) (College Station: Texas A&M University Press, 2020), 170.
9 | Download this code sample in its [raw form](/code/194-pp170/194-pp170.xq).
10 | View the source on [GitHub](https://github.com/coding4humanists/xquery4humanists/blob/release/code/194-pp170/194-pp170.xq).
11 |
12 | ```xquery
13 | (1 to 6) ! (. || " eggs")
14 | ```
15 |
--------------------------------------------------------------------------------
/code/198-pp179-180/198-pp179-180.xml:
--------------------------------------------------------------------------------
1 |
2 |
Lincoln is dead! The body of the victim of a mad assassin has disappeared
3 | from the surface of the earth, but his spirit is immortal. This spirit
4 | soars above the tomb where rest the mortal remains of one who was—
5 |
6 |
7 |
8 | —“a man, a ruler, and a sage;
9 | A truly worthy model of the age.”
10 |
11 |
12 |
Lincoln is dead! The body of the victim of a mad assassin has disappeared
3 | from the surface of the earth, but his spirit is immortal. This spirit
4 | soars above the tomb where rest the mortal remains of one who was—
5 |
6 |
7 |
8 | —“a man, a ruler, and a sage;
9 | A truly worthy model of the age.”
10 |
11 |
12 |