Subject: Link Relations and languages

From: Noah Slater <[email-masked]>
Date: Thu, 16 Apr 2009 13:18:20 +0000

Hello,

I have been reading through:

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

Section 5 lists the following for link parameters:

     link-param        = ( ( "rel" "=" relation-types )
                       | ( "rev" "=" relation-types )
                       | ( "type" "=" type-name )
                       | ( "title" "=" quoted-string )
                       | ( "title*" "=" enc2231-string )
                       | ( "anchor" "=" <"> URI-Reference <"> )
                       | ( link-extension ) )

For situations where you're linking to an alternate language URI I think it
would be useful to include "lang" and "hreflang" in this list of predefined link
parameters, with semantics similar to HTML 4.01 @lang and @hreflang:

  @lang
  http://www.w3.org/TR/html401/struct/dirlang.html#adef-lang

  @hreflang
  http://www.w3.org/TR/html401/struct/links.html#adef-hreflang

I could then map a HTML 4.01 <link> element like this:

  <link rel="alternate" href="index.fr" hreflang="fr" lang="fr" title="Essais">

To the following Link header:

  Link: <index.fr>; rel="alternate"; hreflang="fr"; lang="fr"; title="Essais"

I realise that this would be possible with a link-extension, but given that
these two parameters are already defined in HTML 4.01, it would be nice to see
them made explicit, with data types similar to:

  http://www.w3.org/TR/html401/types.html#type-langcode

Best,

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

---

From: Thomas Broyer <[email-masked]>
Date: Thu, 16 Apr 2009 20:03:57 +0200

>  Link: <index.fr>; rel="alternate"; hreflang="fr"; lang="fr"; title="Essais"

Hmm, I'm just realizing that rel="alternate" really looks like a
duplicate of the Alternates header defined in RFC 2295 (Alternates
also has a "features" attribute, much like HTML has a media
attribute):
http://tools.ietf.org/html/rfc2295#section-8.3

-- 
Thomas Broyer

---

From: Noah Slater <[email-masked]>
Date: Thu, 16 Apr 2009 19:20:49 +0100

> http://tools.ietf.org/html/rfc2295#section-8.3

It certainly covers the same area.

Link lets you specify titles as well as other arbitrary parameters though.

Link could also be useful when you don't want transparent conneg activating.