A TEI-encoded electronic text is always encoded as a tei.2 element, which in turn contains a teiHeader element followed by a text element. The overall structure is thus:
<tei.2> <teiHeader> <!-- TEI header information ... --> </teiHeader> <text> <front> <!-- ... --> </front> <body> <!-- ... --> </body> <back> <!-- ... --> </back> </text> </tei.2>
The start-tag of the tei.2 element is preceded by an explicit reference to the external file containing the document type definition to be applied to the text by the SGML parser. The stripped-down DTD described here may be invoked with the following document-type declaration:
<!DOCTYPE tei.2 SYSTEM 'barebone.dtd'>
In some systems, the association of a document with a given document type is handled internally, and no such explicit declaration is visible until the document is `exported' from the system. In such systems, the user will be asked to select a `rules' or `logic' file when the document is first created or imported into the editor.