INTERNET-DRAFT
<draft-connolly-link-header-01>
Expires October 1999
D. Connolly, W3C
I. Hickson, WSP
1 April 1999

An Entity Header for Linked Resources

Status of This Document

This is a draft of a draft and is not yet ready for submission.

This document is [NOT YET] an Internet-Draft. Internet-Drafts are working documents of the Internet Engineering Task Force (IETF), its areas, and its working groups. Note that other groups may also distribute working documents as Internet-Drafts.

Internet-Drafts are draft documents valid for a maximum of six months and may be updated, replaced, or obsoleted by other documents at any time. It is inappropriate to use Internet-Drafts as reference material or to cite them other than as "work in progress".

To view the entire list of current Internet-Drafts, please check the "1id-abstracts.txt" listing contained in the Internet-Drafts Shadow Directories on ftp.is.co.za (Africa), ftp.nordu.net (Europe), munnari.oz.au (Pacific Rim), ds.internic.net (US East Coast), or ftp.isi.edu (US West Coast).

Abstract

The World Wide Web is the universe of network-accessible information, the embodiment of human knowledge. It is a set of linked resources, often expressed in HTML and transferred using HTTP.

In the same way that the HTML <LINK> element expresses a link between the document it occurs in and some other resource in the web, a Link: entity header expresses a link between the entity it occurs in and some other resource in the web.

This document motivates the Link: header field. The editors solicit comments from client and server implementors who expect to support this mechanism, as well as information providers who would find it valuable.

Introduction

The World Wide Web is the universe of network-accessible information, the embodiment of human knowledge [TimBL92]. It is a set of linked resources, often expressed in [HTML] and transferred using [HTTP].

In the same way that the HTML <LINK> element expresses a link between the document it occurs in and some other resource in the web, a Link: entity header expresses a link between the entity it occurs in and some other resource in the web.

Application: Style Sheets

There are many applications for this mechanism, but this draft is motivated by one in particular: specifying style through HTTP headers. This mechanism is important for the deployment of [CSS1]. The [HTML4] specification, an update of [HTML32], depends on [CSS1] and on the HTTP Link: header to allow information provider to factor presentation information out of a number of documents and collect them in stylesheet resources.

The following is excerpted from [HTML4].

14.6 Linking to style sheets with HTTP headers

Web server managers may find it convenient to configure a server so that a style sheet will be applied to a group of pages. The HTTP Link header described in [RFC2068], section 19.6.1.2, has the same effect as a LINK element with the same attributes and values. Multiple Link headers correspond to multiple LINK elements occurring in the same order. For instance,

        Link: <http://www.acme.com/corporate.css>; REL=stylesheet

corresponds to:

        <LINK rel="stylesheet" href="http://www.acme.com/corporate.css">

It is possible to specify several alternate styles using multiple Link headers, and then use the rel attribute to determine the default style.

In the following example, "compact" is applied by default since it omits the "alternate" keyword for the rel attribute.

        Link: <compact.css>; rel="stylesheet"; title="compact"
        Link: <bigprint.css>; rel="alternate stylesheet"; title="big print"

This should also work when HTML documents are sent by email. Some email agents can alter the ordering of [RFC822] headers. To protect against this affecting the cascading order for style sheets specified by Link headers, authors can use header concatenation to merge several instances of the same header field. The quote marks are only needed when the attribute values include whitespace. Use SGML entities to reference characters that are otherwise not permitted within HTTP or email headers, or that are likely to be affected by transit through gateways.

LINK and META elements implied by HTTP headers are defined as occurring before any explicit LINK and META elements in the document's HEAD.

Specification

This is based upon the definition present in [RFC2068]. The only changes are the correction of a typo in the first construction, and the addition of two examples.

The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this section are to be interpreted as described in [RFC2119].

Link

The Link entity-header field provides a means for describing a relationship between two resources, generally between the requested resource and some other resource. An entity MAY include multiple Link values. Links at the metainformation level typically indicate relationships like hierarchical structure and navigation paths. The Link field is semantically equivalent to the <LINK> element in [HTML].

        Link           = "Link" ":" #("<" URI ">" *( ";" link-param ) ) 

        link-param     = ( ( "rel" "=" relationship )
                           | ( "rev" "=" relationship )
                           | ( "title" "=" quoted-string )
                           | ( "anchor" "=" <"> URI <"> )
                           | ( link-extension ) )

        link-extension = token [ "=" ( token | quoted-string ) ]

        relationship   = sgml-name
                       | ( <"> sgml-name *( SP sgml-name) <"> )

        sgml-name      = ALPHA *( ALPHA | DIGIT | "." | "-" )

