XSLT stylesheets to convert TEI to HTML and ePub format.
XSLT Perl HTML Max CSS C Other
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
Wiki
covers
databases
documentation
locale
samples
sandbox
schemas
style
test
tools
.gitignore
LICENSE.txt
README.md
block.xsl
checks.pl
checks.xsl
colophon.xsl
configuration.xsl
contents.xsl
css.xsl
divisions.xsl
drama.xsl
facsimile.xsl
figures.xsl
gutenberg.xsl
header.xsl
inclusions.xsl
index.xsl
inline.xsl
levenshtein.xsl
lists.xsl
localization.xsl
log.xsl
merge-documents.xsl
messages.xml
messages.xsl
messages2csv.xsl
messages2messages.xsl
messages2po.pl
messages2po.xsl
normalize-table.xsl
notes.xsl
p4top5.xsl
pgtei2tei.xsl
references-func.xsl
references.xsl
rend.xsl
segmentize.xsl
splitter.xsl
stripns.xsl
tables.xsl
tei2dc.xsl
tei2epub.xsl
tei2epubnav.xsl
tei2html.xsl
tei2ncx.xsl
tei2opf.xsl
tei2pgtei.xsl
tei2readme.xsl
tei2tei.xsl
tei2wl.pl
tei2wl.xsl
titlepage.xsl
usage.xsl
utils.epub.xsl
utils.html.xsl
utils.xsl
xml2kwic.pl
xml2kwic.xsl
xml_tei.stx
xsltdoc.config
xsltdoc.pl

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