Skip to Main Content

University Library, University of Illinois at Urbana-Champaign

An Introduction to XML and TEI

This guide provides an introduction to XML and the Text Encoding Initiative.

New Documents

This page explains how to create a new XML document following a particular schema.

Creating a New Document

When you create a new document, select XML from the list. 

The window is titled “New” with the dialogue, “Search or select a document type.” In a directory of folders under “recently used,” the options listed are XML Document, CSS, HTML, and XSLT Stylesheet. “XML Document” is selected and its extension reads “xml.” Buttons at the bottom show options “Customize,” “Create,” and “Cancel.”

Optionally, you can then click on "Customize" to insert the schema you'll be using.  For TEI, many of the most standard schema are available on the TEI Consortium website.

 Right-click to copy the schema URL you need (the DTD or XSD links), and then paste it into the first text bar:

The window is titled “New,” with the dialogue, “Customize editor.” The XML document is open. The first box is titled “Schema URL,” and a URL from teic.org has been pasted in. The schema type, “DTD” has been selected from a drop-down list. The following fields are empty, “Public ID,” “Namespace,” “Prefix.” However, “Root Element” reads “TEI.” The Description box contains the following, “(TEI document) contains a single TEI-conformant document comprising a TEI header and a text, either in isolation or as part of a teiCorpus element.” The “Create” button is highlighted.

 

After you enter the information, your TEI document will be set up:

A basic TEI document has been set up, according to the schema. There is no content, but only the empty containers such as teiHeader, fileDesc, titleStmt, publicationStmt, SourceDesc. Elements are automatically color-coded according to their function.