Relationship values are case-insensitive and MAY be extended within the constraints of the sgml-name syntax. The title parameter MAY be used to label the destination of a link such that it can be used as identification within a human-readable menu. The anchor parameter MAY be used to indicate a source anchor other than the entire current resource, such as a fragment of this resource or a third resource.

Examples of usage include:

       Link: <http://www.cern.ch/TheBook/chapter2>; rel="Previous"  

This first example indicates that chapter2 is previous to this resource in a logical navigation path.

       Link: <mailto:timbl@w3.org>; rev="Made"; title="Tim Berners-Lee"  

This second example indicates that the person responsible for making the resource available is identified by the given e-mail address.

       Link: <../media/contrast.css>; rel="stylesheet alternate";
        title="High Contrast Styles"; type="text/css"; media="screen", 
        <../media/print.css>; rel="stylesheet"; type="text/css";
        media="print"   

The third example lists two additional stylesheets for the document. This example demonstrates the use of concatentated Link: headers, and the use of link-extension. Note also that each continuation line is prefixed with linear whitespace (this is a requirement of [HTTP]).

       Link: <sec-12-glossary.xml>; rel="glossary"; anchor="#sec12"

This final example demostrates how the anchor attribute can be used to narrow links down to a particular section of the linked document.

Implementation Status

The references section includes a number of servers that support the Link: header, either directly or via end-user customization, and one client that currently supports the Link: header for stylesheets.

The editors solicit comments from client and server implementors who expect to support this mechanism, as well as information providers who would find it valuable.

Acknowledgements

The Link: header was originally proposed by Tim Berners-Lee et. al. in [HTTP92].

References

[HTML4]
D. Raggett, A. Le Hors, I. Jacobs, HTML 4.0 Specification, W3C Recommendation, revised on 24 April 1998
[CSS1]
Håkon W. Lie and Bert Bos, Cascading Style Sheets, level 1, 17 December 1996
[HTML32]
Raggett, HTML 3.2 Reference Specification, W3C Recommendation 14 January 1997
[RFC2119]
S. Bradner, Key words for use in RFCs to Indicate Requirement Levels, March 1997.
[RFC822]
Revised by David H. Crocker, Standard for the Format of ARPA Internet Text Messages, August 1982.
[TimBL92]
T. Berners-Lee and R. Cailliau and J-F. Groff and B. Pollermann, World-Wide Web: An Information Infrastructure for High-Energy Physics, "Proceedings of the Workshop on Software Engineering Artificial Intelligence and Expert Systems for High Energy and Nuclear Physics", January 1992.
[HTTP92]
T. Berners-Lee, HTTP: A protocol for networked information, 1992
[RFC2068]
Fielding, Gettys, Mogul, Frystyk, Berners-Lee, Hypertext Transfer Protocol -- HTTP/1.1, Proposed Standard RFC, January 1997
[HTTP]
Fielding, Gettys, Mogul, Frystyk, Masinter, Leach, Berners-Lee, Hypertext Transfer Protocol -- HTTP/1.1, INTERNET-DRAFT, November 1998
[CGI]
D. Robinson The WWW Common Gateway Interface Version 1.1, work in progress 15 February 1996
[NSAPI]
Netscape server API documentation, 1995
[ISAPI]
ISAPI documentation, Microsoft Corporation, in ActiveX Alpha SDK, http://www.msn.com/download/sdk/msactivedk.zip, 1996
[Apache]
Thau, Robert, Design considerations for the Apache Server API, Fifth International World Wide Web Conference, May 6-10, 1996, Paris, France
[OM]
OpenMarket server technical overview sometime in 1996.
[Spy95]
Spyglass Server Application Development Interface Spyglass, Inc. version 1.17 1995/09/11
[WN]
WN server documentation, 1995
[Spinner]
Spinner server technical overview, http://spinner.infovav.se/overview.html, 1995
[Mozilla]
Mozilla, 1999

Authors' Addresses

Dan Connolly
http://www.w3.org/People/Connolly/
<connolly@w3.org>
545 Technology Square
Cambridge, MA 02139
Ian Hickson
http://ian.hixie.ch/
<ian@hixie.ch>
15, Sandridge Road
Melksham
Wiltshire, SN12 7BE
United Kingdom