Encoding Guide for Early Printed Books

linking and pointing

Pointers and Linking

The concept of the hypertext link is one of the earliest and arguably the most powerful and distinctive features of the electronic environment. At a simple level, a link is simply a connection between two pieces of information—by now a commonplace of digital text and a mainstay of the web. However, the basic mechanism that permits linking is more fundamental and has many more functions than simply supporting navigation. Understanding how links and pointers work, and what they can accomplish, is very important for an overall understanding of text encoding as a way of modelling textual information.

In XML, the essential structure of the link is the establishment of a correspondence between two places in the textual universe. (More complex links in XML are simply aggregations of two-ended links.) The endpoints of the link may be entire files, or they may be individual XML elements (explicit pieces of markup) or they may be pieces of text that are identified by their position within a document (for instance, the 144th word in the second paragraph of the first chapter). The most common linking mechanism in XML involves assigning a unique identifier (almost like a Social Security number) to an XML element, and then using that identifier to point to the element from somewhere else, thereby creating a link. Many different pointers may point to a single identifier: the identifier serves as a kind of receiver or target for any pointer that wishes to create a link to that particular place in the text. But other less explicit mechanisms exist as well: for instance, the new technology called XPath provides a way of identifying an element or a piece of text contained within an element by describing the path to that place or text. The path is the route taken by walking down the tree of the XML hierarchy: for instance, go to the first chapter, and then go to that chapter’s second poem, and then go to that poem’s fourth stanza, and then go to that stanza’s sixth line, and then go to the second name in that line, and choose the first word in that name. This method does not require the encoding of explicit identifiers in the text, but it is vulnerable to changes in the document; if another poem is inserted at the beginning of the chapter, the XPath expression will lead to a different place entirely.

As indicated above, linking and pointers in XML have many purposes that go beyond simply creating clickable navigation links in the text. Some of the most significant, particularly for the TEI, are as follows:

  1. Establishing a connection between parallel structures in the text: this is discussed in more detail in Parallel Structures.
  2. Connecting two parts of an element: in some cases, a single textual feature may be broken into two parts by some intervening structure. for instance, a quotation may be interrupted by the phrase she said, or a single line of a dramatic text may be spoken by two different characters. The linking mechanism can be used to indicate that the two parts are actually a single element, which can help improve the behavior of tools for collocation (find these two words within the same line or count all the quotations by character X) and similar processes. The link in effect permits a more accurate representation of how the text is actually structured.
  3. Connecting an element with supporting information contained elsewhere in the text: for instance, a subject keyword, or demographic information about a person named in the text. This information might be stored in the header of the document, or in a separate file, such as a comprehensive list of persons named in the document together with their ages, genders, occupations, and countries of origin. Then in any place where a person is named in the text, a pointer can link this name with the information provided.