On Wednesday, April 20, 2005, at 04:24 AM, Henri Sivonen wrote:
On Apr 20, 2005, at 11:53, Bill de h�ra wrote:
Henri Sivonen wrote:On Apr 20, 2005, at 05:21, Graham wrote:iii) Require that xhtml and *xml content elements have only a single child node. That is, all xml must be wrapped in an enclosing element (eg <content>text <b>bold</b> more text</content> would be invalid).-1. The Atom content element is the wrapper.
If your rendering mechanism requires a single root but not atom:content, shouldn't it be your responsibility to add it?
Not if the content formats have single roots by design.
Yes, */xml and */*+xml obviously require a single root. However, type='xhtml' is a fragment--not a full XHTML doc.
Here's the relevant spec text for */xml and */*+xml:
If the value of "type" 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 which would serve as the root element of the
XML document of the indicated type.* MAY include child elements, not MUST or even SHOULD
* "this would normally mean ... a single child element which would serve as the root element of the XML document of the indicated type" -- not " MUST/SHOULD ... a single child element ..."
It looks to me like fragments of other types could easily end up in there too.
On Wednesday, April 20, 2005, at 03:57 AM, Graham wrote:
You misread my intent. Requiring a single root (as the XML spec itself does) means there's always a hook available to put the namespace declaration, negating the need for ever adding an additional wrapper.
So requiring a wrapper to be added to the content when the author didn't put one there, and not providing a way to signal the author's intent is better than giving the publishing software a way to add and signal the presence of a software-generated wrapper or publish without an extra wrapper? If the only issue were the possibility of cascading wrappers, that might be so, but I for one don't agree that adding even a single wrapper is always a benign process. We certainly can't be sure of this for all future XML fragment types that might get embedded in Atom documents.
