Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Correct/Accepted Way to Update an ATOM Entry

Tags:

php

xml

atom-feed

What's to "correct" way to indicate an entry in an ATOM feed is updated?

By "correct" I mean fits into existing specifications and something feed readers will notice and mark as new/unread.

All the specifications I've found say there's support for an updated node. However, when I try something like this

<entry>
    <title>Ipv4 For Sale</title>
    <link href="http://tech.slashdot.org/story/12/05/24/1526258/sales-of-unused-ipv4-addresses-gaining-steam"/>
    <id>urn:uuid:0fd0a227-1be0-bce4-9f53-8c47bf682eb7</id>
    <updated>2012-05-24T15:18:19-07:00</updated>
    <published>2012-05-24T13:11:37-07:00</published>
    <summary type="html"><![CDATA[<p>Web Content Here</p>]]></summary>
</entry>

my feed reader will display the new content, but it will NOT mark the item as new/unread. I'm using NetNewsWire which is both a mainstream feed reader, and has a setting to "Mark as Unread" any "Updated" items.

There's a few other Stack Overflow questions on this subject, and while the ones I read confirm the behavior I've described above, none (seem to?) provide a solution.

Is there a way to do this, or is the "correct" thing to post a completely new entry?

Using PHP's DATE_ATOM constant to generate the feed dates, if that matters.

like image 768
Alan Storm Avatar asked May 24 '12 22:05

Alan Storm


1 Answers

The specification document states that if an item is republished (i.e. updated), its id may not change. So if a reader provides a feature that marks items unread when their atom:updated field changes, and it subsequently doesn't do that, it would seem this is a software bug :)

On the site of the mentioned news reader I found an update, though pretty old, that might fix what you're experiencing: http://netnewswireapp.com/netnewswire-3-2-14-syncing-sorting-fixes

like image 176
Ja͢ck Avatar answered Oct 21 '22 15:10

Ja͢ck