This is a family of XSLT 2.0 stylesheets to transform TEI XML documents to various formats, including XHTML, LaTeX, XSL Formatting Objects, ePub, plain text, RDF, JSON; and to/from Word OOXML (docx) and OpenOfice (odt). They concentrate on the core TEI modules which are used for simple transcription and "born digital" writing. It is important to understand that they do not
- cover all TEI elements and possible attribute values
- attempt to define a standard TEI processing or rendering model
They should not be treated as the definitive view of the TEI Consortium about rendering TEI documents.
Please sign all comments.
"The XSL FO style sheets were developed for use with PassiveTeX (http://projects.oucs.ox.ac.uk/passivetex/), a system using XSL formatting objects to render XML to PDF via LaTeX. They have not been extensively tested with the other XSL FO implementations."
- Saxon 9.2 or later. If using Debian or Ubuntu, you can get it from http://tei.oucs.ox.ac.uk/teideb/ .
- ant and ant-contrib. Note that as of 2011-11-30, ant-contrib is not availabe as as RedHat package.
Source code and licensing
This software is dual-licensed:
1. Distributed under a Creative Commons Attribution-ShareAlike 3.0 Unported License http://creativecommons.org/licenses/by-sa/3.0/
Support for TEI
The stylesheets render TEI XML documents to various formats, with the constraint that they do not offer an implementation of all tags, and only support a limited range of values for the @rend attribute.
Documentation is in English.
Among the components of this package of stylesheets not documented are the following:
tools/oddbyexample.xsl– generates a list of all the attribute values used in the directory of texts you apply it to, in the form of an ODD file, from which you can in turn generate documentation and schemas using Roma
tools/odd2nuodd.xsl– switches from a traditional ODD-by-exclusion to a newer form ODD-by-inclusion
See also this guide by Laura Mandell, which contains some documentation and some videos: http://idhmc.tamu.edu/chat/xslt/modifyTEI.html However, be aware that this covers an earlier release, and things may have changed
Creating a custom profile
To create a profile for converting to/from a format and TEI XML, create either or both as needed:
Start by copying the files in
profiles/default/$FORMAT/ and then adding your own overrides and/or additional templates. See this brief example of additional templates.
Note that if your
$FORMAT is docx, this directory must contain a file
template.docx which is used to create .docx files from. See the sample in the default profile.
Converting from DOCX format
"The TEI conversions from docx are better in many ways than the conversions from other the wordprocessing formats. There are also small tricks like having docx styles of 'tei_elementName' to get certain phrase-level elements converted."
Bugs and feature requests should be made in GitHub: https://github.com/TEIC/Stylesheets/issues
The package includes a number of profiles in the
Current version number and date of release
History of versions
See detailed changelog at https://github.com/TEIC/Stylesheets and automatically generated commit log at https://github.com/TEIC/Stylesheets/commits/master . Past versions can be downloaded at https://sourceforge.net/projects/tei/files/Stylesheets/ .
How to download or buy
a) Download zip file
Download the latest zip file (below all of the folders) from https://sourceforge.net/projects/tei/files/Stylesheets/ .
b) Install the Debian package
tei-xsl Debian package from the list of Debian packages.
c) Get from Github
git clone firstname.lastname@example.org:TEIC/Stylesheets.git /path/to/local/directory/Stylesheets
Then, if you want to add these to
/usr/ (which you will need to do in order to use the command-line shell scripts), you can do the following:
but note the following:
- You will need to run
make installas a user with write permission to
/usr/. So if using Ubuntu, for example, you will need to instead do
sudo make install.
The XSLT 1.0 version of this stylesheet family, which is no longer actively maintained, can be found on Github at https://github.com/sebastianrahtz/TEIXSL-v1.git