XSLT stylesheets to convert TEI to HTML and ePub format.
XSLT Perl Max HTML CSS C Other
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
Wiki Update Figures.md Jan 27, 2018
covers Adding cover for test document; updated guidelines. Apr 30, 2010
databases Updated database schema, and truncate too long words; improved format… Oct 19, 2009
documentation Update documentation; fix issue with "position(aboveHead)" on images. Oct 17, 2017
locale Adding locale files in .po format (automatically derived from message… Apr 23, 2010
samples Improve handling of ditto-marks, and introduce the method for ditto m… Feb 12, 2018
sandbox Update pgreport.pl to generate script to get/pull git repo's from Git… Feb 5, 2018
schemas Further improvements in PG headers; adding XSD for configuration files. Oct 20, 2014
style Various small improvements. Place row-spanning brace in middle; warn … Feb 24, 2018
test Improve handling of ditto-marks, and introduce the method for ditto m… Feb 12, 2018
tools Use current tools for optimizing images; fix bug in tei2readme.xsl Feb 11, 2018
.gitignore Various small improvements. Place row-spanning brace in middle; warn … Feb 24, 2018
LICENSE.txt Create LICENSE.txt Feb 16, 2018
README.md Improve documentation. Oct 3, 2017
block.xsl Include CSS for ditto marks when using new ditto-mark method. Feb 14, 2018
checks.pl Fix issue in which normalized xml was no longer used, causing trouble… Dec 3, 2017
checks.xsl Updated translations. Jan 12, 2018
colophon.xsl Improve colophon: suppress common corrections.: Dec 25, 2017
configuration.xsl Improve colophon: suppress common corrections.: Dec 25, 2017
contents.xsl Generate list of illustration with nested figures. Improve handling o… Feb 18, 2018
css.xsl Include CSS for ditto marks when using new ditto-mark method. Feb 14, 2018
divisions.xsl Start refactoring handling of images, as to support the P5 model for … Jan 21, 2018
drama.xsl Generate list of illustration with nested figures. Improve handling o… Feb 18, 2018
facsimile.xsl Improve documentation. Oct 3, 2017
figures.xsl Various small improvements. Place row-spanning brace in middle; warn … Feb 24, 2018
gutenberg.xsl Fix several spelling issues. Sep 22, 2017
header.xsl Resolve some of the issues with the remove-initial mode used when han… Jan 28, 2018
inclusions.xsl Move some experimental files out of the way. Jul 2, 2016
index.xsl Move index handling to separate stylesheet. Oct 7, 2017
inline.xsl Various small improvements. Place row-spanning brace in middle; warn … Feb 24, 2018
levenshtein.xsl Added support for calculating the edit distance for corrections made.… Apr 9, 2017
lists.xsl Start refactoring handling of images, as to support the P5 model for … Jan 21, 2018
localization.xsl Fix some minor issues. 1. Make addPositionInfo robust for xml files w… Jan 2, 2018
log.xsl Improve handling of contributors; moving logging to own file. Nov 29, 2016
merge-documents.xsl Fix several spelling issues. Sep 22, 2017
messages.xml Add script to convert messages to CSV format file. Jan 29, 2018
messages.xsl Only output .par class if needed. Apr 16, 2017
messages2csv.xsl Add script to convert messages to CSV format file. Jan 29, 2018
messages2messages.xsl Translate missing messages for language to new message file. Improve … Feb 21, 2018
messages2po.pl Translate missing messages for language to new message file. Improve … Feb 21, 2018
messages2po.xsl Various fixes to remove issues reported by epubCheck. May 7, 2014
normalize-table.xsl Various small improvements. Place row-spanning brace in middle; warn … Feb 24, 2018
notes.xsl Various improvements. (Checks: allow periods in abbreviations; Coloph… Nov 12, 2017
p4top5.xsl Sanitizing stylesheets, and prepare for handling of TEI P5 documents. Aug 1, 2016
pgtei2tei.xsl Fix several spelling issues. Sep 22, 2017
references.xsl Improve handling of figures. Some further minor tweaks. May 21, 2017
rend.xsl Improve handling of contributors; moving logging to own file. Nov 29, 2016
segmentize.xsl Further refactor segmentize code to be able to include the checks int… Oct 26, 2017
splitter.xsl Various improvements. (Checks: allow periods in abbreviations; Coloph… Nov 12, 2017
stripns.xsl Further changes to enable the use of tei2html with P5 and later versi… Aug 2, 2016
tables.xsl Various small improvements. Place row-spanning brace in middle; warn … Feb 24, 2018
tei2dc.xsl Improve documentation. Oct 3, 2017
tei2epub.xsl Move index handling to separate stylesheet. Oct 7, 2017
tei2epubnav.xsl Improve generation of href attributes, by placing those in a function… Apr 13, 2017
tei2html.xsl Move index handling to separate stylesheet. Oct 7, 2017
tei2ncx.xsl Refactor generation of filenames to use functions instead of named te… Apr 15, 2017
tei2opf.xsl Improve handling of figures. Some further minor tweaks. May 21, 2017
tei2pgtei.xsl Use titlepage-image as cover if no cover-image is available. Oct 30, 2011
tei2readme.xsl Various small improvements. Place row-spanning brace in middle; warn … Feb 24, 2018
tei2tei.xsl Update documentation; fix issue with "position(aboveHead)" on images. Oct 17, 2017
tei2wl.pl Added some Tagalog translations; Started work on word-frequency list … Mar 14, 2011
tei2wl.xsl Adding more XSLTdoc Documentation. Dec 5, 2011
titlepage.xsl Fix several spelling issues. Sep 22, 2017
usage.xsl Alert about unknown URL scheme; various minor fixes. Jun 22, 2011
utils.epub.xsl Refactor generation of filenames to use functions instead of named te… Apr 15, 2017
utils.html.xsl Further improvements of id and href generation. Apr 14, 2017
utils.xsl Improve checks and integrate it further in report. Nov 25, 2017
xml2kwic.pl Now allow generation of KWIC for selected keywords only (given as par… Jan 1, 2012
xml2kwic.xsl Add few characters to sgmlSupport.pm; fix small issue in xml2kwic.xsl. Feb 4, 2018
xml_tei.stx Adding support for OCLC link to worldcat; adding syntax file for edit… Mar 20, 2009
xsltdoc.config Refactor generation of CSS class names. (use more functions instead o… Apr 20, 2017
xsltdoc.pl Add some more documentation to the stylesheets. Feb 10, 2014

README.md

tei2html

A collection of XSLT 2.0 style sheets to transform a document encoded in according to the TEILite DTD to HTML. They have been specifically developed to create a monolithic (single) HTML document for posting on Project Gutenberg, but are also capable of generating ePub files from the same source with a similar look and feel. In line with the type of material Project Gutenberg deals with, these style sheets are designed to deal with encoded pre-existing works, rather than works created digitally from scratch.

The transformation supports the following elements as present in TEI:

  • Plain Text and text styles
  • Title Pages
  • Tables
  • Lists
  • Tables of contents
  • Poetry and Plays
  • Footnotes
  • Illustrations
  • Cover images

Furthermore, the script can generate

  • Tables of Contents.
  • Lists of Corrections.
  • Colophons
  • Metadata as used in ePub

Tei2Html includes localisation support for English, Dutch, and to a lesser extend German, French, Spanish, Tagalog and Cebuano.

Note, that these scripts partly depend on the use of rend attributes and other TEI conventions. It should not be expected that an arbitrary TEI file renders well with those scripts (although it should render reasonable in any case.)

If you need modifications, extensions of these scripts, or need to have other TEI/XML/XSLT related work done, please be in touch with me on how I can help.

Directories

  • samples: contains a number of sample files (of books posted to Project Gutenberg; I am in the process of adding all my TEI master files to GitHub: see https://github.com/GutenbergSource for many more examples).
  • sandbox: contains experimental code, better ignored if you don't want to play around.
  • schemas: contains schema definition for a number of supplementary XML formats.
  • style: contains CSS stylesheets, used by the generated HTML and ePub results.
  • test: contains a test TEI file, complete with the generated output in XML, HTML and ePub format. This is used to verify the correct transformation; contains a large number of samples of use, and serves as a regression test when refactoring the XSLT transforms.
  • tools: contains perl scripts that can be used to apply the transforms; also includes a number of perl scripts that can be used while preparing TEI files.

External Links