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

From our previous exercise, we have got a single <div> in a file called 'exercise1.xml' that representing part of an issue of Punch. Load it now! The task now is to turn it into a TEI document with all the mandatory parts, and check its a valid TEI document.

1. Turn it into a TEI document

Start oXygen and choose the File/New menu item. Select the From templates tab and choose TEI P5 - Lite.

Delete the contents inside <body> and insert the <div> containing the poem which you made earlier by doing a copy and paste.

You should have a theoretically complete and valid TEI document now.

2. Put in minimal metadata

To make it a genuine document, fill in the compulsory metadata area for <title>, and say something in <publicationStmt> and <sourceDesc>.

3. Add some more sections

There is a file called prose.xml amongst your documents. Open this, and cut and paste the whole root <div> which it contains after the verse <div>. The document should still be well-formed.

4. Check it is a valid TEI document

Up in the menu bar, look for the validation button , and click on it. This will validate the document against the TEI Lite schema. Why that one? because of the incantation at the top of the file:
<?oxygen RNGSchema="http://www.tei-c.org/release/xml/tei/custom/schema/relaxng/teilite.rng" type="xml"?>
which is processing-instruction supported by oXygen, to indicate to it which schema to use.

Try adding some markup not recognized by TEI Lite, and see the validation fail. For example, surround the name ‘Miss C. E. Collet’ in the paragraph at the top the verse section with <persName>.

Make sure you leave your document valid (check for a happy green square in the upper-right!) and save it frequently!

5. Save your file!

Make sure you save your file, we'll want to use it in the next exercise! You may wish to save the file as 'exercise2.xml'

6. A reading knowledge of the TEI

You need to be familiar with reading the TEI Guidelines. Start by visiting http://www.tei-c.org/Guidelines/P5/ and make sure you can
  • See the PDF version of the entire Guidelines
  • Browse the chapters of the Guidelines in English
  • (Browse the chapters of the Guidelines in another language, if you need)
  • Navigate the element catalogue at http://www.tei-c.org/release/doc/tei-p5-doc/en/html/REF-ELEMENTS.html and follow the reference sections.
  • Jump around the reference materials following links

James Cummings. Date: 2009-07
Copyright University of Oxford