TEI Elements for HISP 298

XML (or eXtensible Markup Language) can be used by anyone to create a markup language grammar. A grammar is usually defined in a separate file -- a Document Type Definition (DTD) or (more recently) a Schema. These files essentially define the elements and attributes that can be used and where and how they are allowed to function in a document. A well formed XML document that properly follows the rules of a DTD or schema is said to be valid. There are many grammars out there (e.g. XHTML, Docubook, MathML, TEI).

In oXygen, you can check to make sure your document is well-formed by clicking on the blue-check at the top of the screen. More importantly, you can check to make sure your document is valid. by clicking on the red-check mark at the top of your screen.



If your document is not valid, click through the errors at the bottom of the screen. Most of the time, the spot where the error occurs will be highlighted in your text. The most common errors are:
  1. You have misspelled an entity. Check for the correct spelling.
  2. You have misspelled an element. Check the chart below for the correct spelling.
  3. You forgot to close an element. Look in the chart below for proper form for your elements.
  4. You did not follow the structure correctly. Look at this sample code to see how you should have encoded the structure.


What follows are several of the elements from the TEI DTD that we will use in this project:
Structural Elements

Look at this sample code to see how to encode the structure for each of your chapters.
ElementsUseAttributesSample Code
divs Used to define the major divisions in the text (e.g. chapters, cantos, journal entries, etc.) These divs are numbered (div1, div2, div3) to indicate the level of the division. Divs cannot contain text, but can contain head and p (both of which can contain text.) type indicates the kind of division being described.
appropriate values for type are "chapter," "proem," and "main"
<div1 type="chapter">
<div2 type="proem">Text of proem here.</div2>
<div2 type="main">Main body of the chapter text goes here.</div2>
</div1>
p Used to define the paragraphs in the text These must be within a div. no attributes are necessary <p>
Paragraph text goes here.
</p>
head Used to describe a heading of a section. These should be within a div. no attributes are necessary <div1 type="chapter">
<head>Chapter 3</head>
<div2 type="proem"> Proem text here.</div2>
<div2 type="main"> Main text here.</div2>
<div1>
Empty Structural Elements

These elements contain no text, but are used to describe a shift of some kind in the text.
ElementsUseAttributesSample Code
pb Used to indicate a page break. The n attribute indicates the page number of the next page after the break. Here is some text and in the <pb n="23"/> middle of it is a page break.
cb Used to indicate a column break. The n attribute indicates the column letter of the next column after the break. Here is some text and in the <cb n="c"/> middle of it is a column break.
Elements to Tag Content
ElementsUseAttributesSample Code
name Used to tag a proper name. You will be tagging all people names, as well as location names. the type attribute should be used with the value "person" or "place" <name type="person">Scott Hamlin</name> was here.
term Used to tag a word or phrase that needs to be defined. For your work, use this to tag words that you don't recognize. If a glossary is established at the end of your TEI document, you can use the corresp attribute to point to the glossary entry. Read more about this here. <term>LOL</term>! That is too funny!
orig Used to tag a word or phrase that a modern reader would see as an alternate spelling or variation of a modern word. the reg attribute contains the "regularized" version of the word. the resp attribute contains the initials of the person responsible for the "regularization." That is <orig reg="too" resp="sph">2</orig> funny!!