TEI Customization - ODD and schema

DiXiT Workshop 'Scholarly Digital Editions and Modern Greek Studies'
Athens, 24-28 April 2017

CHAPTER 0

Have we met before?


laundrysoapman25.deviantart.com

Well formed and valid


Remember?

  • An XML document is well formed when it complies with the XML syntax

  • An XML document is valid against a schema









… Where ?





… Why ?

A schema


defines vocabulary and grammar


which elements and attributes are to be used, where and how


e.g. which element you can use inside another element, which values you can give to an attribute

Chapter 1

TEI Customization

Associate schema to a document

Schema helps you!

Suggestions, code completion, pop-up descriptions …

Associate schema to a document

Schema controls you!

Red square, error messages, invalid document …

     

The good news is …

that you can create or adjust the schema !

TEI customization

Customization of the TEI is motivated by two really important things:

  • the diverse disciplinary needs and concerns of the TEI community

  • The goal of reconciling the need for a common encoding language with the need for expressiveness

Community-maintained TEI schemas


  • tei_all
  • tei_lite (light and basic encoding)
  • tei_drama (performance texts)
  • tei_speech (speech and spoken texts)

More at http://www.tei-c.org/Guidelines/Customization/


Have you met them before?

Community-maintained TEI schemas


  • tei_all
  • tei_lite (light and basic encoding)
  • tei_drama (performance texts)
  • tei_speech (speech and spoken texts)

More at http://www.tei-c.org/Guidelines/Customization/


Have you met them before?
Yes, they are available in oXygen through its TEI framework.

Recap (theory)


A schema defines vocabulary and grammar

which elements and attributes are to be used, where and how

it represents in a structured and formalized way

your understanding of and approach towards

the text to be encoded (scientific choices)

Recap (practice)

What happens if you change the schema?

Chapter 2

ODD (One document does it all)

A TEI Customization

comes in the form of / is referred as

an ODD




… What is an ODD?

ODD (One Document Does it All)


  • TEI document (that is a XML document)
  • schema (for the machine)
  • documentation (for the user, like the Guidelines)


ODD (One Document Does it All)


  • TEI document (that is a XML document)
  • schema (for the machine)
  • documentation (for the user, like the Guidelines)


E.g. tei_dixit.xml or you can change the extension to tei_dixit.odd

The ODD tree

A view of the whole system
From: Syd Bauman, Julia Flanders, and the Women Writers Project

TEI customization under the hood (in a nutshell)
From: Syd Bauman, Julia Flanders, and the Women Writers Project

Chapter 2

The TEI bricks

The TEI is ...



not only a big list of elements


They are structured in modules and classes

Elements


+/- 550 elements and a very large number of attributes!

Grouped into:

  • modules

  • classes

Modules = lego kits



The class system



A class groups elements or attributes that behave in the same way and that tend to go in the same place.



  • Classes of elements are named model.the class (e.g. model.global)

  • Classes of attributes are named att.the class (e.g. att.global)

Examples

The class system

And now … exercise time (3 mins :)

Chapter 3

Customizing the TEI

Customization options


  • Select modules
  • Remove unnecessary elements
  • Add new elements or attributes
  • Change element or attribute names
  • Constrain attribute values
  • Constrain structure
  • Manipulate functional groupings of elements (classes)
  • Produce an internationalized version of the TEI

1. Create the ODD


  • manually writing it
  • using Roma

1. Create the ODD


  • manually writing it
  • using Roma

2. Generate the schema

(ODD —> RNG, RNC, DTD, etc.)

  • web app Roma
  • oXygen's built-in stylesheets
  • Oxford University's OxGarage multi-transformer
  • roma: a command-line tool
  • Complete list with links and instructions at WWP ODD Processors page

Let's go to Roma!

Recap

  • ODD Customization reflects your scientific choices, reinforces consistency, documents your work

Recap

  • ODD Customization reflects your scientific choices, reinforces consistency, documents your work

  • For creating an ODD Customization <— manipulate (delete, add, change) the TEI bricks (elements, attributes, modules, classes)

Recap

  • ODD Customization reflects your scientific choices, reinforces consistency, documents your work

  • For creating an ODD Customization <— manipulate (delete, add, change) the TEI bricks (elements, attributes, modules, classes)

  • From an ODD Customization —> generate documentation and schema

Recap

  • ODD Customization reflects your scientific choices, reinforces consistency, documents your work

  • For creating an ODD Customization <— manipulate (delete, add, change) the TEI bricks (elements, attributes, modules, classes)

  • From an ODD Customization —> generate documentation and schema

  • A TEI document should be well formed (XML rules) and valid (schema rules)

Credits and links

These slides reuse materials from

Elena Spadini

DiXiT Workshop 'Scholarly Digital Editions and Modern Greek Studies'

Athens, 24-28 April 2017

Licence: CC-BY-NC-SA 4.0