The SLink language provides a data model and syntax for XML linking, suitable for use in XHTML 2.0 and related languages.
This document is a private skunkworks and has no official standing of any kind, not having been reviewed by any organization in any way.
This draft was assembled by Micah Dubinko with inspriation from the [XLink] Editors (Steve DeRose; Eve Maler; David Orchard), the [HLink] Editors (Steven Pemberton; Masayasu Ishikawa), the editor of [XArc] (Gabe Beged-Dov), and the other panel members at the XML 2002 Hypertext Town Hall (Norm Walsh; Ron Daniel; Liam Quin; Eve Maler; Simon St. Laurent). There should be no suggestion that anybody other than Micah Dubinko approves of the content or even the existence of the present document.
The process at the W3C that led to this document started with XLL, one of the major directions for the work to be built upon the then-new XML standard. Other W3C specifications, which involved a very large number of contributors from within and without the W3C, include the [XLink] Recommendation and the [HLink] Working Draft. Lists of contributors may be found in these specifications.
This document takes a fundamental approach of expressing only the author's intent for a link, leaving other kinds of link metadata and details of link processing as application-specific. As a result, many features from XLink and HLink are not included. The criteria for determining which features to include in this document is the features must be widely appropriate to many different kinds of XML languages.
This document may be distributed freely, as long as all text and legal notices remain intact.
The following goals are specifically not addressed in SLink 1.0. For these features, either application-specific markup, XLink 1.0, or a successor to SLink is the appropriate technology.
Links can be described in terms of a simple data model. The fundamental unit of the data model is the arc. [Definition: An arc consists of the following: a reference to a starting resource (optionally with a reference to a sub-resource), an ending resource (optionally with a reference to a sub-resource), an arc-type, and a prominence.] In some cases, such as URI fragment identifiers, a sub-resource might actually be a view or interpretation of the resource. When this is not possible, or when no specific sub-resource is specified, the sub-resource is the same as the resource.
[Definition: The possible arc-types defined in this document are:
href, src, and none.] The arc-type describes
the intent of the author in providing the link. An arc-type of href
indicates the intention that, when the link is traversed at the user's
option, the presentation context will be changed to the ending (sub-)resource.
An arc-type of src indicates the intention that, without requiring
any special action of the user, the ending (sub-)resource will be presented
in place of the starting (sub-)resource. An arc-type of none
indicates that the author did not intend to create an arc. Implementations
are free to process SLink links in any suitable manner. For example, a
bandwidth-limited device might prompt the user before traversing any link,
even if the arc-type is src, or a desktop browser with certain
configuration settings might open a new window, even when the arc-type
[Definition: The prominence is a zero-based non-positive integer
that describes the author's intent of how readily a link is to be presented
to the user for activation.] A larger prominence indicates that an arc
is to be presented to the user for activation before related arcs of a smaller
prominence. Prominence is important for multi-ended links, where typically
a single "default" arc might have a prominence of 0, and additional arcs
will have smaller prominences. For example, in a suitably constructed link,
a browser might traverse an arc with prominence 0 by a single click; with
promenence -1 by a context menu; with prominence -2 with a 2nd-level context
menu, and so on. When a link contains multiple arcs with the same prominence,
the arcs in question are intended as alternatives for selection by the end
user. As with the arc-type, implementations are free to interpret the prominence
in any suitable manner.
The notion of resources is universal to the World Wide Web. [Definition:
As discussed in [RFC 2396], a resource
is any addressable unit of information or service.] Examples include
files, images, documents, programs, and query results. 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.] SLink links, as defined
abstractly here, may appear in non-XML documents (such as PDF or Flash),
and are able to associate all kinds of resources, not just XML-encoded
One of the common uses of SLink is to create hyperlinks. [Definition:
A hyperlink is a link that is intended primarily for presentation to
a human user.] Nothing in SLink's design, however, prevents it from being
used with links that are intended solely for consumption by generic
[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: An SLink link is a collection of one or more arcs,
intended to express an explicit relationship between resources or portions
of resources.] For [XML],
a SLink link is realized by one of the syntax options defined later in
This section discribes markup that can appear inline in an [XML] document to define a SLink link.
The xml:href attribute expresses a SLink link as follows: the starting resource is the resource containing the attribute, with the sub-resource being the specific element containing the attribute. The content of this attribute is a URI reference, as defined by the datatype xsd:anyURI [XML Schema part 2]. Relative URIs are processed according to [XML Base]. The ending resource and sub-resource are defined by the URI and fragment identifier (if any) in the attribute value. The arc-type is href. The prominence is equal to -1 times the number of ancestor elements that represent arcs of arc-type href.
NOTE: In XML documents conforming to [XML Names], the prefix
xmlis by definition bound to the namespace name
http://www.w3.org/XML/1998/namespace, and does not require any additional declaration markup on the part of the author.
Examples: The following example shows how a custom-defined language can contain a hyperlink detectable by generic link processors.
<item partNo="A6342X" xml:href="http://example.info/inventory/description?pn=A6342X"/>
This example shows how the
a element might be defined in
a future version of XHTML.
<a xml:href="bookmarks.html#linking">This is a hyperlink</a>
This example shows how the
nl element could be defined as
a multi-ended link in a future version of XHTML.
This example shows how a commonly occurring idiom in news and press releases could be defined as a multi-ended link in a future version of XHTML.
<p>Today, <a xml:href="http://www.microsoft.com">Microsoft
This example shows alternative links presented to the user, based on a language preference.
The xml:src attribute expresses a SLink link as follows: the starting resource is the resource containing the attribute, with the sub-resource being the specific element containing the attribute. The content of this attribute is a URI reference, as defined by the datatype xsd:anyURI [XML Schema part 2]. Relative URIs are processed according to [XML Base]. The ending resource and sub-resource are defined by the URI and fragment identifier (if any) in the attribute value. The arc-type is src. The prominence is equal to -1 times the number of ancestor elements that represent arcs of arc-type href.
Examples: The following example shows how an XML language
could bear both
xml:src links at the
<svg:label xml:href="description.xml" xml:src="graphic.png"/>
The following example shows how the
object element might be
defined in a future version of XHTML.
<!-- First, try the applet -->
The following example shows how the
html element might be
modified in a future version of XHTML to allow an automatic client-side 'redirect'
to a new document.
This document does not define a syntax for out-of-line markup, along the lines of [HLink]. It would, however, be straightforward to define a mapping from RDF, meta elements, or CSS syntax, to the SLink data model.
An XML element conforms to SLink if it contains one or more attributes
defined in this specification, and the value of any such attributes conforms
to the lexical constraints of
xsd:anyURI. This specification
imposes no particular constraints on DTDs or schemas; conformance applies
only to elements and attributes.
An XML application conforms to SLink if it recognizes the attributes defined
in this specification, processes relative URIs in accordance with [XML
Base], and provides a suitable user interface to realize the intent indicated
by the attributes.
The following informative set of questions and answers discusses some common concerns with this approach.
Q: I don't see any means to provide link metadata, such as a title. Also, several of my favorite XLink/HLink features, like linkbases, are missing. How do I provide these things, and how can an implementation render links without them?
A: The xml: prefix is reserved for things that are potentially useful in nearly any XML document on the Web. If linking doesn't fit this criteria, I can't imagine what does.