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

1. Before you start

This short exercise takes the previous <msDesc> file from exercise 2 and has you build a TEI file around it to understand how the description fits into the concept of a complete digital edition. As you've already had some experience now of using oXygen, this exercise will not give you as much help.

2. The ex3.xml file

You've been provided with a file called 'ex3.xml' which is almost entirely empty. It contains processing-instructions for the ENRICH-WACMP schema, an associated CSS file, and a <TEI> element. Load up the file and have a look at it, making sure you are in 'Text' mode rather than 'Author mode. As you can see, although the file is well-formed, it is invalid because it doesn't validate against the schema. To be specific, in needs a <teiHeader> element, optionally a <facsimile> element, and a <text> element.

3. Adding the <teiHeader>

  1. Inside the <TEI> element add a <teiHeader> element
  2. The <teiHeader> requires a <fileDesc>, add it
  3. A <fileDesc> requires a <titleStmt>, <publicationStmt>, and <sourceDesc>. Add the <titleStmt> and inside that a <title> element. Add in a title for this document, perhaps ‘The Cotton version of Mandeville's travels: an electronic edition’. If you move outside the <title> and type '<' you can see a list of other elements allowed inside <titleStmt>, look at the options but delete the '<' before moving on.
  4. Outside the <titleStmt> add a <publicationStmt> and also look at what elements are allowed here. Inside the <publicationStmt> check what elements are available here by typing '<' again. Add a simple <p> element with the content 'Unpublished demonstration file'.
  5. After the <publicationStmt> element, add a <sourceDesc> element to describe the source, inside put a single, empty, <p/> element. This is just a placeholder which we will replace it in a minute.
  6. If everything has gone well, then you should have no red lines inside your <teiHeader> (though overall the document will still be invalid because we don't have a <text> element). It should look something like:
    <teiHeader>
     <fileDesc>
      <titleStmt>
       <title>The Cotton version of Mandeville's travels: an electronic edition</title>
      </titleStmt>
      <publicationStmt>
       <p>Unpublished demonstration file</p>
      </publicationStmt>
      <sourceDesc>
       <p/>
      </sourceDesc>
     </fileDesc>
    </teiHeader>
Note that we haven't added any of the other (optional) aspects of the <teiHeader> that are not required. You may wish to explore these at some point.

4. Adding our <msDesc>

We now want to add our <msDesc> we created in the previous exercise to the <sourceDesc>
  1. Delete the empty <p/> element inside the <sourceDesc>
  2. Go to the menu item 'Document -> File -> Insert File', and select the file you saved from the previous exercise (ex2.xml). Note that this is the 'Document' menu not the 'File' menu. However, another way to do this, of course, would be to open the file and cut and paste the contents into the correct place.
  3. Delete the XML declaration and processing instructions at the top of the file you've just inserted.
  4. Also the xmlns="http://www.tei-c.org/ns/1.0" on the <msDesc> is now superfluous since it inherits it from the <TEI> element. Optionally, delete this.
  5. You should now have no red lines inside the <teiHeader> section of your document

5. Adding a <facsimile> element

We've not discussed <facsimile> elements much, but these allow a way to reference graphics associated with the text, and in more complicated uses allow the delineation of <zone> elements for a given <surface>. In our case we will just use the <graphic> element. (We could also have added this to our <msDesc> using a <surrogates> element inside the <additional> section.)
  1. Go to after the closing </teiHeader> tag and insert a blank line.
  2. Insert a <facsimile> element
  3. Inside this, add an empty <graphic/> element
  4. As part of the <graphic/> element add a url attribute with a value of ''. This could take any URL pointing anywhere on the internet, however in this case the graphic file is in the same place as the other materials.
  5. Your <facsimile> element should now look something like:
    <facsimile>
     <graphic url="Mandeville.png"/>
    </facsimile>
It is important to note that adding this <facsimile> element does not 'do' anything with regard to linking the text to the image or parts of the image. It is simply providing the information in a standard place so that in processing or rendering the document one can have access to it.

Note that your document should be valid now! It should have a happy green square in the upper right-hand corner and no red lines.

6. Adding the text

We probably want to include the text of this edition if it is available. Move after your closing </facsimile> tag and then use the 'Document -> File -> Insert File' menu item to insert the file 'Mandeville-text.xml' at this point. Explore the markup you have just added to the file.

7. Happy Green Square = Save your file!

You should now have a valid TEI document with a manuscript description, and the text. There should be a happy green square in the upper right-hand corner. If not, fix it now! Also, make sure to save a copy of the completed file, as we will want to use it in our next exercise.



Date: March 2009
Copyright University of Oxford