What Are XLink and Xpointer?

Background

The What Is ...? article in the last edition of Ariadne gave an introduction to XML, the Extensible Markup Language [1]. XML has been developed to overcome HTML's lack of extensibility - with XML you will be able to define your own element tags. We have already seen a variety of communities defining element tags for use within their community, such as MathML [2] and MusicML [3].

Besides lacking extensibility, HTML is also limited in its hyperlinking functionality. XLink and XPointer are currently being developed in order to address these limitations.

XLink

In HTML hyperlinking is normally achieved using the <A> (anchor) element. This provides a simple uni-directional link: normally clicking on a hypertext link will cause the current document to be replaced by a new document.

XLink [4] provides much richer hyperlinking functionality which the hypertext community have argued is needed in order to provide a richer web infrastructure.

Three <show> attributes can be defined. In addition the <actuate> attribute can be used to define when the link traversal should occur. <actuate> can have two values:

actuate="auto"

link traversal occurs when the resource is loaded) and

actuate="user"

link traversal occurs on user action, such as clicking a link.

The <show> and <actuate> attributes can be used in combination. For example using show="embed" actuate="auto" in combination with a link to an image will result in the image being embedded in the document when the document is loaded. This is equivalent to the HTML <IMG> element.

XPointer

XLink provides a much richer hyperlink mechanism than is currently provided in HTML. HTML is also deficient in allowing the destination of the link to be processed. All that can be done using the <A> element besides pointing to the top of the document is pointing to a pre-defined internal anchor. This link, for example points to references in this article. In enabling this link to be defined, an internal anchor name had to be explicitly defined. It is not possible, for example, to point to the references for the What Is.. column in the last edition, as no internal anchor was defined. In addition it is not possible to process portions of a document.

XPointer [5] addresses these deficiencies. With XPointer it is possible to link to arbitrary locations in an XML document, even if the author has not provided internal anchor. In addition it is possible to point to portions of an XML document. For example you could point to a relevant paragraph in an XML document. A conforming XML browser could highlight the linked portion of the document.

XPointer makes use the tree structure in XML documents. For example if you wish to link to the second item in a list which has the unique ID of "interesting-facts" you could use the following XML link:

Using the XPointer language portions of the tree can be identified, such as the third paragraph of the first section in the first chapter.

Status Of XLink and XPointer

What is the status of the XLink and XPointer proposals? These two proposals are currently available as working drafts. The proposals are being developed by working groups within W3C. However the proposals are still at an early stage. Although the XLink draft is relatively stable we may see substantial changes before the proposals, in particular the XPointer proposal, are submitted as W3C Proposed Recommendations.

As well as the technical work which the working groups are addressing there are a number of legal issues which may have to be addressed. We have already seen a number of legal cases associated with hyperlinking on the web [6]. With a richer hyperlinking infrastructure we may well see even more disputes. If I provide a pointer to MacDonald's website and I use XPointers to point only to the content and my XML browser only displays this content, and I am breach of copyright?

Further Information

Further information on XLink and XPointer is available at the following locations: