Subject: RE: Related entries and feeds: links and link expansion

From: "Brian Smith" <[email-masked]>
Date: Tue, 19 Feb 2008 16:01:43 -0800

Pablo Castro wrote:
> >> FWIW, your content element is incorrect.  There needs to
> be a top level element, e.g.
> 
> I'll claim ignorance on this. Why do we need a wrapping element? Not 
> particularly passionate one way or the other, just curious to hear why

> is it required...

Use application/xml if (and only if) the content can be parsed on its
own as a well-formed XML document (which can have only one top-level
element). If you don't have a single top-level element, you can use
application/xml-external-parsed-entity. See RFC 3023.

- Brian

---

From: James M Snell <[email-masked]>
Date: Tue, 19 Feb 2008 16:27:17 -0800

Section 4.1.3.3:

   If the value of "type" is an XML media type [RFC3023] or ends
   with "+xml" or "/xml" (case insensitive), the content of
   atom:content MAY include child elements and SHOULD be suitable
   for handling as the indicated media type.  If the "src" attribute
   is not provided, this would normally mean that the "atom:content"
   element would contain a single child element that would serve as
   the root element of the XML document of the indicated type.

The key point is the "SHOULD be suitable for handling as the indicated 
media type".  With application/xml, then, you'd need a top-level element 
in order to be able to handle it as an XML document.

While Brian is right with, you'll likely find that clients will be able 
to handle the single top-level element better.

- James