Subject: Fwd: [link draft] Changing the model for links

From: Mark Nottingham <[email-masked]>
Date: Wed, 8 Apr 2009 09:21:26 +1000

FYI; this would affect the interpretation of <link> in Atom as well...

Begin forwarded message:

> Resent-From: [email-masked]
> From: Mark Nottingham <[email-masked]>
> Date: 8 April 2009 9:10:58 AM
> To: HTTP Working Group <[email-masked]>
> Cc: Ian Hickson <[email-masked]>
> Subject: [link draft] Changing the model for links
> Archived-At: <http://www.w3.org/mid/[email-masked] 
> >
>
> I've been discussing the link draft with Ian Hickson, who points out  
> that in HTML4, there's a difference between
>
> <link rel="stylesheet" href="a"/>
> <link rel="stylesheet alternate" href="a"/>
>
> and
>
> <link rel="stylesheet alternate" href="a/>
>
> (see <http://www.w3.org/TR/html401/present/styles.html#specifying-external 
> > for the background of why these are different)
>
> In the current link draft, there isn't any way to express the  
> difference between these; the underlying model is
>
> [ context ] ---[ relation type ]---> [ target ]
>
> where 'relation type' is singular.
>
> To accommodate this use, the model would need to be something like
>
> [ context ] ---[ list of relation types ]---> [ target ]
>
> noting that there may be more than one list of relation types  
> between any context and target.
>
> Personally, I think that it would be only in pathological cases that  
> it would be necessary to know the difference between the two (i.e.,  
> real world Web pages will not point to a URI as both a stylesheet  
> and as an alternate for themselves, so it's safe to say that even  
> the first example above means that "a" is an alternate stylesheet).
>
> However, it is important for Link to interoperate well with HTML4.  
> Also, the HTML5 folks plan to use this model for other purposes  
> (e.g., "up up" to indicate a parent of a parent).
>
> The practical impact of making this change is that serialisations of  
> links won't be able to collapse multiple relation types between two  
> URIs into one link; they'll have to be separate to allow this  
> interpretation.
>
> So, for example, if you have link types ['w', 'x', 'y z'] between A  
> and B, it will have to be serialised as
>
>  Link: <B>; rel="w"
>  Link: <B>; rel="x"
>  Link: <B>; rel="y z"
>
> in HTTP headers, NOT
>
>  Link: <B>; rel="w x y z"
>
> because that's ambiguous.
>
> The alternative is to say that the 'stylesheet alternate'  
> combination isn't specific to how it's serialised, but is tied to  
> the occurrence of the links. I.e., when both relations are present  
> in links between the same resources, these special semantics take  
> affect. However, this does seem to directly conflict with the HTML4  
> language (see link above), so I don't think doing so is viable.
>
> Comments?
>
> --
> Mark Nottingham     http://www.mnot.net/
>
>

--
Mark Nottingham     http://www.mnot.net/

---

From: Mark Nottingham <[email-masked]>
Date: Wed, 8 Apr 2009 13:41:47 +1000

On 08/04/2009, at 12:57 PM, Brian Smith wrote:

> Mark Nottingham wrote:
> How would it affect Atom? Are you suggesting that some RFC update  
> RFC 4287
> to change the syntax of links in Atom?

Probably not, unless people want to support the multiple-relation  
style of links in Atom.

> Atom cannot express "stylesheet alternate" without defining a new,
> explicitly-named link relation, since atom:link/@rel cannot contain  
> any
> spaces. I don't see how that limitation of Atom can removed without  
> breaking
> many existing Atom processors.
>
> This was one of the issues I brought up when arguing against one of  
> the
> early Link header drafts. Although HTML, Atom, HTTP, and other  
> languages
> have very similar linking syntax and semantics, there are many  
> important
> differences that make it impractical to unify them.

Noted (again).