On 24 May 2005, at 5:06 am, James Cerra wrote:
First off: it is an error to lie about your media-type, so I would change "SHOULD be suitable for handling as the indicated media type" to "MUST be suitable for handling as the indicated media type."
+1
Secondly, XML may be entity (or CDATA) encoded like @type="html" or plain xml like @type="xhtml". This is becuase of the "content of atom:content MAY include child elements" phrase. There is no guarantee if an entity escaped passage is xml or a text node example of an xml document (i.e. an example of an xml document), for example.
If I follow you right, you misunderstand. Atom documents are unambiguous. XML has to be inserted literally, with no entity escaping (except for entities that are part of text nodes) allowed.
<atom:content type="application/xml"> <?xml version="1.0?> <tag /></atom:content>
This is invalid, since it has no root element. It represents the standalone XML document:
<?xml version="1.0"> <?xml version="1.0?> <tag /> This is correct: <atom:content type="application/xml"><tag /></atom:content> Graham