"This is a set of XSLT 2.0 specifications to transform TEI XML documents to XHTML, to LaTeX, to XSL Formatting Objects, to/from OOXML (docx), to/from OpenOfice (odt) and to ePub format. [. . .] They concentrate on the simpler TEI modules, but adding support for other modules is fairly easy. In the main, the setup has been used on ‘new’ documents, ie reports and web pages that have been authored from scratch, rather than traditional TEI-encoded existing material."
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
Support for TEI
Documentation is in English.
These two pages should be identical and therefore equally authoritative:
Among the components of this package of stylesheets not documented are the following:
tools2/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
tools2/odd2nuodd.xsl– switches from a traditional ODD-by-exclusion to a newer form ODD-by-inclusion
See also this guide by Lauara Mandell, which contains some documentation and some videos: http://idhmc.tamu.edu/chat/xslt/modifyTEI.html
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
Word has two kinds of styles: paragraph styles and character styles. According to Sebastian, "The basic rule of the conversion is that if named [character] styles are used, they take precedence over manual formatting." That is, if text (even a whole paragraph) has a character style applied but is also marked in Word as being italicized, the italics will not come through in the conversion separate from the character style. This is the single biggest defect in the system (according to Lou, and Ron!)
The package includes a number of profiles in the
Current version number and date of release
History of versions
How to download or buy
Download zip file
Download the latest zip file (below all of the folders) from https://sourceforge.net/projects/tei/files/Stylesheets/ .
Install the Debian package
tei-xsl Debian package from the list of Debian packages.
Get from Subversion
svn co https://tei.svn.sourceforge.net/svnroot/tei/trunk/ /path/to/local/directory/
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 should not download just the stylesheets module (using
svn co https://tei.svn.sourceforge.net/svnroot/tei/trunk/Stylesheets/) because
Stylesheets/Makefilerequires that other modules be present.
- 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