NOTE-linkW3C

Navigation through LINK elements in HTML

15 June 1997

CSS conformance button This version:
http://www.w3.org/TR/NOTE-link-970826.en.html
French version:
http://www.w3.org/TR/NOTE-link-970826.fr.html
Author:
Daniel Glazman, Electricité de France, Research and Development Division


  1. Status of this document
  2. Introduction
  3. Follow a LINK
    1. Anchors and fragment URL targeting a LINK
    2. Dereferencing between two documents
  4. Rendering LINK elements
  5. Conclusion
  6. Acknowledgements


Status of this document

This document is a draft submitted to W3C from Electricité de France for discussion.. Please see Acknowledged Submissions to W3C regarding its disposition.

Introduction

A Cougar document is made, like former versions of the HTML model, of two main elements.The header HEAD only contains meta-data elements giving global information about the current document or its interactions with other objects. These elements are not rendered in any way by browsers. The main part of a Cougar document is the BODY element which contains the data a browser renders.

Cougar, published as HTML 4.0, allows to define relations between the current document and

These relations can be carried by a LINK element (contained in HEAD) or an anchor A element (contained in BODY), in their attributes REL, REV and HREF .

Most of these relations are used by navigation between documents and site management, and are rendered, as anchors, in documents' bodies. Adding LINK elements in documents' headers may then be understood by HTML writers as an embarassing redundance.

It is then proposed to add to HTML a mechanism allowing to follow LINK elements in a HTML document.

Follow a LINK

Anchors and fragment URLs targeting a LINK

It is proposed to dereference HREF REL and REV attributes carried by anchors if the target of this anchor is a LINK.

An anchor A targeting, through its HREF attribute, a LINK carrying the corresponding ID attribute sees its HREF REL et REV attributes dereferenced when the anchor is followed; browsers should use the value of the same attributes carried by the target LINK element instead of the original values.

Example :

<HTML>

<HEAD>
  <TITLE>First test</TITLE>
  <LINK REL=parent ID=linkParent HREF=../parent.html>
</HEAD>

<BODY>
  <P>The target of this <A HREF=#linkParent>anchor</A>
  is the parent of the current document</P>

  <P> blah blah blah</P>

  <P>And the target of <A HREF=#linkParent>this one</A>
  too !!!</P>
</BODY>

</HTML>

In this example, navigation through the anchor won't render its target LINK element but the document pointed by this LINK which is ..parent.html. This example is functionnally equivalent to :

<HTML>

<HEAD>
  <TITLE>First test</TITLE>
  <LINK REL=parent ID=linkParent HREF=../parent.html>
</HEAD>

<BODY>
  <P>The target of this
  <A REL=parent HREF=../parent.html>anchor</A>
  is the parent of the current document</P>

  <P> blah blah blah</P>

  <P>And the target of
  <A REL=parent HREF=../parent.html>this one</A>
  too !!!</P>
</BODY>

</HTML>

This solution allows any LINK a user may want to follow to be rendered in the body of the document without any CSS specification modification or adaptation.

Dereferencing between two documents

If the target of an anchor carrying a fragment URL is not in the current document, and if the browser, downloading this URL, determines that the target is a LINK element from the HEAD, it has to dereference the original target and render the URL contained in the HREF of the LINK target.

For instance, document toto.htm contains the following sequence :

<BODY>
...
<A HREF=tata.htm#linkParent>click here</A>
...
</BODY></HTML>

and document tata.htm contains :

<HEAD>
...
<LINK REL=parent ID=linkParent HREF=tutu.htm>
...

If user follows theanchor contained in toto.htm, the browser will have to render the tutu.htm document.

The target of a LINK element should not be an element contained in HEAD.

Rendering LINK elements

LINK elements are contained in the HEAD part of HTML documents. Even if the CSS specification contains nothing against rendering these elements and even if CSS rules can be applied to them, the common use in browsers is not that one.

The current proposal is not a proposal for extending HTML elements rendition to HEAD elements. This topic is part of a much more important work to be done about access to meta-data from within the BODY of a document.

Conclusion

Maintaining a Web site is usually a very tedious operation because of inter-documents links that can be dropped anywhere in documents. The current proposal allows to set the relations between a given document and other objects in the HEAD element and only once. This proposal may then

  1. promote the use of LINK,
  2. allow to build Web site maintenance tools without need of a SGML parser
  3. simplify the structure of complex documents sets simplifying the navigation between documents.

Acknowledgements

Many thanks for their precious help to