Your example is a invalid HTML document.

<link> can only be put inside <head>.

While you have mentioned HTML 5, you may take a look on XHTML 2. XHTML 2 allows 
all elements inside <body> to have a "href" attribute and thus they can be a 
link without using <a>. It is very complicated case for UAs to scan all.

IE 7 is actually doing a good job, it is rejecting all <link> elements which 
are put in a wrong position. I cannot understand why Firefox, Opera and Safari 
detect the links.

Franklin Tse

-----Original Message-----
From: Lachlan Hunt [mailto:[EMAIL PROTECTED] 
Sent: Saturday, November 25, 2006 22:24
To: Tse Shing Chi (Franklin/Whale)
Cc: 'atom-syntax'
Subject: Re: PaceResurrectAutodiscovery

Tse Shing Chi (Franklin/Whale) wrote:
>>> I think that only <link> should be used. All feeds linked by <a> 
>>> should be ignored during the process of autodiscovery.
>> 
>> Why?
> 
> Autodiscovery should be limited to <head>...</head>. If an author 
> wants his feeds to be discovered automatically by UAs, he should use 
> <link>. Providing additional or same feed links using <a> is only for 
> linking and does not affect the autodiscovery. Scanning whole 
> document is not necessary and increases the complexity.

Ah, but this works!

<html>
<head>
  <title>Feed Autodiscovery</title>
</head>
<body>
   <p>... really long body ...</p>
   <link rel="alternate" type="application/atom+xml" href="/feed">
</body>
</html>

I tested that with both HTML and XHTML and both tests worked in Firefox, 
Opera and Safari. IE7 was the only broswer that appeared to do what you 
suggest, at least to some degree.  But given that IE7 is in the minority 
in this case, and doesn't handle link elements in the body like other 
browsers (the way it's being defined in HTML5), I consider that a bug in IE.

-- 
Lachlan Hunt
http://lachy.id.au/





Reply via email to