Skip to content

jhellingman/tei2html

Repository files navigation

xspec tests CodeFactor

tei2html

tei2html is a collection of XSLT 3.0 style sheets to transform a document encoded in TEI to HTML. They have been specifically developed to generate a monolithic (single) HTML document for posting on Project Gutenberg, but they can also generate 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 extent 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

  • Wiki: wiki-pages that give some instructions and background documentation.

  • samples: a few sample TEI files of books posted to Project Gutenberg. I am currently adding my TEI source files to GitHub: see GutenbergSource for many more examples.

  • sandbox: experimental code, better ignored if you don’t want to play around.

  • schemas: schema definitions for some supplementary XML formats.

  • style: CSS stylesheets, used by the generated HTML and ePub results.

  • test: a test TEI file, complete with the generated output in XML, HTML and ePub format. This is used to verify the correct transformation. It contains various examples, and serves as a regression test when refactoring the XSLT transforms.

  • tools: perl scripts used to apply the transforms; also includes perl scripts that can be used while preparing TEI files.

  • xspec: xspec tests that cover various (but not yet all) aspects of the XSLT transforms.

About

XSLT stylesheets to convert TEI to HTML and ePub format.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •