This chapter discusses a number of ways in which encoders may
represent analyses of the structure of a text which are not necessarily
linear or hierarchic. In this chapter, tag sets and global attributes
are provided for the following common requirements:
to link disparate elements in a single document using
the id attribute (section );
to link disparate elements in a single document without using the
id attribute or to link elements in different documents
(section );
to segment text into elements convenient for the
encoder and to mark arbitrary points within documents (section );
to represent correspondence or alignment
among groups of text elements, both those with content and those which
are empty (section );We use the term alignment
as a special case of the more general notion of correspondence. Let A
stand for an element with the attribute id=A, and suppose
elements A1, A2 and A3 occur in that order and form one group, while
elements B1, B2 and B3 occur in that order and form another group. Then
a relation in which A1 corresponds to B1, A2 corresponds to B2 and A3
corresponds to B3 is an alignment. On the other hand, a relation in
which A1 corresponds to B2, B1 to C2, and C1 to A2 is not an
alignment.to synchronize elements of a text, that
is to represent temporal correspondences and alignments among text
elements (section ) and also to align them with
specific points in time (section xref target=SAsymp);
to specify that one text element is identical to or a
copy of another (section );
to aggregate possibly noncontinguous elements
(section );
to specify that different elements are alternatives
to one another and to express preferences among the
alternatives (section );
to associate segments of a text with interpretations or analyses
of their significance (section ).
These facilities all use the same basic set of techniques, which
depend on the ability to point to an element which has some form of
identifier. The most convenient such identifier, and that which is
recommended by these Guidelines wherever possible, is provided by the
global id attribute, as defined in section . An extension to this mechanism is provided, for elements
which are located in different SGML documents, or to which identifiers
cannot be attached (perhaps because they are held on read-only media),
known as the TEI extended pointer mechanism in section
. For many of the topics discussed in this chapter, a
choice of methods of encoding is offered, ranging from simple but less
general ones, which use attribute values only, to more elaborate and
more general ones, which use specialized elements.
The following DTD fragments show the overall organization of the
additional tag set discussed in the remainder of this chapter. The file
teilink2.ent begins by declaring a set of
additional attributes available globally when this tag set is enabled.
This is followed by declarations for the attribute classes pointer and pointerGroup to
which most of the elements discussed in this chapter belong; these
attributes are all further described in the remainder of the chapter.
]]>
The element declarations for this tag set are contained in the file
teilink2.dtd:
]]>
This tag set is made available by the mechanisms described in section
; this implies that the document type subset for a
document using any of the tags or attributes described in this chapter
must define a parameter entity TEI.linking with
the value INCLUDE. For example, a document using
this additional tag set and the prose base would begin with a series of
declarations like the following:
]>
]]>
Pointers
We say that one element points to others if
the first has an attribute whose value is a reference to the others:
such an element is called a pointer element, or simply a
pointer. Among the pointers that have been introduced up
to this point in these Guidelines are note, ref and
ptr. These elements all indicate an association between one
place in the document (the location of the pointer itself) and one or
more others (the elements whose identifiers are specified by the
pointer's target attribute). This element set defines a
variation on this basic kind of pointer, known as a link
which specifies both ends of an association. In
addition, we define a syntax for representing locations in a document by
a variety of means not dependent on the use of SGML identifiers.
Pointers and Links
In section we introduced the simplest pointer
elements, ptr and ref. Here we introduce additionally
the link element, which represents an association between two
(or more) locations by specifying each location explicitly. Its own
location is irrelevant to the intended linkage.
defines a pointer to another location in the current
document
in terms of one or more identifiable elements.
Attributes include:
specifies the destination of the pointer as one or more
SGML identifiersdefines a reference to another location in the current
document,
in terms of one or more identifiable elements,
possibly modified by
additional text or comment.
Attributes include:
specifies the destination of the reference as one or more
SGML identifiersdefines an association or hypertextual link
among elements
or passages, of some type
not more precisely specifiable
by other elements.
Attributes include:
specifies the SGML identifiers of the elements or passages
to be linked or associated.
The ptr element may be called a pure
pointer, because its primary function is simply to point. A
pointer sets up a connection between an
element (which, in the case of a pure pointer, can be thought of simply
as a location in a document), and one or more others, known collectively
as its target.
The ptr and ref elements bear a target
attribute (in the singular), because they point, conceptually, at a
single target, even if that target may be discontinuous in the document.
The link element bears a targets attribute, with a
plural name, because it specifies at least two targets, each of which is
a unitary object. It may be thought of as a representing a double
link between the objects specified.
As members of the class pointer, these
elements share a common set of attributes:
categorizes the pointer in some respect, using any
convenient set of categories.specifies the creator of the pointer.specifies when the pointer was created.specifies the kinds of elements to which this pointer may
point.where more than one identifier is supplied as the value of
the target attribute, this attribute specifies
whether the order in which they are supplied is
significant.
Legal values are:
Yes: the order in which IDREFs are specified as the value
of a target attribute should be followed when
combining the targeted elements.No: the order in which IDREFs are specified as the value of
a target attribute has no significance when
combining the targeted elements.Unspecified: the order in which IDREFs are specified as the
value of a target attribute may or may not be
significant.specifies the intended meaning when the target of a pointer
is itself a pointer.
Sample values include:
if the element pointed to is itself a pointer, then the
target of that pointer will be taken, and so on, until an
element is found which is not a pointer.if the element pointed to is itself a pointer, then its
target (whether a pointer or not) is taken as the target of
this pointer.no further evaluation of targets is carried out beyond that
needed to find the element specified in the pointer's
target.
The targType and targOrder attributes may be
used to constrain the scope of a link to certain element types. For
example:
]]>
This is a complete unconstrained link, of type echo. It assumes only that there is an element with
identifier P1 and another with identifier P2 somewhere in the current document.
]]>
This is a slightly more constrained link of the same type. P1 and P2
must now both identify a p, a seg, or a note,
but there is no requirement as to which is which. (This may be useful
if, as is often the case, different elements may participate in the same
kind of link.)
]]>
In this variation, not only must the link targets be either p
or note elements, but the one with identifier P1 must be a p, and that with identifier
P2 must be a note. Note that the
present Guidelines provide no direct way of saying that P1 may identify either a seg or a p
and P2 must identify a note.
These attributes are most useful if applied to a group of links, when
additional constraints may also be specified, as further discussed in
section below.
Double connection among elements could also be expressed by a
combination of pointer elements, for example, two ptr elements,
or one ptr element and one note element. All that is
required is that the value of the target (or other pointing)
attribute of the one be the value of the id attribute of the
other. What the link element accomplishes is the handling of
double connection by means of a single element. Thus, in the following
encoding:
.....
]]>
P1 points to P2, and P2 points to P1. This is logically equivalent to
the more compact encoding:
]]>
As noted above, all elements pointed to or linked by these elements
must be identifiable using the global id attribute. This
implies that they must be present in the same document, and that they
must bear unique id values. Pointing or linking to external
documents and pointing or linking where SGML identifiers are not
available is implemented by the external pointing mechanisms discussed
in section , where the xptr and xref
elements are discussed. External links and links involving elements
without identifiers do not require a special element; they may be
represented using the standard link element, but an
intermediate xptr element must be provided within the current
document, to bear the id attribute used in the target of the
link.
Using Pointers and Links
As an example of the use of these mechanisms which establish
connections among elements, consider the practice (common in 18th
century English verse and elsewhere) of providing footnotes citing
parallel passages from classical authors.
The figure shows the original page of Pope's
Dunciad which is discussed in the text.
Such footnotes can of course simply be encoded using the note
element (see section ) without a target
attribute, placed adjacent to the passage to which the note refers:The type attribute on the note is used to classify
the notes using the typology established in the Advertisement to the
work: The Imitations of the Ancients are
added, to gratify those who either never read, or may have forgotten
them; together with some of the Parodies, and Allusions to the most
excellent of the Moderns. In the source text, the text of the poem
shares the page with two sets of notes, one headed Remarks and
the other Imitations.
(Diff'rent our parties, but with equal grace
The Goddess smiles on Whig and Tory race,Virg. Æn. 10.Tros Rutulusve fuat; nullo discrimine habebo.—— Rex Jupiter omnibus idem.'Tis the same rope at sev'ral ends they twist,To Dulness, Ridpath is as dear as Mist)
]]>
This use of the note element can be called implicit
pointing (or implicit linking). It relies on the
juxtaposition of the note to the text being commented on for the
connection to be understood. If it is felt that the mere juxtaposition
of the note to the text does not make it sufficiently clear exactly what
text segment is being commented on (for example, is it the immediately
preceding line, or the immediately preceding two lines, or what?), or if
it is decided to place the note at some distance from the text, then the
pointing or the linking must be made explicit. We now consider various
methods for doing that.
First, a ptr element might be placed at an appropriate point
within the text to link it with the annotation:
(Diff'rent our parties, but with equal grace
The Goddess smiles on Whig and Tory race,
'Tis the same rope at sev'ral ends they twist,To Dulness, Ridpath is as dear as Mist)Virg. Æn. 10.Tros Rutulusve fuat; nullo discrimine habebo.—— Rex Jupiter omnibus idem.
]]>
The note element has been given an arbitrary identifier (N3.284) to enable it to be specified as the target of
the pointer element. Because there is nothing in the text to signal the
existence of the annotation, the rend attribute has been
given the value unmarked.
Second, the target attribute of the note element
can be used to point at its associated text, provided that an
id attribute has been supplied for the associated text.
Since, in this case, the note itself contains a pointer to the place in
the text which it is annotating, this has also been encoded, using a
ref element, which bears a target attribute of its
own and contains a (slightly misquoted) extract from the text marked as
a quote element:
Verse 283-84.
——. With equal grace
Our Goddess smiles on Whig and Tory race.Virg. Æn. 10.Tros Rutulusve fuat; nullo discrimine habebo.—— Rex Jupiter omnibus idem.
]]>
Combining these two solutions gives us the following associations:
a pointer within one line indicates the note
the note indicates the line
a pointer within the note indicates the line
Note that we do not have any way of pointing from the line itself to the
note: the association is implied by containment of the pointer. We do
not as yet have a true double link between text and note.
Thirdly, therefore, we supply identifiers for both verse line and
annotation, and use a link element to associate the two. Note
that the ptr element and the target attribute on the
note may now be dispensed with:
(Diff'rent our parties, but with equal grace
The Goddess smiles on Whig and Tory race,'Tis the same rope at sev'ral ends they twist,To Dulness, Ridpath is as dear as Mist)
Verse 283-84.
——. With equal graceOur Goddess smiles on Whig and Tory race.]Virg. Æn. 10.Tros Rutulusve fuat; nullo discrimine habebo.—— Rex Jupiter omnibus idem.
]]>
The targets attribute of the link element here
bears the identifiers of the note followed by that of the verse line.
The targType and targOrder attributes may be used
to enable application programs to check that the identifiers in fact
pick out a note element and an l element and in that
order. If targOrder has the value N,
then the elements indicated by the targets attribute have to
be either note or l elements, but are otherwise
unconstrained. If neither attribute is present, then the only
constraint is that the identifiers given must apply to some element
within the current document.
For completeness, we could also allocate an identifier to the
reference within the note and encode the association between it and the
verse line in the same way:
]]>
Indeed, the two links could be combined into one, as follows:
]]>
Groups of Links
Clearly, there are many reasons for which an encoder might wish to
represent a link or association between different elements. For some of
them, specific elements are provided in these Guidelines; some of these
are discussed elsewhere in the present chapter. The link
element is a general purpose element which may be used for any kind of
association. The element linkGrp may be used to group links of
a particular type together in a single part of the document; such a
collection may be used to represent what is sometimes referred to in the
literature of Hypertext as a web, a term introduced by the
Brown University FRESS project in 1969.
defines a collection of associations or hypertextual links.
As a member of the class pointerGroup, this
element shares the following attributes with other members of that
class:
optionally specifies the identifiers of the elements within
which all elements indicated by the contents of this
element lie.
describes the function of each of the values of the
targets attribute of the enclosed link,
join or alt tags.
It is also a member of the pointer class, and
therefore also carries the attributes specified in section
above, in particular the type attribute:
categorizes the pointer in some respect, using any
convenient set of categories.
The linkGrp element provides a convenient way of
establishing a default for the type attribute on a group of
links of the same type: by default, the type attribute on a
link element has the same value as that given for
type on the enclosing linkGrp.
Typical software might hide a web entirely from the user, but use it
as a source of information about links, which are displayed
independently at their referenced locations. Alternatively, software
might provide a direct view of the link collection, along with added
functions for manipulating the collection, as by filtering, sorting, and
so on.
To continue our previous example, this text contains many other notes,
of a kind similar to the one shown above. To avoid having to repeat the
type=imitation on each note, we may specify it once
for all on a linkGrp element containing all links of this type.
The targType and targOrder attributes can also be
specified for a linkGrp element:
A place there is, betwixt earth, air and seas
Where from Ambrosia, Jove retires for ease. ...
Sign'd with that Ichor which from Gods distills. ...
(Diff'rent our parties, but with equal graceThe Goddess smiles on Whig and Tory race,'Tis the same rope at sev'ral ends they twist,To Dulness, Ridpath is as dear as Mist)Ovid Met. 12.Orbe locus media est, inter terrasq; fretumq;
Cœlestesq; plagas —
Alludes to Homer, Iliad 5Virg. Æn. 10.Tros Rutulusve fuat; nullo discrimine habebo.—— Rex Jupiter omnibus idem.
]]>
Additional information for applications that use linkGrp
elements can be provided by means of special attributes. First, the
domains attribute can be used to identify the text elements
within which the individual targets of the links are to be found.
Suppose that the text under discussion is organized into a body
element, containing the text of the poem, and a back element
containing the notes. Then the domains attribute can have as
its value the identifiers of the body and the back, to
enable an application to verify that the link targets are in fact
contained by appropriate elements, or to limit its search space:
A place there is, betwixt earth, air and seasWhere from Ambrosia, Jove retires for ease. ...
Sign'd with that Ichor which from Gods distills. ...
(Diff'rent our parties, but with equal graceThe Goddess smiles on Whig and Tory race,'Tis the same rope at sev'ral ends they twist,To Dulness, Ridpath is as dear as Mist)