This is not necessarily about Abdera, but about the Atom Publishing Protocol in 
general regarding entry Ids.  I know there are some people on the mailing list 
who have developed their sites using Abdera and Atom.  Are you storing the 
Entry Ids in a database or other structure?  I was wondering how exactly to 
handle editing a resource.

I guess I am wondering how to ensure that the link during an edit of a resource 
is infact that Entry itself the client is trying to edit.

Taken from an article online just for reference:

               
PUT /blog/entries/1 HTTP/1.1
Host: example.org
Content-Type: application/atom+xml; charset=utf-8
Content-Length: nnnn
If-Match: "/blog/entries/1?1"
If-Unmodified-Since: Sat, 12 Aug 2006 13:40:03 GMT

<?xml version="1.0" ?>
<entry xmlns="http://www.w3.org/2005/Atom"; >
  <id>tag:example.org,2006:/blog/entries/1</id>
  <title>Atom-Powered Robots Run Crazy</title>
  <link href="http://example.org/2003/12/13/atom03"/>
  <link rel="edit" href="http://example.org/blog/entries/1"; />
  <updated>2006-08-12T13:40:03Z</updated>
  <author><name>John</name></author>
  <summary>Some different text.</summary>
</entry>



How should it know that 

/blog/entries/1
 and the entry 


<id>tag:example.org,2006:/blog/entries/1</id>
 
Mean the same? In this case the Id happens to be the URL of the entry but from 
what I have read the id does not have to be any part of the URL.  If someone 
were to do a PUT to the same URL but with this ID (2007 instead of 2008)

<id>tag:example.org,2007:/blog/entries/1</id>
 Does it overwrite the id?  



       
---------------------------------
Be a better friend, newshound, and know-it-all with Yahoo! Mobile.  Try it now.

Reply via email to