Abstract
-
Provides a middle ground between PacePubControl and PacePubStatusResource and is compatible with PaceCollectionProcess
Status
-
Proposal (JamesSnell)
Rationale
-
The ability to specify additional publication control parameters for a resource is important. (e.g. PacePubControl)
-
While generalizable across multiple implementations, control parameters are fairly domain and implementation specific and are independent of the resource/entry being created (e.g. not all Atom implementations will support the notion trackbacks, comments, varying the text-encoding, etc)
-
The proposed mechanism below provides the ability to set and retrieve control parameters for a resource independently of the actual resource. (e.g. PacePubStatusResource)
-
The status element is removed from the control element in favor of the approach suggested in PaceCollectionProcess
Proposal
Introduce a Resource Control Document as a top level document that can be used to specified control parameters for a resource in a collection.
The control element would be a container for domain-specific namespace-qualified extension elements. Those extension elements NOT being defined by the core Atom Protocol specification
<?xml ...?> <control xmlns="..." xmlns:bc="urn:blog-control"> <bc:comments>enabled</bc:comments> <bc:trackbacks-in>enabled</bc:trackbacks-in> ... </control>
The process:
1. Create the resource by posting the entry to the resource collection at [URI1]. The entry MAY contain an embedded <control /> element so that the publish state and other parameters could be set in one step.
POST /collection HTTP/1.1 Host: myhost.com ... <?xml ... ?> <entry> ... </entry>
2. The server responds that the resource has been created and is located at [URI2]
HTTP/1.1 201 Created ... Location: http://myhost.com/entries/1
3. Modify the resource's control parameters by POST'ing to [URI2]
POST /entries/1 HTTP/1.1 Host: myhost.com Content-Type: application/atomcontrol+xml Content-Length: nnnn <?xml ... ?> <control xmlns="..."> ... </control>
4. If someone wants to GET the Control Document for a particular resource, they would submit a GET to [URI2] with Accept: application/atomcontrol+xml in the header
GET /entries/1 HTTP/1.1 Host: myhost.com Accept: application/atomcontrol+xml
5. The entry could *still* have some form of embedded element that indicates the published status of the entry.. This would essentially look like what PacePubControl suggests
<entry> ... <control xmlns="..."> ... </control> </entry>