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 spell everything out in such minute detail.

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 schema and the CSS, and a <TEI> element. Load up the file and have a look at it. 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 'F101-19: 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> add a <publisher> element with the content 'Lithuanian National M. Mazvydas Library'. The are other elements one could add here, or we could have just given this information in a <p> instead.
  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, 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>F101-19: An electronic edition</title>
      </titleStmt>
      <publicationStmt>
       <publisher>Lithuanian National M. Mazvydas Library</publisher>
      </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
  3. Delete the XML declaration and processing instructions at the top of the file you've just inserted
  4. 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 'f101-19a.jpg'. 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="f101-19a.jpg"/>
    </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.

6. Adding the text

Your file should be completely valid against the ENRICH schema at this point. If it isn't, try to find what it thinks is wrong and fix it before proceeding! Although you can make a valid TEI file with only a <facsimile> element to form an electronic facsimile and no <text> element, we do not tend to view these are real digital editions. To get improve this edition we must add a <text> element!
  1. Move to just after the closing </facsimile> tag, and hit enter to add a new line
  2. Add a <text> element
  3. Inside this add a <body> element
  4. Move in between the starting and closing tags of the <body> element and go to the menu item 'Document -> File -> Insert File', and select the file 'F101-19_text.xml'. This file contains the text of the charter already marked up in XML. This markup has been provided by someone else, and we might have encoded some things differently, see what you think.
  5. Your document should still be valid. Save your document.

7. Other things to try ...

  1. Explore the markup we've added by inserting the 'F101-19_text.xml' file. What is marked up, and what is not?
  2. Experiment with adding more markup to the file.
  3. oXygen has different editing modes, we've been using the 'text' mode. In the bottom left hand corner you'll see 3 choices 'Text', 'Grid', and 'Author'. Try out each of these modes. The 'Author' mode is a tagless CSS-based editing mode.


Date: March 2009
Copyright University of Oxford