XML code in a HTML doc?

  powerless 22:23 31 Oct 2005

link rel="alternate" title="Title" href="click here" type="text/xml" />

link rel="alternate" title="Title" href="click here" type="application/rss+xml" />


When adding the above to a HTML 4.01 Transitional doc. for the purpose of an RSS feed, the W3C does not validate the above saying that:

**The element named above was found in a context where it is not allowed. This could mean that you have incorrectly nested elements -- such as a "style" element in the "body" section instead of inside "head" -- or two elements that overlap (which is not allowed).

One common cause for this error is the use of XHTML syntax in HTML documents. Due to HTML's rules of implicitly closed elements, this error can create cascading effects. For instance, using XHTML's "self-closing" tags for "meta" and "link" in the "head" section of a HTML document may cause the parser to infer the end of the "head" section and the beginning of the "body" section (where "link" and "meta" are not allowed; hence the reported error).**

I think the later is the cause 'the use of XHTML syntax in HTML documents'.

Is there a way to make this validate in a HTML doc.?

I'm not to bothered about this as the RSS link appears and is active, the page looks the same but just wondered if there is a HTML equivalent of the XHTML syntax?

  powerless 22:25 31 Oct 2005

I think that's correct.

This thread is now locked and can not be replied to.

Elsewhere on IDG sites

AMD Radeon Adrenalin release date, new features, compatible graphics cards

Inside the iMac Pro - Apple's most powerful Mac yet

iMac Pro release date, UK price & specs

Comment nettoyer Windows et optimiser son PC gratuitement ?