2 XLink Concepts

This section describes the terms and concepts that are essential to understanding XLink, without discussing the syntax used to create XLink constructs. A few additional terms are introduced in later parts of this specification.

2.1 Links and Resources

[Definition: An XLink link is an explicit relationship between resources or portions of resources.] [Definition: It is made explicit by an XLink linking element, which is an XLink-conforming XML element that asserts the existence of a link.] There are six XLink elements; only two of them are considered linking elements. The others provide various pieces of information that describe the characteristics of a link. (The term "link" as used in this specification refers only to an XLink link, though nothing prevents non-XLink constructs from serving as links.)

The notion of resources is universal to the World Wide Web. [Definition: As discussed in [RFC 3986], a resource is any addressable unit of information or service.] Examples include files, images, documents, programs, and query results. The means used for addressing a resource is a IRI (Internationalized Resource Identifier) reference (described more in 5.4 Locator Attribute (href)). It is possible to address a portion of a resource. For example, if the whole resource is an XML document, a useful portion of that resource might be a particular element inside the document. Following a link to it might result, for example, in highlighting that element or scrolling to that point in the document.

[Definition: When a link associates a set of resources, those resources are said to participate in the link.] Even though XLink links must appear in XML documents, they are able to associate all kinds of resources, not just XML-encoded ones.

One of the common uses of XLink is to create hyperlinks. [Definition: A hyperlink is a link that is intended primarily for presentation to a human user.] Nothing in XLink's design, however, prevents it from being used with links that are intended solely for consumption by computers.

2.2 Arcs, Traversal, and Behavior

[Definition: Using or following a link for any purpose is called traversal.] Even though some kinds of link can associate arbitrary numbers of resources, traversal always involves a pair of resources (or portions of them); [Definition: the source from which traversal is begun is the starting resource] and [Definition: the destination is the ending resource]. Note that the term "resource" used in this fashion may at times apply to a resource portion, not a whole resource.

[Definition: Information about how to traverse a pair of resources, including the direction of traversal and possibly application behavior information as well, is called an arc]. If two arcs in a link specify the same pair of resources, but they switch places as starting and ending resources, then the link is multidirectional, which is not the same as merely "going back" after traversing a link.

2.3 Resources in Relation to the Physical Location of a Linking Element

[Definition: A local resource is an XML element that participates in a link by virtue of having as its parent, or being itself, a linking element]. [Definition: Any resource or resource portion that participates in a link by virtue of being addressed with an IRI reference is considered a remote resource, even if it is in the same XML document as the link, or even inside the same linking element.] Put another way, a local resource is specified "by value," and a remote resource is specified "by reference."

[Definition: An arc that has a local starting resource and a remote ending resource goes outbound, that is, away from the linking element.] (Examples of links with such an arc are the HTML A element, HyTime "clinks," and Text Encoding Initiative XREF elements.) [Definition: If an arc's ending resource is local but its starting resource is remote, then the arc goes inbound.] [Definition: If neither the starting resource nor the ending resource is local, then the arc is a third-party arc.] Though it is not required, any one link typically specifies only one kind of arc throughout, and thus might be referred to as an inbound, outbound, or third-party link.

To create a link that emanates from a resource to which you do not have (or choose not to exercise) write access, or from a resource that offers no way to embed linking constructs, it is necessary to use an inbound or third-party arc. When such arcs are used, the requirements for discovery of the link are greater than for outbound arcs. [Definition: Documents containing collections of inbound and third-party links are called link databases, or linkbases.]