A History of Encoding from XML Markup to the TEI and EpiDoc Guidelines

By Dr Patricia O’Connor, Irish Postdoctoral Researcher

In previous blog posts, Adrian Doyle discussed the introduction of ogham characters to Unicode, the history and challenges of digital ogham, as well as the future of digital ogham and its potential to facilitate modern usage. One of the principal objectives of Doyle’s blog posts was to introduce important concepts and considerations which are crucial for understanding the representation of ogham in a digital format. Most importantly for this contribution, Doyle provided a clear and comprehensive explanation of the difference between graphical systems which require human interpretation, such as handwritten and printed texts, and machine-readable data which is information that computers can process (for more on this point, see here). Additionally, Doyle introduced and explicated the challenges of representing historical ogham in digital format, while the final blog post made a compelling case for incorporating historically attested ogham characters into the ogham Unicode standard (the full discussion is available here). Doyle’s detailed history of ogham and Unicode form an excellent foundation for this contribution which focuses particularly on transcribing historical texts in digital format. Developing upon Doyle’s informative introduction to how computers process information in binary format (see here), this contribution commences with an overview of markup, descriptive markup in particular, and its crucial role in making what is human-readable, machine-readable. 

An image of text, indicating what different markup symbols are used in proofreading and editing text.
Figure 1: Proofing markup for editing manuscripts. Image source: Change Conversations

Historically, the term markup refers to the process of marking or annotating a text to indicate how a particular passage is to be formatted or printed. A well-known example of markup is the pilcrow symbol (¶) which is used to identify a paragraph. The term markup has since expanded to also encompass the marking or annotation of an electronic text with the purpose of specifying how the document is to be presented or processed. While there are different kinds of markup, such as presentational markup or procedural markup, it is descriptive or semantic markup which is the sole focus of this post since it is the most important kind of markup when it comes to encoding texts. Essentially, a markup language renders textual and non-textual information “in a form that machines can naturally understand” (Berners-Lee 1999, 191). In other words, the function of a markup language is to provide a way of making explicit to a computer what is understood implicitly by a human. In respect to descriptive or semantic markup languages, the marking-up process involves adding specific labels or tags to the text to identify or categorise not only the form but also the content of the text. What was once a human-readable line of text but an incomprehensible string of characters to a computer, can now be marked-up or labelled distinctly so that the meaning of this string of characters is explicitly defined and therefore able to be processed by a computer. In short, descriptive or semantic markup provides a way of making knowledge or an interpretation of a text clear and precise for both humans and machines to comprehend. 

An image of text marked up with XML, which reads: <measure unit="pounds" value="-1000"> One thousand pounds in debt </measure>
Figure 2: A human-readable phrase, “One thousand pounds in debt”, encoded in XML to be machine-readable.

The most widely used markup language for encoding documents in a human-readable and machine-readable format is Extensible Markup Language (XML). XML was designed to be self-descriptive with a key focus on the meaning of data rather than its presentation or how the data should be processed. For instance, in Figure 2, the meaning of the phrase “One thousand pounds in debt” is made explicit to a machine once the information is marked-up with the self-descriptive tags of XML. XML tags are demarcated by angled brackets and a matching pair of tags constitute an element. To clarify, the measure element, which frames the information in the above example, is comprised of both an opening <measure> tag and a corresponding closing </measure> tag. As illustrated in Figure 2, the information is marked-up or encoded once the phrase is enclosed by an opening and closing tag.  The information is now rendered in a format that is comprehensible for a computer, the self-descriptive opening and closing measure tags clarify that the enclosed phrase is a reference to a measure or a quantity of some kind. This example also demonstrates how additional relevant information can be rendered machine-readable using attributes and values. The purpose of an attribute is to “contain data related to a specific element” (W3Schools). Within the opening tag of the measure element, there are two attributes present which offer further pertinent information which is necessary for an accurate understanding of the marked-up phrase.  In this instance, the first attribute, the unit attribute, provides a means of expressing that the unit of measure referred to in the marked-up phrase is “pounds”. Similarly, the second attribute, the value attribute, specifies that the sum of money mentioned in the marked-up phrase is “–1000”. The text “One thousand pounds in debt” is now meaningful for a machine as well as a human, thereby “better enabling computers and people to work in cooperation” (Berners-Lee, Hendler and Lassila 2001, 37). 

An image of text which shows in general how XML is used to markup text. It reads: opening tag <element> Text content </element> closing tag
<element attribute="value">
Text content <childElement> Text content or etc </childElement> </element>
Figure 3: What XML looks like 

