RE: Use of Link rel+type for application discovery

I think you know why I'm asking this. The new relationship type 'describedby' is going to be shared by multiple descriptor formats. It is not likely that applications will support multiple formats for a single use case (that is, support child safety ratings in both XRD and POWDER). Most applications will choose a single descriptor format and extend its schema/syntax for their own needs.

This means, when looking to obtain such application specific descriptors, the 'type' of the document is very important. If it cannot be trusted, it seems the implication is that applications must perform this:

1. Look for links with the desired 'rel'.
2. Sort them in the order of preference based on their 'type' (known types first, blank type second, unknown types last).
3. Fetch each linked document until the "right" one is found.

On the other hand, if an application specifies:

Look for a link with rel='describedby' and type='application/powder+xml' only, it makes life much easier. It can also go further and in cases where the type is application specific (such as 'example/child-safety-3.0+xml'), require that one and only one link is allowed/required.

While 'type' is a hint, it is authoritatively representing the viewpoint of the resource providing the link. Even of the linked resource is of a different type than indicated, shouldn't the intention of the linking resource be allowed to use in such a way?


> -----Original Message-----
> From: Phil Archer []
> Sent: Thursday, January 22, 2009 5:37 AM
> To: Eran Hammer-Lahav
> Cc: Group
> Subject: Re: Use of Link rel+type for application discovery
> Eran Hammer-Lahav wrote:
> > In Link headers / elements, the 'rel' attribute defines the
> relationship and the 'type' attribute provides a hint regarding the
> content type of the destination resource. Is it correct to assume that
> while 'type' does not define a relationship (as in, 'image/*' means 'my
> pictures'), applications may require that both the 'rel' and 'type'
> attribute carry a certain value when used.
> >
> > In other words, is it valid to say "look for a link with rel='a' and
> type='b' and only if both found, do something"?
> That seems to be a valid approach for an application to take, but one
> can also argue that the rel type might be sufficient. How many HTML
> link
> headers bother to include type="text/css" alongside rel="stylesheet"?
> Without checking my guess is that browsers will all-but ignore the
> type.
> The same won't be true for other rel types.
> > I assume yes, but want to make sure this does not violate anyone's
> view on the use of 'type' in a MUST match criteria.
> Valid at the application level, but as it's a hint, then it really
> can't
> be more than a MAY at documentation level IMO.
> Phil.
> --
> Phil Archer
> w.

Received on Thursday, 22 January 2009 16:40:48 UTC