Message

Undefined named entity: foo

Explanation

Your feed is not well formed according to the XML specification. It makes use of a named entity other than one of the ones predefined in the XML specification: &lt; for <, &amp; for &, &gt; for >, ' for &apos;, and &quot; for ".

Solution

It is possible to create a DTD which declares additional entities, reference this DTD in a DOCTYPE declaration, and then make use of such entities. XHTML defines a set of such doctypes which defines additional entities. Support for the HTML and XHTML doctypes in now widespread — in browsers. While the RSS Validator will validate feeds which make use of DTDs specifically defined for use with Atom or RSS, the support for such advanced — and optional — XML features is not widespread in feed readers. As such, this approach is not recommended.

One solution that is widely supported is to replace the use of named entity references with their numerical equivalents. For example, use &#160 or &#xa0; instead of &nbsp;. A complete list of XHTML characters and their numeric equivalents can be found here. Many programming languages have libraries that can assist with this task.

Another approach it to make use of entity-encoded HTML. For example, use &amp;nbsp instead of &nbsp;. In Atom, this requires the use of the type="html" attribute on the construct.

Not clear? Disagree?

You might be able to find help in one of these fine resources.

Copyright © 2002-4 Mark Pilgrim and Sam Ruby