[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Searching for concensus on Pub Control (Re: Consensus call: PacePubControl)




Ezra Cooper wrote:



On Jul 21, 2005, at 1:05 PM, Joe Gregorio wrote:



Do you think the concept of 'draft' applies to members of Generic Collections or just members of Entry Collections?


I've been working on the assumption that we don't treat metadata about members of generic collections--or rather, whatever metadata is in the resource is opaque to Atom per se.

I think this is a reasonable approach, since Atom is all about entries; "generic" resources are just cargo, as far as Atom is concerned.

Ezra


My brain is beginning to align with this view as well.

A Collection is a collection of entries.
An entry may reference (e.g. <content src="..." /> ) some non-Atom type of content data.
The Atom protocol works against the entries within the collection


This essentially eliminates Generic Collections and greatly simplifies APP.

If I want to have a photoblog, I would not use APP to post the images themselves, I would use APP to post the entries describing the images. If I want to post the entry to the collection and upload the photo at the same time, I either include the binary content of the photo as base64 encoded content within the entry, or use a multipart message with a <content src="..." /> in the entry.

Example 1: Post an entry to a photoblog using an external link to photo
 process: upload photo with FTP, post entry to the collection

 POST /collection-uri HTTP/1.1
 Host: example.com
 Content-Type: application/atom+xml
 Content-Length: nnnn

<entry xmlns="...">
...
<content type="image/png" src="http://www.example.com/images/myphoto.png"; />
</entry>


Example 2: Post an entry to a photoblog using inline binary content
 process: base64 encode photo, post entry to the collection

 POST /collection-uri HTTP/1.1
 Host: example.com
 Content-Type: application/atom+xml
 Content-Length: nnnn

 <entry xmlns="...">
   ...
   <content type="image/png">{base64 content}</content>
 </entry>


Example 3: Post an entry to a photoblog using multipart content
process: binary image packaged as second part of a multipart/mixed content. entry is the first part


 POST /collection-uri HTTP/1.1
 Host: example.com
 Content-Type: multipart/mixed; boundary=abc123
 Content-Length: nnnn

 --abc123
 Content-Type: application/atom+xml
 <entry xmlns="...">
   ...
   <content type="image/png" src="cid:..."; />
 </entry>

 --abc123
 Content-ID: ...
 Content-Type: image/png

{binary content}


When a multipart/mixed is sent, the server would respond with distinct URL's for the entry and the binary content.


- James