TEI 2026: Navigating and Processing Data from the TEI with XPath and XSLT
Event Language
EnglishFormat
in person/face-à-faceTEI markup provides structures that are particularly useful for processing data beyond what we can do with so-called “plain text”. A full-day workshop allows us plenty of time to teach the pull-processing of data from XML/TEI with simple, reusable XSLT templates to represent in simple TSV/CSV, HTML tables/charts, and (if time!) simple SVG graphics.
Knowing how to locate and explore data in your encoding can help to learn how to work with TEI and XML generally. This half-day workshop is designed for people who have some experience with TEI and seek to learn how to work with XML markup for analysis and research. Participants will gain a working, practical knowledge of the query language XPath and the transformation language XSLT, and learn how these can help to reduce reliance on software, packages and plugins that may become obsolete without warning. Further, XSLT’s functional programming can serve as a way of articulating research questions around a document data model expressed in XML.
The emphasis of our workshop is ”pull-processing”, that is, extracting data and metadata from markup documents for analysis, as opposed to providing the reading view of a digital scholarly edition. Markup in documents supplies structures and contexts that are especially useful for processing data, beyond what we can do with so-called “plain text”. We will demonstrate some basic XPath navigation and calculation functions, and then show how XPath is applied in XSLT templates to address specific nodes that hold data of interest for visualization.
We will process TEI documents composed in various languages represented by our workshop members’ projects, to show that the code we write is transferable to multiple projects across language and cultural borders.
Participants will learn how to “pull” data from TEI and output text formats required for simple online tools, where the structure of the output data is transferable to many different online calculation programs and amenable to statistical processing. During the workshop we will produce some simple structured documents for storing, sharing, and visualizing data: HTML lists and tables as well as plain text tabulated data (CSV or TSV files), and (if we have time) simple SVG bar or line graphs.
We hope to process some participant-supplied XML before, during, and after the workshop. We will carefully document the XSLT that we supply during the workshop to assist participants with revising and adapting the code to their own projects.
The workshop material – including documentation, exercise examples and solutions – will be made available in a publicly and permanently accessible GitHub repository.
Outline:
- Review and refresh understanding of XML tree structures
- Orientation to XPath
- Teach basic XSLT to produce simple outputs ready for analysis and visualization. This includes:
- XML identity transformations to make changes to your markup systematically,
- XML transformations to HTML that apply simple “push processing”: to show how to work with XSLT templates that process and transform most of your nodes.
- XML transformations for “pull processing”: isolating and exploring data from your markup to make charts in HTML and visualizations in SVG.
- While learning XSLT, participants gain experience with simple HTML elements and structures for informational outputs. If time, we will provide orientation to SVG elements for simple graphics.
Room/Materials Required:
- Participants should bring laptop computers if possible.
- Instructors can provide complementary 90- or 120-day licenses for the oXygen XML Editor
This event is in partnership with SFU Library Research Commons.
Presenter(s): E. Beshero-Bondar, M. Scholger, P. O’Connor, L. Liebe