The introduction of XML marked a formative moment by providing the foundation for “the evolution of objects from being principally human-readable documents to contain more machine-oriented semantic information” (Berners-Lee et al. 1994, 82). Designed to be application-, platform-, and device- independent, XML has since become the standard format for representing and sharing information on the internet. The chief advantage of XML is that it is extensible, meaning that it allows the addition of new tags, thereby enabling new capabilities and greater functionality. Contrary to other well-known markup languages, like HyperText Markup Language (HTML), XML does not rely on predefined tags, meaning the author of an XML document can invent their own tags. In respect to marking-up or encoding texts, this freedom to customise tags for specific projects certainly has its benefits, however, it nevertheless presents a potential problem when it comes to sharing this information with other projects. Prior to the introduction of XML, at the Association for Computers and the Humanities (ACH) conference, funded by the U.S. National Endowment for the Humanities (NEH) and held at Vassar College in 1987, representatives of text archives, scholarly societies, and research projects discussed “the feasibility of a standard encoding scheme and to make recommendations for its scope, structure, content, and drafting” (TEI-C). The Text Encoding Initiative (TEI) project was launched in 1988 and the first proposal (P1) for a standard encoding scheme titled Guidelines for the Encoding and Interchange of Machine-Readable Texts was released for review in 1990. However, a few years after the publication of the second proposal (P2) in 1994, “the World Wide Web Consortium issued a final Recommendation for Extensible Markup Language, (XML)” in 1998; consequently, the Guidelines “needed to be re-expressed in this new formalism” (TEI-C). The proposal has undergone several revisions since its inception and is currently on its fifth version (P5) which included “development in a number of important areas not previously addressed including character encoding, graphics, manuscript description, biographical and geographical data” (TEI-C). 

Figure 4: The Current Text Encoding Initiative Logo. Image source: The TEI Consortium website. 

The TEI Guidelines have become “the de facto standard of markup” and the TEI Consortium oversees the development and maintenance of this standard for the representation of texts in digital form (Pierazzo and Stokes 397). Although the TEI Guidelines did not address epigraphic materials, the standard provided an important foundation that could be adapted by and for an international and collaborative community of epigraphers. Since the late 1990s, epigraphers had been “seeking a digital encoding method that preserved the time-tested combination of flexibility and rigor in editorial expression to which classical epigraphers were accustomed in print, while bringing to both the creator and the reader of epigraphic editions the power and reusability of XML” (EpiDoc). The outcome of this collaborative endeavour was the EpiDoc Guidelines which were “developed for the publication of digital editions of ancient inscriptions” and are based on a subset of the TEI standard “which focuses on the history and materiality of the texts” (EpiDoc). Respectively, the TEI and EpiDoc Guidelines represent best practice for encoding texts or inscriptions, both standards “specify a set of markers (or tags) which may be inserted in the electronic representation of the text, in order to mark the text structure and other features of interest” (TEI-C). The introduction and adoption of the TEI and EpiDoc Guidelines has had a profound impact on collaboration, predominantly through “facilitating the loss-less interchange of data amongst individuals and research groups” (TEI-C).

Figure 5: EpiDoc Website Banner. Image Source: EpiDoc website. 

The EpiDoc Guidelines are an invaluable resource for researchers as they offer a shared structured approach for encoding the transcription, history, materiality, and metadata of ancient inscriptions. In fact, a template of an EpiDoc file is freely available for researchers to consult and download from the website for their own projects (see here). The template, an abridged example of which is shown below, provides a concise and helpful overview of the specific sections of an EpiDoc file and the elements encountered therein. The <teiHeader> element of the EpiDoc template contains important information about the EpiDoc file as well as the ancient object itself. As illustrated in Figure 6, the file description section, <fileDesc>, commences with a demonstration of how to encode the title of the document with the <title> element. The purpose of the publication statement element, <publicationStmt>, which follows immediately after is to enable researchers to encode additional project specific information such as the title of the research project using the <authority> element, as well as the project identification number of the file using the <idno> element with the type attribute to specify that the number refers to the filename. The value of self-descriptive markup tags is especially apparent within the source description section, <sourceDesc>, where the purpose of the nested elements is self-evident. For instance, if an object is held within a museum collection, the museum is encoded using the <repository> element. Correspondingly, the <supportDesc> element is for encoding descriptions of the object, monument or writing support, while descriptions of the layout of the inscription are encoded using the <layoutDesc> element, and descriptions of the letters or execution style with the <handDesc> element. The <history> subsection encloses both the <origin> and <provenance> elements which enable researchers to encode crucial historical data such as the place of origin using the <origPlace> element and the date of origin with the <origDate> element. The <provenance> elements allow researchers to encode information relating to the find spot of the object or monument as well as more recent information from when the source was last observed. Note how the type attribute is cleverly employed within the opening tags to distinguish between the two provenance elements.  

