Exercise1

From Digital Scholarship Group
Jump to navigation Jump to search

Getting started with TEI: Exercise 1

This first exercise is just to get comfortable with inserting TEI elements. Use poem sample 1.

1. In the Oxygen XML editor, navigate to the textbase/training directory and open the training_template.xml file.

2. Save a copy (using "Save as...") under a different name, using your surname (e.g. smith.training.xml) so that we know whose file it is.

3. Validate the file (using the red check-mark icon, or type Command-shift-v). You should get two error messages, both referring to information that is missing from the <change> element. Fill in the date and your name key if you have one; now your file should be valid. (If you don't have a name key yet, don't worry about it.)

4. Inside the <body> element, you're going to encode the poem from the sample text. The TEI elements you're going to need are:

<div>: a division of the text, used to represent whatever kinds of major structural pieces (poems, letters, essays, chapters, etc.) the text is divided into. The @type attribute is required and it indicates what type of division is being represented, using a controlled vocabulary. You can look up the permitted values in the WWP documentation.
<lg>: line group, a group of verse lines (e.g. a poem, a stanza). Line groups can nest inside one another. The @type attribute on <lg> is required and it describes the type of line group using a controlled vocabulary. You can look up the permitted values in the WWP documentation.
<head>: a heading (of a poem, a section, a list, any kind of heading at any level).
<l>: an individual verse line
<quote>: for material that is quoted from outside the text
<pb>: for page breaks. The @n attribute indicates what page begins at this break.
<emph>: for words that are emphasized to give them rhetorical weight
<hi>: for words that are highlighted for purely decorative reasons (e.g. because they are the first word of the text)

For the time being, ignore the appearance of the document (italics, etc.); we'll cover those later on.