W3C home > Mailing lists > Public > www-html@w3.org > October 1998

LINK and A

From: John Whelan <whelan@itp.unibe.ch>
Date: Thu, 1 Oct 1998 17:51:10 -0400 (EDT)
Message-Id: <199810012150.XAA02746@itpserver>
To: www-html@w3.org
The possibility of REL and REV attributes on the A element leads me to
resurrect a thread from August; at one point, I said:

> Along those lines, do I surmise correctly that there's no need
> to label both ends of a relationship with REL and REV LINKs?  And that
> the LINK is traditionally put on the end that minimizes the number of
> LINKS in any given document.  (E.g., you don't want to have fifteen
> LINK REV="index" links in the index document when you could just put
> one LINK REL="index" in each of the indexed documents.)

and Frank Boumphrey replied:

> Actually I think that if we are using LINK to help soft ware find its way
> around and understand the structure of our sites it would be better to put
> Links at both ends AND be verbose. After all you define an objects methods
> and properties.

One of the things I had in mind was that a lot of times document A and
document B have a particular relationship, and you want to encode one
end of that relationship with a LINK element, but not really bother
with the other end, since there's an A (anchor) element in the body of
one document pointing to the other.  For instance if index.html acts
as an index for foo.html, it's reasonable to put

<LINK REL="INDEX" HREF="index.html">

in foo.html, but it would seem redundant to include

<LINK REV="INDEX" HREF="foo.html">

in index.html because
	1) index.html is likely to have a REV="INDEX" relationship with
a lot of other documents
	2) index.html is almost certain to have something like
<A HREF="foo.html">Foo!</A> somewhere in its document body.

So it seems like a reasonable way to encode the other end of that
relationship is to add the REV="INDEX" to the anchor tag, as in

<A HREF="foo.html" REV="INDEX">Foo!</A>

This has the drawback of taking this information out of the HEAD, but
it seems a natural way to do things.

Along these lines, wouldn't it be nice to have a program that read in
all of the REV and REL information from a collection of documents,
constructed a site map, and then put in reciprocal links where they
didn't exist, according to the following rules:

Suppose foo.html has a REL=bar link (via LINK or A) to baz.html, but
baz.html has no REV=bar link (via LINK or A) to foo.html:
	1) If there is already a LINK in baz.html which points to
foo.html for some other reason, add 'bar' to the REV list for that
	2) Elsif there is an A in baz.html with HREF="foo.html", add
REV=bar to that.
	3) Else add a <LINK REV=bar HREF="foo.html"> to the HEAD of

Such a program could also add a TITLE attribute (if there wasn't one
already) on the A or LINK element, whose value would be the string
contained by the TITLE element in the linked-to document.

Of course, no one cares about LINK when there's META to worry about,
so such a program will never get written.

					John T. Whelan
Received on Friday, 2 October 1998 03:56:18 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 15:05:48 UTC