Subject: Link Relations and languages

From: Noah Slater <[email-masked]>
Date: Mon, 13 Jul 2009 21:07:57 +0100

Hello,

I previously sent a comment about link parameters:

  http://lists.w3.org/Archives/Public/ietf-http-wg/2009AprJun/0196.html

The latest draft doesn't include the suggested parameters:

  http://www.ietf.org/internet-drafts/draft-nottingham-http-link-header-06.txt

Is there any chance you could include these parameters in the next draft?

Thanks,

-- 
Noah Slater, http://tumbolia.org/nslater

---

From: Noah Slater <[email-masked]>
Date: Tue, 14 Jul 2009 11:33:03 +0100

On Tue, Jul 14, 2009 at 11:01:43AM +0200, Sam Johnston wrote:
> I'm working on an application of link headers and have thought long and hard
> about the language issue. On one hand we should leave this to HTTP content
> negotiation but on the other we should be fully compatible with existing
> mechanisms and give people the option, removing it later if foud to be unused
> (as was ironically the case with te link headers themselves).

The lang and hreflang parameters can complement content negotiation.

If I create the following HTML resource variants:

  http://example.org/essay.en
  http://example.org/essay.fr
  http://example.org/essay.de

I can serve these up with Apache httpd content negotiation at:

  http://example.org/essay

With transparent negotiation, I can serve up the following HTTP header:

  Alternates:
    {"essay.de.html" 1 {type text/html} {language de} {length 0}},
    {"essay.en.html" 1 {type text/html} {language en} {length 0}},
    {"essay.fr.html" 1 {type text/html} {language fr} {length 0}}

A client must send the following additional header to access this information:

  Negotiate: trans

Apache httpd does not let me provide variant titles with this header.

I can add the following elements to the HTML resource variants:

  <link rel="alternate" href="essay.en" hreflang="en" lang="en" title="Essay">
  <link rel="alternate" href="essay.fr" hreflang="fr" lang="fr" title="Essais">
  <link rel="alternate" href="essay.de" hreflang="de" lang="de" title="Aufsatz">

I could mirror this information, and serve up the following HTTP headers:

  Link: <essay.en>; rel="alternate"; hreflang="en"; lang="en"; title="Essay"
  Link: <essay.fr>; rel="alternate"; hreflang="fr"; lang="fr"; title="Essais"
  Link: <essay.de>; rel="alternate"; hreflang="de"; lang="de"; title="Aufsatz"

Being able to provide this information with every request, independent of the
client Negotiate header, and being able to provide variant titles, makes this
application of the Link header more useful than the Alternates header.

With a multilingual site, there may be cases where a related resource is known
to exist, and is only available in another language. These parameters would let
me link to that resource with the proper information, making this application of
the Link header more useful than the Alternates header.

I am doing some free software which manages these link relationships between
resource variants, and it would be nice to be able to use the Link header in a
standard way for this, especially when the media type doesn't allow me to embed
this metadata directly.

I do not think this introduces compatibility problems with existing mechanisms.

Best,

---

From: Sam Johnston <[email-masked]>
Date: Tue, 14 Jul 2009 11:01:43 +0200

Noah,

I'm working on an application of link headers and have thought long
and hard about the language issue. On one hand we should leave this to
HTTP content negotiation but on the other we should be fully
compatible with existing mechanisms and give people the option,
removing it later if foud to be unused (as was ironically the case
with te link headers themselves).

Sam on iPhone