1. Home
  2. Alignment of original texts and translations
  3. Validation and Language Templates

Validation and Language Templates

In order for our web application to correctly display the translations included in each edition, we need to add a line of code at the beginning of each TEI-XML document, just before the opening <TEI> tag.

The languages we have enabled thus far are:

  • An English translation: <?teipublisher odd="bibliotheca.odd" template="editions-en.html" view="div"?>
  • A Spanish translation: <?teipublisher odd="bibliotheca.odd" template="editions-es.html" view="div"?>
  • Two translations, English and Spanish: <?teipublisher odd="bibliotheca.odd" template="editions-es-en.html" view="div"?>
  • Two translations, Spanish and Italian: <?teipublisher odd="bibliotheca.odd" template="editions-es-it.html" view="div"?>
  • Two translations; English and Modern Greek: <?teipublisher odd="bibliotheca.odd" template="editions-en-el.html" view="div" ?>
  • Three translations, Spanish, English and Italian: <?teipublisher odd="bibliotheca.odd" template="editions-es-en-it.html" view="div"?>

As new languages or combinations need to be added, this list will be expanded. As we can see, the name of the template corresponding to each language combination appears in the @template attribute.

The language of the original text is irrelevant for the templates.

Thus, the beginning of a file in our collection will be, for example:

<?xml-model href="http://www.tei-c.org/release/xml/tei/custom/schema/relaxng/tei_all.rng" type="application/xml" schematypens="http://relaxng.org/ns/structure/1.0"?>
<?xml-model href="http://www.tei-c.org/release/xml/tei/custom/schema/relaxng/tei_all.rng" type="application/xml" schematypens="http://purl.oclc.org/dsdl/schematron"?>
<?teipublisher odd="bibliotheca.odd" template="editions-en.html" view="div"?>
<TEI xmlns="http://www.tei-c.org/ns/1.0">
	… Resto del documento …

Antes del comienzo del archivo TEI-XML propiamente dicho, que comienza en la etiqueta <TEI>, hay tres líneas de código obligatorias para que nuestros archivos se muestren propiamente:

  • The two references, to the schema on which our documents are validated, and to the structure and to the schematron, are obligatory and identical for all files, and must always be included at the beginning of each file.
  • The third line indicates the document of transformations used (bibliotheca.odd), the language template, and the way in which the presentation of the text on screen will be divided (by main divisions, in our case).

Thereafter, the TEI-XML file itself is included.

How can we help?