Eric Scheid wrote:
But I'm not so sure it's valid now, because of the SHOULD clause below:

    per rfc4287 section 4.1.3.3

 [snip]

Assume foo xml requires foo:basket as the root element. Is it valid to have
atom:content with foo:thing as the immediate child?


Hey, now you're changing the scenario ;-) Item #4 of 4.1.3.3 is quite clear to me. Specifically, "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"

To me that says that while the example you give may be perfectly valid Atom, it may not be a valid instance of the application/foo+xml media type.

For example, an OPML document requires <opml> as the root, which contains
<head> and <body>, the latter containing <outline> elements ... so can an
atom entry contain just an <opml:outline> element?

  <entry>
      ...
      <entry type="whatever OPML's type is">
        <opml:outline xmlns:opml="whatever.." ... />
      </entry>
  </entry>


Heh.. another typo methinks ;-)

Given that OPML has no media type, the XML media type would be appropriate. Regardless, this would be perfectly valid Atom even if it's not perfectly valid OPML.

   <entry>
       ...
       <content type="application/xml">
         <opml:outline xmlns:opml="whatever.." ... />
       </content>
   </entry>

Thus, can atom be used to ship around parcels of xml snippets? I suppose it
could, but only so long as both ends knew what was going on, and knew naïve
atom processors might barf on the incomplete xml, right?


It's not really about "incomplete" XML as much as invalid XML ( in the sense that the xml does not validate to a DTD or schema ). Atom does not require that content be valid, just that it be well-formed.

- James


Reply via email to