UserPreferences

PaceEditLinkRelation


Abstract

Regarding Draft -08

In an APP implementation I'm working on, we need the ability to POST a media file to an entry collection and have it produce an atom entry in response. The current spec gives us this ability but is ambiguous on how we can communicate back to the client a URL that may be used to edit the media file that is associated with the entry. Note that we're NOT talking about a media collection and we are using the <content> element of the created Atom entry to contain a textual description of the posted media file. For our implementation, we'd like to use an edit link relation with a type attribute value equal to the media type of the posted resource to reference the edit location of the media resource. Unfortunately, the current spec is somewhat ambiguous as to whether or not this is legal. To address this, I'd like to change section 8.2 to indicate that a member of an entry collection must have an atom:link with a rel attribute value of "edit" AND a type of "application/atom+xml" to indicate the IRI of the editable Atom entry. This would allow us to include additional atom:link[rel="edit"] elements with other type attribute values as appropriate.

Note that the spec already allows me to do the media post to the entry collection so I am NOT proposing any kind of change to the POST behavior. This Pace ONLY affects the edit link relation! Specifically, it adds the following constraints:

  1. Entry collection member's MUST have one edit link relation with a type of "application/atom+xml"

  2. Entry collection member's MUST NOT have more than one edit link relation with the same type attribute value.

POST /entry-collection HTTP/1.1
Host: example.org
Content- Type: image/png
Content- Length: nnnn

{binary data}


HTTP/1.1 201 Created
Date: ...
Location: http://example.org/entries/1.atom
Content- Type: application/atom+xml
Content- Length: nnnn

<entry>
  ...
  <summary>Shortened summary of the image</summary>
  <link rel="edit" type="application/atom+xml" href="http://example.org/entries/1.atom" />
  <link rel="edit" type="image/png" href="http://example.org/entries/1.png" />
  <content type="xhtml">
    <div xmlns="...">
      This is a richly formatted description of the image that was POSTed to create this entry.
    </div>
  </content>
</entry>

Status

Withdrawn

Rationale

See the abstract

Proposal

In section 8.2, change the following sentence "Every member representation MUST contain an atom:link element with a link relation of "edit" that contains the IRI of the member resource" to "Every member representation MUST contain an atom:link element with a link relation of "edit" and a type of "application/atom+xml" that contains the IRI of te member resource"

Add the following to section 10.1, "Atom Entries MAY contain zero or more edit link relations. An entry SHOULD NOT contain more than one edit link relation with the same type attribute value."

Impacts

Notes


CategoryProposals