An Introduction to TEI:
by Laura Mandell, Miami Univ. of Ohio
At this site, TEI is defined in relation to XML. The site offers instructions for using oXygen, software for writing XML documents, and then instructions for coding TEI documents that are usable with or without oXygen.
What's Here:
The Basics (below)
Introduction to Coding TEI Documents (Table of Contents to this Site)
The Basics
DEFINITIONS: If you are familiar with HTML (the code used to write Web pages), XML (eXtensible Markup Language) may be mystifying to you, as it was to me, because its tags simultaneously offer instructions for parsers, for software, for search engines, and for browsers. TEI (so-called because produced by the Text Encoding Initiative) is one version of XML; there is also a version of it called TEI Lite. Any document you make using the TEI Guidelines (a TEI document) will have a name ending with ".xml," just as any Web page you make has the file extension ".htm" or ".html." The DTD (Document Type Definition) file (extention .dtd) specifies a set of rules that define an encoding language, be it XML or HTML; it provides the rules against which your document will be checked to see if it is properly coded when you validate that document. Thus, TEI is in effect a specific DTD (devoted to bibliographic transcription of print texts), and TEI documents are all the XML documents which follow the rules established by that DTD. An XSL, a Stylesheet file that ends with .xsl, is used to Transform XML documents. OXygen (the software) comes equipped with transformers (Apache Xalan and Saxon). TEI (the organization / Web site) offers XSL files for transforming TEI into Web pages that work with the Saxon transformer. Discussed in these instructions: the XSLT (xsl stylesheets from TEI, used in conjunction with Saxon that is built into oXygen) transforms TEI documents into HTML (Web pages) that can then be seen on line using any browser.
XML as a document language is infinitely "extensible" (hence the name) based on particular needs (a business has a particular kind of invoice, for instance). Sometimes, though, it is better not to simply extend your markup language idiosyncratically. TEI is an extended version of XML, with its own DTD or set of rules, that many people have consented to follow: it is a set of guidelines for extending XML if you are a librarian -- someone interested in specific kinds of bibliographic information. TEI Guidelines, provided by the TEI Organization, are a standardization of XML: if we all agree to use it, software will be designed for it in the future.
IMPORTANCE: If your document is in XML, then no matter what programs become available or fall by the wayside, your text will be readable. People will be able to open it! Additionally, there will be XSL Transformers developed for XML in order to make your document readable, usable, and editable whatever new software is developed in the future. If your document is in XML, tools designed for use with XML documents, such as the tools being developed for NINES, will be usable in it. If your XML document follows the TEI Guidelines, you can say, in all honesty, that your edition is library or archival quality.
HOW-TO INSTRUCTIONS: There are many good teaching tools for it sponsored by TEI, an introduction forthcoming from the Brown Women Writers Project, and an introduction prepared by the UVA Electronic Text Center. Some of the instructions provided here are specific to oXygen, but others can be used no matter what program, if any, you are using to create your TEI .xml files (see the Table of Contents).
--coding your documents:
TEI P4 is the current version of the TEI Guidelines, and it is expressed in two ways: as a DTD (the set of rules) and as a sort of manual explaining what using that DTD asserts about how you will code your document (available also for $90 in print from the Univ. Press of Virginia).
--DTD (Document Type Definition):
You may or may not have noticed that well-formed HTML documents refer to a DTD available on line via W3 organization (<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">). Web-page-making programs include that DTD in each document you make whenever you create a new one. To make a good XML document, you can similarly refer parsers and validators to the TEI Guidelines -- the DTD for extending XML in a standardized way recommended by the TEI organization:
<!DOCTYPE TEI.2 PUBLIC "-//TEI P4//DTD Main DTD Driver File//EN" "http://www.tei-c.org/Guidelines/DTD/tei2.dtd">
Minimally, you will have to add to that DTD two more lines:
<!DOCTYPE TEI.2 PUBLIC "-//TEI P4//DTD Main DTD Driver File//EN" "http://www.tei-c.org/Guidelines/DTD/tei2.dtd" [
<!ENTITY % TEI.XML 'INCLUDE'>
<!ENTITY % TEI.prose 'INCLUDE'>
]>Some XML software programs such as oXygen, come with TEI templates built in: when you open a document, you can open it as a TEI P4 or a TEI Lite document.
--XSL Transformers
XSL files are available on the TEI site or you may download the zip file by clicking here: P4/teixsl-html.zip (for TEI P4). Save the zip file in the folder in which you will be working. Extract the files (Windows users: you might be able to do so by right-clicking on the zip folder and selecting "Extract All"). Here (attached, or click) is more detailed information about customizing those XSL files for Web display of your documents.
RECOMMENDED SOFTWARE:
( NB: It is not yet clear which software will be recommended by NINES.)I recommend that you use oXgyen, available at http://www.oxygenxml.com/
This tool is very well supported: questions emailed to support@oxygenxml.com are usually answered the same day. Also, included in the oXygen support package is help revising your XSLT, the code that transforms your TEI documents into a Web page. I am using oXygen software to convert all my HTML pages and Word Documents into TEI documents and new HTML pages generated from those XML files. I am currently training student workers on it. In August and December, I will post updates here about how well that has worked.
You may wish to download oXygen's trial version and then create some of your documents using that program, simply as a gentle way of introducing yourself to XML -- just as you might have at one time have used Dreamweaver to learn more about HTML. XML documents can, of course, be opened and manipulated in many programs -- including, minimally, Notepad or BBLite -- so whatever documents you create in oXygen will not be dependent on that program either for functioning or for editing.
Here (attached, or click) is a list of URLs discussed above.
The following instructions pertain to oXygen 4.2, and they will be updated as new editions of oXygen appear.