TEI by Example Module 8: Customising TEI, ODD, Roma Ron Van den Branden Edward Vanhoutte Melissa Terras Association for Literary and Linguistic Computing (ALLC) Centre for Data, Culture and Society, University of Edinburgh, UK Centre for Digital Humanities (CDH), University College London, UK Centre for Computing in the Humanities (CCH), King’s College London, UK Centre for Scholarly Editing and Document Studies (CTB) , Royal Academy of Dutch Language and Literature, Belgium
Centre for Scholarly Editing and Document Studies (CTB) Royal Academy of Dutch Language and Literature Koningstraat 18 9000 Gent Belgium
ctb@kantl.be
Edward Vanhoutte Melissa Terras
Centre for Scholarly Editing and Document Studies (CTB) , Royal Academy of Dutch Language and Literature, Belgium Centre for Scholarly Editing and Document Studies (CTB) , Royal Academy of Dutch Language and Literature, Belgium Gent
Centre for Scholarly Editing and Document Studies (CTB) Royal Academy of Dutch Language and Literature Koningstraat 18 9000 Gent Belgium

Licensed under a Creative Commons Attribution ShareAlike 3.0 License

9 July 2010
TEI By Example. Edward Vanhoutte Ron Van den Branden Melissa Terras

Digitally born

TEI By Example offers a series of freely available online tutorials walking individuals through the different stages in marking up a document in TEI (Text Encoding Initiative). Besides a general introduction to text encoding, step-by-step tutorial modules provide example-based introductions to eight different aspects of electronic text markup for the humanities. Each tutorial module is accompanied with a dedicated examples section, illustrating actual TEI encoding practise with real-life examples. The theory of the tutorial modules can be tested in interactive tests and exercises.

en-GB integrated examples in a single file
Module 8: Customising TEI, ODD, Roma
jTEI: a Customisation for Journal Articles

This examples provides some snippets of the jTEI customisation ODD file, which defines a minimalist TEI scheme for encoding journal articles. This customisation is being used for encoding the source files of the articles of the Journal of the Text Encoding Initiative. This clean customisation defines a trimmed-down model of TEI texts, making it easier to enforce a consistent encoding style. This way, authors and editors are offered guidance in the composition and editing of an article. Inside the schemaSpec section of this tei_jtei customisation, you’ll see that only a limited number of elements is included from the core, corpus, figures, header, namesdates, tagdocs, tei, textstructure, and transcr TEI modules.

In this example, the definition of the figure element is made more stringent, in order to enforce a very specific structure on its contents. This is done inside an elementSpec element with a value of figure for the ident attribute; the mode attribute indicates that the existing element element specification should be changed. The contents for the figure element are being redefined in a content element, which is specifying a very strict sequence of either a single graphic, egXML, or eg element, which must be followed by one or more head elements. Notice how the elementRef elements are being used to refer to these different TEI elements, and the sequence and alternate elements are being used to specify how they are combined. With the minOccurs and maxOccurs attributes on the elementRef reference to the head element, it is stipulated that at least 1 head element must be present, without an upper bound. The attList section is used to remove the attributes place and title from figure.

Likewise, the specification of the titleStmt element is re(de)fined, in that its content is reduced to a sequence of one or more title elements, followed by one or more author elements. Notice that the order is important here: there’s no alternate wrapper here, that would allow alternation of these elements. Notice, too, how this elementSpec element contains additional modifications: a constraintSpec element is used to define additional Schematron checks that can express context-dependent validation rules. In this case, a rule is defined which ensures that at least one title element must be present in titleStmt, with a value main for its type attribute. For more information on the definition of such Schematron constraints in ODD: see section 22.5.2 Additional Constraints of the TEI Guidelines.

jTEI input customization Ron Van den Branden ron.vandenbranden@kantl.be Martin Holmes mholmes@uvic.ca Originally generated on 2014-01-30T13:29:15Z using oddbyexample.xsl. Progressively modified after that.

Originally generated by oddbyexample.xsl, based on analyzing 6 files from file:/F:/ctb/jTEI/jTEIsource/branches/working docs/tei2openedition/oddbyexample. Manually modified thereafter.

title statement groups information about the title of a work and those responsible for its content. In jTEI, this must include a title and an author element for each author of the paper, which in turn must include name, affiliation and email. A title of type "main" is required in . Add a @type='main' attribute to the first title. main figure groups elements representing or containing graphic information such as a graphic illustration, or a block of example code. Figure must contain either graphic, egXML (for example XML code) or eg (for non-XML code), and a mandatory head element containing the caption for the figure. Inline code examples may be provided through egXML and eg without the figure wrapper.
The View from the Bridge Used with permission
if ((err = SSLHashSHA1.update(&hashCtx, &serverRandom)) != 0) goto fail; if ((err = SSLHashSHA1.update(&hashCtx, &signedParams)) != 0) goto fail; goto fail; if ((err = SSLHashSHA1.final(&hashCtx, &hashOut)) != 0) goto fail; An embarrassing error for Apple
<egXML xmlns="http://www.tei-c.org/ns/Examples"> <list rend="bulleted"> <item>Life</item> <item>The Universe</item> <item>Everything</item> </list> </egXML> A book title rendered as a list
A snippet of the jTEI customisation ODD file (Van den Branden and Holmes, 2014). TEI XML source available from .
Abolishing Numbered Text Divisions

Following ODD file defines a minimal TEI schema (containing the core, tei, header, and textstructure modules). Besides that, it does away with numbered text divisions (div1, ..., div7) by specifying the value delete for the mode attribute on their respective elementSpec declarations.

Notice that strictly speaking, only deletion of div1 is necessary, as all further numbered subdivisions should nest according to the TEI scheme. By definition, if the topmost level is deleted, all further subdivisions are practically excluded from the document model. Although they are still declared, they can’t be used in documents according to this schema. Additionally, notice how this list of separate elementSpec instructions could be expressed more concisely as:

numbered divisions The TBE crew

for use by whoever wants it

no source, born digital

This customisation only selects the minimal TEI modules, and deletes all numbered subdivisions.

TBE-crafted example encoding, no material source.
Van den Branden, Ron and Martin Holmes. 2014. Journal of the Text-Encoding Initiative Article Schema. Schema and guidelines for encoding an article for the journal. .