An image of text showing the template of the EpiDoc XML structure.
Figure 6: A template of a structured EpiDoc file. Image source: EpiDoc website. 

Finally, there is a deliberate distinction between sections within the EpiDoc template. Information relating to the source and the file is encoded in one section, the <teiHeader>, and the transcription and translation of the inscription comprise another section, the <text> section. The purpose of the <teiHeader> is to contain only the metadata, the information about the source and the file, and to differentiate this kind of information from the data, the text of the inscription. The <text> section is reserved for transcribing the inscriptions and the section is subdivided into five self-explanatory divisions covering the edition, the apparatus, the translation, the commentary, and the bibliographical references associated with the inscriptions. Additionally, if there are any images of the inscription or writing support, the intervening <facsimile> section contains a graphic element for encoding any photographic evidence. Once properly populated with the requisite information and details, the above template would be a valid EpiDoc file as the data deemed essential and most useful for the EpiDoc community is correctly encoded in XML format, rendering both the information about the object or monument as well as the inscription meaningful for a machine.  

As internationally recognised standards, the TEI and EpiDoc Guidelines have facilitated research collaboration on an unprecedented scale. The capacity of XML to represent individual research projects is not curtailed but harnessed by both standards to ensure methodological and knowledge exchange. Before encoding standards, although project information was encoded in the correct format for data exchange, XML, the same information could be encoded differently by each project thereby impeding interoperability: the ability to cooperate with other projects through the exchange of information. The TEI and EpiDoc Guidelines address this issue directly, encouraging a consistent encoding approach that is shared by research communities across the world. Both communities are transparent and thorough in the documentation of their respective encoding standards and supply several relevant encoding examples to guide researchers throughout the entire encoding process of creating TEI and EpiDoc compliant files. The self-descriptive quality of XML combined with the shared encoding standards of the TEI and EpiDoc Guidelines have revolutionised the representation of ancient texts by empowering researchers to render the facts and features of these historically and culturally significant artifacts, and their intrinsic importance, explicit and meaningful for machines in an increasingly digital age.   

A final yet fundamental point on which to end, fortunately for the OG(H)AM project, both TEI and EpiDoc support Unicode and enables the representation of the most important feature of ogham inscriptions: the ogham script. Of course, as Doyle has already demonstrated, representing historical ogham characters digitally entails certain challenges. Addressing and overcoming the inherent issues of encoding the ogham script is deserving of its own blog post, however, so we’ll return with a future blog post which explores the specifics of the OG(H)AM project’s encoding approach in more detail. 

Works Cited: 

Berners-Lee, Tim (1999) Weaving the Web: The Past, The Present and Future of the World Wide Web by its Inventor. San Francisco: HarperSanFrancisco. 

Berners-Lee, Tim, Hendler, James and Ora Lassila (2001) “The Semantic Web: A New Form of Web Content that is Meaningful to Computers will Unleash a Revolution of New Possibilities”. Scientific American, 284(5), 34-43. 

Berners-Lee, Tim et al. (1994) “The World-Wide Web”. Communications of the ACM, 37(8), 76-82. 

Cayless et al. (2009) “Epigraphy in 2017,” Digital Humanities Quarterly, 3(1), URL: http://www.digitalhumanities.org/dhq/vol/3/1/000030/000030.html.  

EpiDoc. “About EpiDoc”. Source Forge. URL: https://sourceforge.net/p/epidoc/wiki/About/  

EpiDoc. “Structure of an EpiDoc Edition” EpiDoc. URL: https://epidoc.stoa.org/gl/latest/supp-structure.html.  

EpiDoc. “How to Use the EpiDoc Guidelines” EpiDoc. URL: https://epidoc.stoa.org/gl/latest/intro-intro.html.  

Pierazzo, Elena and Peter Stokes (2010) “Putting the Text Back into Context: A Codicological Approach to Manuscript Transcription”. Codicology and Palaeography in the Digital Age 2, edited by Franz Fischer, Christiane Fritze, and Georg Vogeler. Norderstedt: Books on Demand GmbH, 397-430. 

Text Encoding Initiative Consortium (TEI-C) “About These Guidelines”. URL: https://tei-c.org/release/doc/tei-p5-doc/en/html/AB.html.  

Text Encoding Initiative Consortium (TEI-C) “Historical Background”. URL: https://tei-c.org/release/doc/tei-p5-doc/en/html/AB.html#ABTEI.  

W3Schools “XML” URL: https://www.w3schools.com/xml/default.asp.  

Leave a comment

Your email address will not be published. Required fields are marked *