TEI Boilerplate is a lightweight, HTML5 compliant framework for publishing TEI documents. TEI Boilerplate (TEIBP) is designed to bridge the gap between the browser-friendly features of HTML and the semantic richness of native TEI documents.
Although TEI provides mechanisms for describing the design, presentational, and material features of the source document, projects and individual scholars that use TEI are responsible for developing their own methods, or implementing existing solutions, for converting the TEI to a presentation-ready state for the web or print. Two potential paths to reach this goal are:
- Transforming TEI to HTML using XSLT and styling the HTML output with CSS.
- Styling the TEI directly with CSS by referencing a CSS stylesheet from within the TEI document.
Both approaches have advantages and disadvantages. Although HTML is the language of the web and is well supported by browsers, HTML’s descriptive capabilities are less expressive than TEI’s. When TEI is transformed to HTML, much of the richness of the TEI is lost in the resulting HTML. However, the browser understands HTML very well and knows, for example, when to initiate retrieval of a document based on certain user events, such as clicking a link. The second option, CSS-styled TEI, delivers the TEI document directly to the browser. However, while the browser may apply CSS to format and style a TEI document, the browser does not understand the semantics of TEI. For instance, the browser does not understand that TEI’s <ptr> and <ref> elements are linking elements.
TEIBP bridges the gap between these two approaches by making use of the built-in XSLT (1.0) capabilities of browsers to embed the TEI XML, with minimal modifications, within an HTML5 shell document. Features expected of web documents, such as clickable links and display of linked images, are enabled through selective transformation of a very small number of TEI elements and attributes. Both the HTML5 shell and the embedded TEI are styled using CSS.
The power of TEI lies in the richness of its vocabulary. But much of that richness and expressiveness is lost in the translation to HTML. TEIBP largely preserves the integrity of the TEI document. Because the TEI document is delivered directly to the browser, that source TEI document — unchanged by any XSLT transformation — can be easily accessed and saved.
Scholars labor over the intricate encoding of TEI documents, encoding that may represent sophisticated readings and analysis. But with the typical XSLT publishing solution, much or all of the richness of the TEI content is lost. Furthermore, the presentation of the document is targeted at the HTML surrogate rather than the encoded TEI document. This results in a conceptual disconnect between the design of the document and the original TEI encoding. By exposing the TEI itself to the browser, one may format the TEI directly, applying intentional design to a sophisticated document model.
TEIBP respects the integrity of the TEI document, and keeps the TEI document central throughout the publication process. TEIBP takes advantage of the separation of form and content inherent in XML, XSLT, CSS frameworks. However, like Liu (2004), Galey (2010), and others, the authors of TEIBP view that separation with suspicion. TEIBP attempts to weaken that separation of form and content in the typical TEI-to-web design and delivery model by largely removing the HTML layer, exposing the TEI-encoded text directly to the browser, and providing scholars with more immediate access to the readings, models, and analysis embedded in the TEI-encoded document.
Our proposed poster will provide an overview of the TEIBP system and explore in more detail the theoretical motivations behind the project.
Originally presented by John Walsh and Grant Leyton Simpson at DH2013 on July 17, 2013.
- Walsh, J., G. Simpson, and S. Moaddeli (2012). TEI Boilerplate. http://teiboilerplate.org.↩
- Rahtz, S. (2006). Storage, retrieval, and rendering. In Burnard, L., K. O’Brien O’Keeffe, and J. Unsworth (eds.), Electronic textual editing 310–333. New York, NY: Modern Language Association of America.↩
- Galey, A. (2010). The human presence in digital artifacts. In W. McCarty (ed), Text and genre in reconstruction: effects of digitization on ideas, behaviours, products, and institutions 93–117. Oxford: Open Book; Liu, A. (2004). Transcendental data: Towards a cultural history and aesthetics of the new encoded discourse. Critical Inquiry, 31: 49–84.↩