|
The previous pages looked at placing the books meta data in a teiheader
element, and its front mattter in a front element. This page will look at marking up the body of the book.
Again the book that we will use for our example is "The Riders of the Purple Sage" by Zane Grey. Etext #1300.
As we saw in the previous page all the book proper is placed as content of the text
element.
<text> <front> ...[book front content here]... </front> <body> ...[book body content here]... </front> <back> ...[book back content here]... </back> </text>
Although TEI allows the text
element to contain a whole plethora of elements, we for the most part will just be using the front
and the body
elements with the occasional use of other elements.
As with many books this book just consists of a number of chapters, with chapter titles and numbers, and of chapters containing paragraphs.
TEI does not have any dedicated elements for chapters so we use one of the div elements. We are using div1 here (It makes the CSS style sheet simpler), but the markup would work just as well with a recursive div element or a div0 element. We use the type element to classify the div element. Here is the overall structure of the book body.
<body> <div1 type="chapter"> ... </div1> ...[several more chapters]... <div1 type="chapter"> ... </div1> </body>
Here is how to markup the chapter header.
<div1 type="chapter"> <head> <num>CHAPTER I.</num><title> LASSITER</title> </head> <p> A sharp clip-crop of iron-shod hoofs deadened and died away, and clouds of yellow dust drifted from under the cottonwoods out over the sage. </p> ... </div1>
There are numerous elements that can be contained in the head element, but num
and title
are all we need here.
The TEI documentation gives the title
element the semantics of a title of a book or a publication, so in fact although this markup is 'legal' in that it will validate, it is incorrect usage of the title
element to use it for a chapter title. Another way to mark this up, (and a more 'correct' way way from the point of view of a TEI purist) would be as follows:
<div1 type="chapter"> <head n="1">CHAPTER I.</head> <head n="chaptitle">LASSITER</head> <p> A sharp clip-crop of iron-shod hoofs deadened and died away, and clouds of yellow dust drifted from under the cottonwoods out over the sage. </p> ... </div1>
We originally chose the former method as it makes styling with a CSS style sheet a little easier. (O.K. We admit this is a poor reason for choosing this method, and to tell the truth we were ignorant of the correct semantics when the book was originally marked up!)
For the most part the body of the chaper will just be paragraphs, but there are other constructs that can be brought in including 'linegroups' (the lg
element) for poetry and songs and the occasional play fragment. The following markup shows the transition from the first to the second chapter.
<p> It was Venters's wondering, thrilling cry that bridged the fateful connection between the rider's singular position and the dreaded name. </p> <p> Tull put out a groping hand. The life of his eyes dulled to the gloom with which men of his fear saw the approach of death. But death, while it hovered over him, did not descend, for the rider waited for the twitching fingers, the downward flash of hand that did not come. Tull, gathering himself together, turned to the horses, attended by his pale comrades. </p> </div1> <div1 type="chapter"> <head> <num>CHAPTER II.</num><title> COTTONWOODS</title> </head> <p> Venters appeared too deeply moved to speak the gratitude his face expressed ....
TEI is of course capable of marking up almost any document in incredible layers of complexity. In the last few pages we have just scratched the surface, and given you enough material to get started on a project.
In the next two pages we look at marking up a more complex book using TEI, but you will probably want to choose a relatively simply structured book for your first TEI project.