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

From our first exercise you saved a file with the poem 'Progress' (I suggested with the name 'exercise1.xml'). This is file with a single <div> file representing part of an issue of Punch. The task now is to turn it into a TEI document with all the mandatory parts, as we did with the manuscript description, and check its a valid TEI document.

1. Turn it into a TEI document

  1. Start oXygen and load your old ‘exercise1.xml’ document.
  2. Then choose the File/New menu item. Select the From templates tab and choose TEI P5 - Lite.

  3. Delete the contents below the <body> element and insert the <div> containing the poem which you made earlier by doing a copy and paste.
  4. You should have a theoretically complete TEI document now.

2. Put in minimal metadata

  1. To make it a more genuine document, fill in the compulsory metadata area for <title>
  2. And then say something in <publicationStmt>
  3. And if you are feeling strong add something to <sourceDesc>

Don't worry too much about the contents of the above for now, we'll tidy it up a bit later.

3. Add some more sections

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

4. Check its a valid TEI document

  1. Up in the menu bar, look for the validation button , and click on it.
  2. 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.
  3. Try adding some markup not recognized by TEI Lite, and see the validation fail. For example, surround the name ‘Toby’ at the top of the prose section with <persName>. Although this is a perfectly good TEI element, it is not allowed in TEI Lite. What element in TEI Lite could be used? How would you differentiate it from other similar elements?
  4. Now change the ‘teilite.rng’ part of this processing instruction to be ‘tei_all’ so the entire thing reads:
    <?oxygen RNGSchema="http://www.tei-c.org/release/xml/tei/custom/schema/relaxng/tei_all.rng" type="xml"?>
    Changing it to tei_all means that you have the full range to TEI elements to play with!
  5. To make sure it is validating against the new schema, select ‘Document -> Validate -> Refresh Cache and Validate’


Your document should be a well-formed and valid TEI XML document and contain all the minimum required components. Now let us look at adding some more metadata.

  1. Replace the contents of <publicationStmt> with
    <idno type="gutenberg">24357</idno>
     <p>This text is freely available for re-use under US and UK law,
       consult your local legal restrictions if elsewhere.</p>
    to indicate the original catalogue number, and copying conditions.
  2. Improve the <sourceDesc> by adding a <bibl> explaining where at least one of the texts came from:
      <title level="a">Progress</title>, <title level="j">Punch: or
         the London Charivari</title>, <date when="1914-07-01">July
         1, 1914</date>, 147, p. 1</bibl>
  3. Add a <profileDesc> after <fileDesc> and specify which languages you can see. at least:
     <language ident="en">English</language>
  4. We can also have a text classification inside the <profileDesc>, something like
     <keywords scheme="DD">
      <term>English Humour</term>
  5. Finally, look at adding a <revisionDesc> after <fileDesc>, maybe
     <change when="2009-04-15">
      <name>Your Name</name>
      <note>Say what you did</note>
    to indicate when you edited the text

Experiment with adding more to the <teiHeader>, but whatever you do, make sure its still valid TEI!

6. Save your file!

Just a reminder to make sure you have saved your file before you finish! Perhaps save it as ‘exercise3.xml’.

Date: April 2009
Copyright University of Oxford