Abstract
Alternative to PaceRequestURI that uses a pub:control element to allow a client to request a URI for a entry
Status
Proposal
Rationale
Clients should have the ability to suggest a URI for an entry
Proposal
Add section 11.2.2
11.2.2 The "pub:location" Element When posting an atom:entry to a collection in order to add a new member, a client may include a pub:location element. This constitutes a request by the client that the new member be given the URI specified by the pub:location element. The URI value of the element may be relative or absolute. Server software MAY take the value into account in generating the new member's URI. For example, a typical application would be an APP server which uses dates to construct part of the URI path, e.g. "http://example.com/pub/2006/01/10", but which allows clients to specify the last part of the URI path.
Add pub:location to the pub:control definition in section 11.2
namespace pub = "http://example.net/appns/" pubControl = element pub:control { atomCommonAttributes, pubDraft?, pubLocation?, & extensionElement } pubDraft = element pub:draft { "yes" | "no" } pubLocation = element pub:location { atomURI }
And change the following from 11.2: "The "pub:control" element MAY contain exactly one "pub:draft" element as defined here, and MAY contain zero or more extension elements..." to "The "pub:control" element MAY contain exactly one "pub:draft" element, MAY contain exactly one "pub:location" element, and MAY contain zero or more extension elements..."
Example
POST /collection-uri HTTP/1.1 Host: example.org Content -Type: application/atom+xml Content -Length: nnnn <?xml version="1.0"?> <entry ...> ... <pub:control> <pub:location>/pub/2006/01/10/atom-robots</pub:location> </pub:control> ... </entry> HTTP/1.1 201 Created Date: ... Location: http://example.org/pub/2006/01/10/atom-robots