This examples section is underpopulated, and could benefit from your examples! If you happen to have any text samples that you want to share under a Creative Commons Share Alike license, please do get in touch!

Examples for Customising TEI, ODD, Roma

1. Minimal customisation for journal articles

This ODD file defines a minimal TEI schema (containing the core, tei, header, and textstructure modules) that could be used to encode journal articles, adding some provisions to encode journal abstracts as metadata in the header. Of course, abstracts that are present in a printed journal articles should be encoded in the <front> part of the text, possibly in a dedicated <div type="abstract"> section. Yet, as such, the TEI header does not contain a formal way of entering an abstract as metadata, apart from perhaps a standard TEI <note type="abstract"> element inside the <bibl> part of the <sourceDesc> section of the TEI header. It could be argued that a more formalised way is desirable, and that a list of keywords as well as a prose description could qualify as structural parts of an abstract.
Therefore, this ODD file defines two new elements in a separate namespace ("http://www.teibyexample.org/"). Both extension elements are defined in a dedicated <elementSpec> element, with an add value for their @mode attributes. The class declaration for the <abstract> element (inside <classes>) states that it is a member of the model.biblPart class. This means that it can occur as content of the <bibl> element. Furthermore, it is declared a member of the att.typed attribute class, adding the attributes @type and @subtype besides the global attributes. Its content (defined in the <content> section) is defined as a sequence of an optional <abstractKeywords> element and one or more members of the model.pLike class (ie, <p> or <ab> elements). The <abstractKeywords> element is defined next, declared as member of the att.typed class as well, with plain text as its possible contents. This new element was introduced as the existing <keywords> element was considered too formal for these purposes.
<TEI xmlns="http://www.tei-c.org/ns/1.0" xmlns:rng="http://relaxng.org/ns/structure/1.0" xml:lang="en">
<teiHeader>
<fileDesc>
<titleStmt>
<title>A minimal TEI extension for journal articles</title>
<author>The TBE crew</author>
</titleStmt>
<publicationStmt>
<p>for use by whoever wants it</p>
</publicationStmt>
<sourceDesc>
<p>no source, born digital</p>
</sourceDesc>
</fileDesc>
</teiHeader>
<text>
<front>
<divGen type="toc"/>
</front>
<body>
<p>This customisation only selects the minimal TEI modules (<ident>core</ident>, <ident>tei</ident>, <ident>header</ident>, and <ident>textstructure</ident>) for brevity's sake, and adds 2 specific elements: <list>
<item><gi scheme="TBEeg">abstract</gi>: a specific header element to express the content of an article as metadata, including keywords list and paragraphs</item>
<item><gi scheme="TBEeg">abstractKeywords</gi>: a specific header element to encode a list of keywords in an abstract</item>
</list> </p>
<schemaSpec ident="abstract" docLang="en" xml:lang="en" prefix="">
<moduleRef key="core"/>
<moduleRef key="tei"/>
<moduleRef key="header"/>
<moduleRef key="textstructure"/>
<elementSpec ident="abstract" ns="http://www.teibyexample.org/" mode="add">
<desc>summarises the contents of a text</desc>
<classes>
<memberOf key="model.biblPart"/>
<memberOf key="att.typed"/>
</classes>
<content>
<rng:group>
<rng:optional>
<rng:ref name="abstractKeywords"/>
</rng:optional>
<rng:oneOrMore>
<rng:ref name="model.pLike"/>
</rng:oneOrMore>
</rng:group>
</content>
</elementSpec>
<elementSpec ident="abstractKeywords" ns="http://www.teibyexample.org/" mode="add">
<desc>provides informal keywords for a text</desc>
<classes>
<memberOf key="att.typed"/>
</classes>
<content>
<rng:text/>
</content>
</elementSpec>
</schemaSpec>
</body>
</text>
</TEI>
[1]

2. 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.
Note 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.
<TEI xmlns="http://www.tei-c.org/ns/1.0" xml:lang="en">
<teiHeader>
<fileDesc>
<titleStmt>
<title>numbered divisions</title>
<author>The TBE crew</author>
</titleStmt>
<publicationStmt>
<p>for use by whoever wants it</p>
</publicationStmt>
<sourceDesc>
<p>no source, born digital</p>
</sourceDesc>
</fileDesc>
</teiHeader>
<text>
<front>
<divGen type="toc"/>
</front>
<body>
<p>This customisation only selects the minimal TEI modules, and deletes all numbered subdivisions.</p>
<schemaSpec ident="numDiv" xml:lang="en">
<moduleRef key="core"/>
<moduleRef key="tei"/>
<moduleRef key="header"/>
<moduleRef key="textstructure"/>
<elementSpec module="textstructure" ident="div1" mode="delete"/>
<elementSpec module="textstructure" ident="div2" mode="delete"/>
<elementSpec module="textstructure" ident="div3" mode="delete"/>
<elementSpec module="textstructure" ident="div4" mode="delete"/>
<elementSpec module="textstructure" ident="div5" mode="delete"/>
<elementSpec module="textstructure" ident="div6" mode="delete"/>
<elementSpec module="textstructure" ident="div7" mode="delete"/>
</schemaSpec>
</body>
</text>
</TEI>
[2]

Bibliography

[1] TBE crafted example encoding, no material source.
[2] TBE crafted example encoding, no material source.
Want your examples here? If you happen to have any text samples that you want to share under a Creative Commons Share Alike license, please do get in touch!