Text only | Skip links
Skip links||IT Services, University of Oxford

In this exercise we will use the example of Benjamin Franklin’s An Excerpt from His Autobiography, 1706-1757, to practice linking mechanisms of the TEI.

1. Part I:
Getting Ready

We are going to begin with an existing basic TEI file of the Benjamin Franklin text.

  1. In the documents subfolder open the document benfranklin_linking.xml.

  2. If you will find a printed copy of the text helpful, open benfranklin.pdf (located in the extras directory).

  3. Now, we are ready to do some basic linking.

2. Part II:
Tagging of Persons, Providing Information about Persons and Putting it all together

  1. We will begin by identifying the occurrence of personal names in the text, then provide some basic prosopographic information on these persons and finally link this information to the text where relevant.

  2. In your text (not in the teiHeader) find out, wherever a person is mentioned. Encode them with the <rs> element (referencing string) and assign the attribute type with the value “person”.

    [Note: You can speed up your encoding by highlighting the relevant text with your mouse, then pressing Ctrl+e and type the element name (in this case rs in the text box).]

  3. Now we will provide some information about these persons. Since this data is not available in the text itself, we will put it in the teiHeader.

  4. Within the sourceDesc, create an <listPerson> element. As usual, oXygen should assist you by completing your code. Regard listPerson as a container to store all your prosopographic information that you want to provide to the user of your resource.

  5. Within this container, create a <person> element for each person you have found in the text, e.g. one for Addison, one for Cato etc.

  6. Look up for some information about these people (e.g. use wikipedia) and create relevant elements within each person element. As a minimum, you should provide the name (<persName>), date of birth (<birth>) and date of death ( <death> ). Again, oXygen should assist you by suggesting valid elements.

  7. It is not important for this exercise how much information you provide. Play around just a little bit and then go on to the next step!

  8. It is the idea, to link any occurrence of, say, Addison in the text to that prosopographic information you provide once in the teiHeader. To allow the linking, you need to assign a unique identifier to every <person> element. This is done with the xml:id attribute.

  9. Add this attribute to every <person> element and give it a meaningful but short value, e.g. CAT for Cato. It should read something like <person xml:id=”CAT”></person>.

  10. Note that identifiers always have to be unique!

  11. At this stage you should have tagged the occurrence of persons in the text and provided some basic information about them. Using the xml:id attribute, you have also made this information identifiable.

  12. Now, point from the text to the information in the teiHeader. Add a ref attribute wherever you encoding text with the rs element, and use the identifier of the relevant information as its value, e.g. <rs type=”person” ref=”CAT”> .

  13. Don’t forget to save your work!

  14. As an additional exercise: Add the following (fictive) paragraph at the end of your encoded text:

    This is all for today, my friends! I have talked too much about Joseph Addison and this Ancient writer, and I am now too tired to go on with my own writing.

    Again, encode the text where persons are mentioned and link it to the relevant information. What do you notice?

3. Part III
Challenge Exercise

In this exercise we will use the linking mechanism to link the note at the bottom of the Franklin document to the relevant text passage.

  1. You might have noticed that in the provided benfranklin_linking.xml file, the note at the bottom of the page is missing. We will create it in a different way than the other day and link it to the part of the text it refers to.

  2. Add the end of your encoded text, create a <note> element and add the text of the note (“Nothing so likely…”).

  3. Add relevant attributes.

    Note: in the standard layout of oXygen, there is an “Attributes” window on the top right corner. If your cursor is inside an element, it shows not only all valid attributes but also allows you to enter values!

  4. Add relevant attributes to the notes element.

  5. Make it identifiable!

  6. Add a pointer element ( <ptr> ) to the position, where the footnote sign is. Be aware that this is an empty element!

  7. Now, create the linkage using the identifier and the target attribute!

  8. Note: There is more than one possibility to link between text and note, the other way round or both ways.

Well done!



Date: July 2009
Copyright University of Oxford