Building the LEMDO Schemas

What and where are the LEMDO schemas?

When someone is editing a LEMDO text, they’re making use of two different schemas, which Oxygen is aware of in the background; these include a RELAX NG schema (lemdo.rng) and a Schematron schema (lemdo.sch). If you’re a programmer creating e.g. XSLT code for the project, there is another schema which helps to standardize the codebase: technical.sch. Finally, when the various TEI versions of each XML file are created at build time, they are also validated against a second pair of schemas, tei_all_LEMDO.rng and tei_all_LEMDO.sch.
All of these schemas are found in the data/sch folder, alongside the files from which they are generated: lemdo.odd, technical.odd, and tei_all_LEMDO.odd. You will also see three matching XSLT files, lemdo.xsl, technical.xsl, and tei_all_LEMDO.xsl. These are the pre-processed versions of the Schematron (*.sch) files used to do Schematron validation. The Schematron language is transformed into XSLT before being applied to a document for validation purposes, and these XSLT files are pre-generated so that this process only has to be done once.
Schemas and their associated sources are only usually edited by senior editors, project managers, or programmers. Anyone else who would like to see a change to the schema should make a suggestion to the project leaders, or raise an issue on GitHub.

How to build the schemas

Whenever a change is made to a LEMDO schema, it is usually done in the appropriate ODD file (although not always: see below). If, for example, a new Schematron rule is added (in the form of a TEI <constraintSpec> to the lemdo.odd file, the schemas will have to be rebuilt before that rule can take effect. The schema build process is handled by an Ant file, code/schema/buildBaseOdd.xml. This file builds all three ODD files to generate all their outputs, and handles all complexity automatically. We recommend that you run this every time you make any changes to any of the ODD files or related files, even if it seems that some rebuilds may not be required. It doesn’t take long to run.
To build the schemas from the ODD files, you need to be on a Linux or Mac computer; Windows will not work. You can run the build process in two different ways:
With the lemdo_all.xpr project open in Oxygen, open the data/sch/lemdo.odd file, and press the red triangle. This will run the entire process.
At the command line, go to code/schema, and run:
ant -f buildBaseOdd.xml
The results should be exactly the same: all the associated files will be refreshed, and changes can be committed if they are as expected. Before committing changes, though, we recommend that you validate all the existing files as follows: Navigate to the lemdo root folder, and run:
svn update && ant quickValidateSource
This will take some time to run, but it will validate all the existing XML files in the project with the rebuilt schemas. If the change you made has caused any of these files to become invalid, you will need to figure out what the problem is.

Complexities to be aware of

The lemdo.odd file in particular is large and complicated, and if you look through it, you will see some sections that have comments like this:
<!-- DO NOT EDIT: These values are generated from the taxonomies document. --><!-- Any changes made will have no effect. -->
These comments appear in locations where the ODD content is not constructed by hand, but is generated as part of the schema build process, taking XML structures from the TAXO1.xml document (typically taxonomies/categories) and generating from them (for example) <valList> elements in the ODD file, which are then processed into attribute values in the RELAX NG schema. We do things this way because it’s easier for senior editors to maintain taxonomies in the form of TEI <taxonomy> elements than to hand-edit the ODD file elements, but also because we use the <taxonomy> elements in other ways, such as rendering them into documentation tables. A <taxonomy> ’s descendant <category> elements can be usefully organized into a nested hierarchy, whereas a <valList> has to be flat.
This means that when you need to make a change to some component in the RELAX NG file, you should first check to see if it is encoded directly in the ODD file, or whether the content in the ODD file has a comment telling you that it is generated from somewhere else; if the latter is true, you will need to make the change in the other location before regenerating the schemas.

TEI sources and requirements for building schemas

In the lemdo root directory you will see a directory called Stylesheets-local. This contains a local copy of the parts of the TEI Stylesheets collection which are required to build ODD files into schemas, along with a file called p5subset.xml, which is a complete copy of all the TEI element and attribute definitions from the TEI standard. We use static copies of these files rather than reaching out to the TEI website to get the latest fresh copies of them for two reasons:
The TEI site is sometimes unavailable, so we don’t want to be dependent on it to build our schemas.
The TEI source code and Stylesheets are updated at least twice a year, and each new release may introduce changes which result in some of our documents being invalid in some way.
Generally, we like to stay up to date with the latest versions of the TEI and Stylesheets, but because updates may result in problems, we need to stage them carefully. When a new version of TEI is released, we recommend that a programmer on the project approach the update as follows:
Make sure you have plenty of time available to devote to any emergent issues.
Run svn update in the LEMDO root folder.
Make sure the TEI website is available and working.
Run this command to update the local copies of the Stylesheets:
ant globals.getTeiSchemaBuildRequirements
This command should retrieve new copies of the Stylesheets and p5subset.xml, and copy the relevant files from the download location (a folder called Stylesheets) into the Stylesheets-local folder, overwriting the existing ones.
Move to the code/schema folder, and run:
ant -f buildBaseOdd.xml
If that succeeds in building all the schemas, then go back to the LEMDO root folder and run:
ant quickValidateSource
Wait until all the validation has completed (it takes a while).
If everything succeeded—in other words, if the schemas all built successfully, and all the LEMDO documents were valid—then you can commit all the changes. However, if anything did not work, you will need to figure out and solve the problem, or roll back all the changes:
svn revert --recursive .

Prosopography

Janelle Jenstad

Janelle Jenstad is a Professor of English at the University of Victoria, Director of The Map of Early Modern London, and Director of Linked Early Modern Drama Online. With Jennifer Roberts-Smith and Mark Kaethler, she co-edited Shakespeare’s Language in Digital Media: Old Words, New Tools (Routledge). She has edited John Stow’s A Survey of London (1598 text) for MoEML and is currently editing The Merchant of Venice (with Stephen Wittek) and Heywood’s 2 If You Know Not Me You Know Nobody for DRE. Her articles have appeared in Digital Humanities Quarterly, Elizabethan Theatre, Early Modern Literary Studies, Shakespeare Bulletin, Renaissance and Reformation, and The Journal of Medieval and Early Modern Studies. She contributed chapters to Approaches to Teaching Othello (MLA); Teaching Early Modern Literature from the Archives (MLA); Institutional Culture in Early Modern England (Brill); Shakespeare, Language, and the Stage (Arden); Performing Maternity in Early Modern England (Ashgate); New Directions in the Geohumanities (Routledge); Early Modern Studies and the Digital Turn (Iter); Placing Names: Enriching and Integrating Gazetteers (Indiana); Making Things and Drawing Boundaries (Minnesota); Rethinking Shakespeare Source Study: Audiences, Authors, and Digital Technologies (Routledge); and Civic Performance: Pageantry and Entertainments in Early Modern London (Routledge). For more details, see janellejenstad.com.

Joey Takeda

Joey Takeda is LEMDO’s Consulting Programmer and Designer, a role he assumed in 2020 after three years as the Lead Developer on LEMDO.

Mahayla Galliford

Project manager, 2025-present; research assistant, 2021-present. Mahayla Galliford (she/her) graduated with a BA (Hons with distinction) from the University of Victoria in 2024. Mahayla’s undergraduate research explored early modern stage directions and civic water pageantry. Mahayla continues her studies through UVic’s English MA program and her SSHRC-funded thesis project focuses on editing and encoding girls’ manuscripts, specifically Lady Rachel Fane’s dramatic entertainments, in collaboration with LEMDO.

Martin Holmes

Martin Holmes has worked as a developer in the UVic’s Humanities Computing and Media Centre for over two decades, and has been involved with dozens of Digital Humanities projects. He has served on the TEI Technical Council and as Managing Editor of the Journal of the TEI. He took over from Joey Takeda as lead developer on LEMDO in 2020. He is a collaborator on the SSHRC Partnership Grant led by Janelle Jenstad.

Navarra Houldin

Training and Documentation Lead 2025–present. LEMDO project manager 2022–2025. Textual remediator 2021–present. Navarra Houldin (they/them) completed their BA with a major in history and minor in Spanish at the University of Victoria in 2022. Their primary research was on gender and sexuality in early modern Europe and Latin America. They are continuing their education through an MA program in Gender and Social Justice Studies at the University of Alberta where they will specialize in Digital Humanities.

Tracey El Hajj

Junior Programmer 2019–2020. Research Associate 2020–2021. Tracey received her PhD from the Department of English at the University of Victoria in the field of Science and Technology Studies. Her research focuses on the algorhythmics of networked communications. She was a 2019–2020 President’s Fellow in Research-Enriched Teaching at UVic, where she taught an advanced course on Artificial Intelligence and Everyday Life. Tracey was also a member of the Map of Early Modern London team, between 2018 and 2021. Between 2020 and 2021, she was a fellow in residence at the Praxis Studio for Comparative Media Studies, where she investigated the relationships between artificial intelligence, creativity, health, and justice. As of July 2021, Tracey has moved into the alt-ac world for a term position, while also teaching in the English Department at the University of Victoria.

Orgography

LEMDO Team (LEMD1)

The LEMDO Team is based at the University of Victoria and normally comprises the project director, the lead developer, project manager, junior developers(s), remediators, encoders, and remediating editors.

Metadata