- Tech know how online

XML linking language (XLink)

XLink (XML Linking Language) is a recommendation adopted by the Word Wide Web Consortium (W3C) in 2001 that governs linking between documents. In detail, the recommendation defines the possibilities of linking elements in XML documents with any other addressable information that can be accessed via a Uniform Resource Identifier (URI). URI is a string of characters used to uniquely identify resources. XPointers can also be used in the aforementioned linking.

One of the objectives of the XML Linking Language is the definition of a uniform syntax that is not bound to any specific XML implementation, as well as the flexible definition of links. Therefore, XLink also differentiates between different types of links. For example, XLink extends the possibilities of URL-based hyperlinks and the anchor element used in HTML to create links to specific positions in a document.

The W3C prefers XLink to other methods such as HLink and defines XLink as the future standard for hyperlinks on the World Wide Web. The XLink standard is implemented within special tools as well as in the web browsers of Netscape version 6.x and in the open source project Mozilla.

For a clear treatment of the subject, the following terms are introduced:

Link Is the explicit relationship between resources or parts of resources.

Resource. Is information to be referenced arbitrarily, which can be reached via a Uniform Resource Identifier (URI).

The background for XLink as a generally binding vocabulary for representing links is its following goals:

  • Links should always be bidirectional.
  • Links should be able to reach multiple destinations.
  • It should be possible to add meta-data to links.
  • Links should also be possible to documents that may or may not be edited.
Another principle of XLink is not to define any elements of its own, as is the case with the Extensible Stylesheet Language (XSL), the XSL Transformation (XSLT) or XML Schema. Rather, XLink builds entirely on the familiar XML elements and extends them with attributes to form the specific properties of XLink elements. The attributes available for use in XML languages, as well as their permitted value assignments, are defined by the XLink specification in a separate namespace. The use of attribute definitions allows the user to take advantage of certain degrees of freedom in the otherwise strictly regulated XML standard. Also, in HTML, links can only be defined in the context of the href attribute in the a anchor element. In contrast, XLink attributes can be used in any element.

XLink differentiates between different types of links using the following terms:

Traversal means to follow a link starting from a starting resource to a target resource. These transitions can be influenced by the attributes of XLink.

Arc, also called an arc, is the path to follow when following a link. Arcs always have a direction from a start resource to a target resource, so for a bidirectional link, two arcs with reversed start and target resources must be agreed upon.

Depending on their value assignment, the XLink attributes define other types of links relative to a reference document. If the attribute - in XLINK href - refers to a resource within the reference document, it is called a local link. On the other hand, an outbound link refers to a resource in an external document. If the reference document is referenced externally, this is called an inbound link. A special case is when an Arc points from a remote resource to another remote resource, which is also called External Link or Third-Party Link. In this case, the entire XLink is maintained in an external resource and is also called a link base. A link base is often implemented by files or databases, which must be XML documents.

The following is a brief excerpt of attribute values and attributes:

  • simple for a simple link,
  • extended for an extended link,
  • locator for the reference of remote resources, etc.
  • href provides the data to reference a remote resource,
  • title is used to label a link visible to the user, etc.
Example: A simple link named after its attribute value, whose behavior is similar to the XHTML hyperlink.

Example of an XLink named after an attribute value

Example of an XLink named after an attribute value

First, the XLink attributes must be defined by the namespace given in the specification by the prefix xlink. The target of this link is specified by the href attribute within the XLink namespace.

Informationen zum Artikel
Englisch: XML linking language - XLink
Updated at: 09.02.2010
#Words: 1235
Translations: DE