[whatwg] Alternate link clarifications [was Re: PaceAutoDiscoveryDraftIsPointless]

Ian Hickson ian at hixie.ch
Tue Nov 28 17:13:18 PST 2006


On Tue, 28 Nov 2006, James M Snell wrote:
> 
> Ian Hickson wrote:
> >> [snip]
> >>  1. Is the order of alternate link rels in a document significant?
> > 
> > Good question. The draft hadn't covered that. I've now fixed the spec 
> > to say that the order is important in one respect: the first <link>, 
> > <a>, or <area> element whose rel="" attribute has the keyword "feed" 
> > (which might also be implied by rel=alternate in certain cases) is 
> > defined to be the default syndication feed for autodiscovery purposes.
> 
> Excellent.  However, wouldn't it be more appropriate to limit this just 
> to rel="alternate feed"?  I can't imagine that the ordering of "feed" 
> links that are not also alternates is really all that significant.

Consider a variant of the example you give below:

  <link rel="feed" title="Mozilla Announcements"
        href="http://www.mozilla.org/news.rdf">
  <link rel="feed" title="Mozilla Weblogs"
        href="http://planet.mozilla.org/rss10.xml">
  <link rel="feed" title="mozillaZine News"
        href="http://www.mozillazine.org/atom.xml">
  <link rel="feed" title="Mozilla Developer News"
        href="http://developer.mozilla.org/devnews/index.php/feed/">

Here, while the last three are also valid feeds, it is the first one that 
should be considered the default when doing auto-discovery. This isn't to 
say that the feed UA should ignore the other three, or that it should only 
show them if the user goes out of his way to obtain them -- indeed, the 
"default" relationship could be completely ignored. It just means that if 
it has to automatically pick one, then the first one is the one it should 
pick. (It might also decide to only pick the one that is both a feed and 
an alternative representation of the document, instead of picking the 
default feed.)


> >>  2. Are multiple alternate links with the same type attribute
> >>     considered to be equivalent regardless of where those links appear
> >>     in the document.
> > 
> > Currently, the location of the link is irrelevant (except for the 
> > first one being the default). However, different links with different 
> > href="" attributes aren't "equivalent"; they point to different 
> > documents. They can also have different titles (title=""), languages 
> > (hreflang=""), and preferred media (media="").
> 
> Equivalent was the wrong word I think.
> 
> Assuming that A includes alternate links to B and C, Can I assume that B 
> is also an alternate of C; and vice versa?

Oh, you mean is the 'alternative' link type transitive? I guess so. I've 
added a paragraph to the spec stating this.


> If that is the case, consider the header of the mozilla.org start page
> in which you'll find four distinct alternate links:
> 
>  <link rel="alternate" type="application/rss+xml"
>        title="Mozilla Announcements"
>        href="http://www.mozilla.org/news.rdf">
>  <link rel="alternate" type="application/rss+xml"
>        title="Mozilla Weblogs"
>        href="http://planet.mozilla.org/rss10.xml">
>  <link rel="alternate" type="application/atom+xml"
>        title="mozillaZine News"
>        href="http://www.mozillazine.org/atom.xml">
>  <link rel="alternate" type="application/rss+xml"
>        title="Mozilla Developer News"
>        href="http://developer.mozilla.org/devnews/index.php/feed/">
> 
> Each represent alternative representations of distinct subsets of the
> start page but they are not alternatives to one another.  I'm guessing
> that using the "feed" link relation without the "alternate" keyword
> would have been more appropriate

Yes.


> > I hope this helps. If you have any other feedback, or if you'd like the 
> > spec changed in any way, please let us know. I am very interested in 
> > addressing any requirements the Atom community may have.
> 
> Yes, it does help.  Thanks for taking the time.

My pleasure!

-- 
Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'



More information about the whatwg mailing list