TEI in practice

Simple TEI Exercise

Exercise:

  1. Copy and paste the following code into a new XML file

    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    
    <?xml version="1.0" encoding="UTF-8"?>
    <TEI version="5.0" xmlns="http://www.tei-c.org/ns/1.0">
        <teiHeader>
            <fileDesc>
                <titleStmt>
                    <title><!-- title of the electronic text --></title>
                    <author><!-- author's name --></author>
                    <principal><!-- principal researcher responsible for the TEI document, add your own name --></principal>
                </titleStmt>
                <publicationStmt>
                    <distributor><!-- name of the repository responsible for the distribution of the TEI document --></distributor>
                    <availability>
                        <p><!-- copyright statement --></p>
                    </availability>
                    <date><!-- date of the publication of the TEI document --></date>
                </publicationStmt>
                <sourceDesc>
                    <bibl>
                        <author><!-- author of the book --></author>,
                        <title level="m"><!-- title of the book  --></title>,
                        <publisher><!-- publisher of the book --></publisher>
                        <pubPlace><!-- place of publication --></pubPlace>,
                        <date><!-- date of publication --></date>. </bibl>
                </sourceDesc>
            </fileDesc>
        </teiHeader>
        <text>
            <body>
                <div><!-- This is not the teiHeader anymore. Here the electronic text of The Hobbit could be added --></div>
            </body>
        </text>
    </TEI>
  2. Replace the comments in the <teiHeader> section with the following metadata:
    • Title: There and back again: an electronic edition
    • Author: J.R.R. Tolkien
    • Copyright: The copyright owner of the English translation is Tolkien, 1937
    • Repository:  Digital Repository of my University
    • The source: J.R.R. Tolkien. The Hobbit. Ballantine Books, New York. 1937.

  3. Validate the TEI document and make sure it is well-formed and valid!