Julian Reschke wrote:

Maybe I'm missing something here, but...: is it that exceptional to have different XML schemas for the various stages a document may be in? Why not simply define a schema that contains everything that must be there, and which makes atom:id and atom:updated optional?

A "Transitional Atom" schema that relaxes a few of the MUST's is definitely conceivable (whether it's a good idea is another question altogether).

Transitional Atom Entries could be defined in a separate I-D and references from the APP. Entry collections could optionally accept Transitional Atom entries. Post a regular Atom entry to the collection and it MUST be valid (with atom:id, with atom:updated, etc). Post a Transitional Atom entry to the collection and the server has to create a valid Atom entry from it.

media type: application/atomtransitional+xml
namespace URI: http://www.w3.org/2005/Atom-transitional

t-atomEntry =
  element t-atom:entry {
     atomCommonAttributes,
     (atomAuthor*
      & atomCategory*
      & atomContent?
      & atomContributor*
      & atomId?
      & atomLink*
      & atomPublished?
      & atomRights?
      & atomSource?
      & atomSummary?
      & atomTitle
      & atomUpdated?
      & extensionElement*)
  }

   * t-atom:entry elements MAY contain one or more atom:author elements
* t-atom:entry elements MAY contain any number of atom:category elements. * t-atom:entry elements MUST NOT contain more than one atom:content element. * t-atom:entry elements MAY contain any number of atom:contributor elements.
   * t-atom:entry elements MAY contain exactly one atom:id element.
* t-atom:entry elements that contain no child atom:content element MUST contain at least one atom:link element with a rel attribute value of "alternate". * t-atom:entry elements MUST NOT contain more than one atom:link element with a rel attribute value of "alternate" that has the same combination of type and hreflang attribute values. * t-atom:entry elements MAY contain additional atom:link elements beyond those described above. * t-atom:entry elements MUST NOT contain more than one atom:published element. * t-atom:entry elements MUST NOT contain more than one atom:rights element. * t-atom:entry elements MUST NOT contain more than one atom:source element. * t-atom:entry elements MUST contain an atom:summary element in either of the following cases: * the atom:entry contains an atom:content that has a "src" attribute (and is thus empty). * the atom:entry contains content that is encoded in Base64; i.e. the "type" attribute of atom:content is a MIME media type [MIMEREG], but is not an XML media type [RFC3023], does not begin with "text/", and does not end with "/xml" or "+xml". * t-atom:entry elements MUST NOT contain more than one atom:summary element.
   * t-atom:entry elements MUST contain exactly one atom:title element.
   * t-atom:entry elements MAY contain exactly one atom:updated element.

<entry xmlns="http://www.w3.org/2005/Atom-transitional";>
 <title>A transitional entry</title>
<summary>When POST'ed to an entry collection, the server would create a real Atom entry based on it's contents</summary>
 <content type="text">
Several of the MUST's are relaxed: atom:id is optional, atom:updated is optional, atom:author is optional, etc. In order to create a valid Atom Entry from this, some processor would need to fill in the missing pieces of information
 </content>
</entry>


- James

Reply via email to