Help:UB-XML-TEI
From Digital Humanities Wiki
Using TEI at the University at Buffalo
DRAFT NOT COMPLETE
Basic Example using UB XML TEI CSS
January 10, 2008
behun
Extensible Markup Language (XML)
Text Encoding Initiative (TEI)
Steps for encoding a poem using TEI and put up on a UB webserver.
1. Identify Object to be encoded
2. Encode the Document with TEI
3. Create a CCS file to display the TEI file
4. Create an HTML page to give access to the information
4. Publish the document on UB personal webspace
Example:
1. Identify Object to be encoded
A poem by Emily Dickinson "Valentines Day" Image:Http://www.emilydickinson.org/susan/images/vday.jpg
2. Encode the Document with TEI
<?xml version='1.0' encoding='UTF-8'?>
<?xml-stylesheet type="text/css" href="support/tiny_TEI_template.css"?>
<TEI xmlns="http://www.tei-c.org/ns/1.0">
<teiHeader>
<fileDesc>
<titleStmt>
<title>TEI example of Poem</title>
<author>Michael Behun</author>
</titleStmt>
<publicationStmt>
<p>Late 1880's? Typescript, with revision in last verse and signature in pencil.
Single sheet, folded as if to enclose in an envelope.</p>
</publicationStmt>
<sourceDesc>
<p>source: http://www.emilydickinson.org/susan/vday.html 01/08/2008</p>
</sourceDesc>
</fileDesc>
</teiHeader>
<text>
<body>
<div type="poem">
<!-- Simple verse -->
<head>-----Valentines Day-----</head>
<lg type="stanza">
<l>When fast in rigid thews of ice,</l>
<l>The palest month of all the year -</l>
<l>The stoutest heart grown faint a bit</l>
<l>As Winter's rigors still appear;</l>
</lg>
<lg type="stanza">
<l>The motives of the Spring so dumb,</l>
<l>The landscape shorn of grace, and lone,</l>
<l>Adds but a shade of grayer gray</l>
<l>To life's depressing monotone.</l>
</lg>
<lg type="stanza">
<l>How sweet to know in farther clime,</l>
<l>Where richer acres kiss the sun,</l>
<l>In budded trees, in breath of May</l>
<l>The birds betrothal is begun;</l>
</lg>
<lg type="stanza">
<l> And robins tilt in perfect glee,</l>
<l>Singing aloud their happy fate -</l>
<l>Singing <del>to every flower and sky</del> <add hand="in soft ecstatic keys"></add></l>
<l> Today, today we choose our mate!</l>
</lg>
</div>
</body>
</text>
</TEI>
3. Create a CCS file to display the TEI file
/*
This template file is a basic css file used with a poem TEI xml file.
created by Michael Behun
no copyright asserted, free to use at your own risk
*/
TEI {
display: block; background-color:white;
}
TEI > teiHeader > fileDesc > titleStmt > title {
display: block;
}
TEI > teiHeader > fileDesc > titleStmt > author {
display: block;
}
TEI > teiHeader > fileDesc > publicationStmt > date {
display: block;
}
TEI > teiHeader > fileDesc > sourceDesc { display: none; }
/*
** main area
*/
body {
display: block;
}
back {
display: block;
}
div {
display: block;
}
head {
display: block;text-align: center; margin-bottom:20px
}
l {
display: block;
}
lg {
display: block; text-align: center; margin-bottom:10px
}
4. Create an HTML page to give access to the information
<HTML>
5. Publish the document on UB personal webspace
Put three files in a directory on the webserver, in this case we will add them to the to persoonal webspace at UB. These files can be put an any webserver. The requirements of the server are to be able to serve .css, .xml, and .html files. It would be uncomman for a webserver not to serve the files correctly (see mime types).
Create a directory
TEI
Upload the files:
.xml .css .html
Now go to:
