This is a set of XSLT 2.0 specifications to transform TEI XML documents to XHTML, to LaTeX, to XSL Formatting Objects, to OOXML (docx), and to ePub format. The files can be downloaded from the Releases area of http://tei.sf.net. 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.
There is a change log file available.
The XSL FO style sheets were developed for use with PassiveTeX (http://www.tei-c.org/Software/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.
The final important directory is profiles, which has a set of predefined project starting points (currently ‘default’, ‘iso’ and ‘enrich’), each of which has a file to.xsl for each of the supported output formats. To convert TEI to HTML in the default mannner, run profiles/default/html/to.xsl. Other starting points are listed below.
For the brave, there are Linux command-line shell scripts teitoepub, teitodocx and docxtotei for converting to ePub and Word.
Any other use of the stylesheets, eg by referencing individual modules, is not supported and requires good understanding of XSL.
The TEI stylesheets are designed to be customized, and I will gladly add more parameterization in future. There are currently several hundred things you can set to change the output, described in the Customization Handbook. They are either XSLT variables, or named templates, so you need to understand a little of XSL syntax. If you know a bit more, you can override any of the templates in the style files, but then you are on your own.
The Stylebear web form will construct a XSL file for you, with all the variables configured.
The stylesheets have been tested at various times with the Microsoft, XT, Saxon, jd, libxslt, Xalan, Sablotron and Oracle XSLT processors; they were converted to use XSLT 2.0 in 2009, and so now only work with Saxon (from http://saxon.sourceforge.net). XSLT 1.0 stylesheets are also available, but will not be further maintained. It is up to the user to find out how to run the XSLT processor! This may be from within a Java program, from your editor, on the command-line, or inside a web server.