views:

234

answers:

2

Hi, I created RSS feed with Java Rome lib. The project is near the end. But I found some strange behavior of RSS clients.

I think it's more RSS clients problem, but i wont to make sure.

Rome holds items in List, so latest items are in the end of the list. I opened my feed I rss clients (Firefox and RSS Bandit) and I found there are in reversed order (technically it's chronological, but reversed compared to that which I used to).

I thought it's rss clients bug (I usually use Google Reader), but I checked some feeds on the Internet and saw that reason that they display correctly is they have reverse ordered items (oldest on the top).

But XML parsers shouldn't rely on nodes order. Why RSS clients use items order instead of dates for sorting nodes?

And the most important should I reorder my items list?

//edit: I found easy solution:

     entries.add(0,entry); // :-)

But question about "correct" clients behavior stays actual.

+2  A: 

One of the underlying problems of RSS is that there really isn't a single standard whose field usage is well-defined. I would worry much more about what clients and servers actually seem to do, not what you think a spec theoretically tells them to do...

Neil Coffey
A: 

I have a question: doesn't its a client issue, and are you publishing the date properly for each item. Ideally the clients should sort using the Pub Date and each item should have a GUID for the clients to identify it properly.

Priyank Bolia
I checked few feeds on the Internet all are revers sorted. I think clients ignore dates.this is my node: <entry> <title>Utworzono nową grupę</title> <author> <name /> </author> <updated>2009-12-02T09:29:59Z</updated> <published>2009-12-02T09:29:59Z</published> <summary type="text">Obserwuję teraz grupę: a</summary> <dc:date>2009-12-02T09:29:59Z</dc:date> </entry>I think date is in correct format (I think Rome lib works correct). Revers sorting items solved problem.
Maciek Sawicki
I disagree, the stackoverflow is not reverse sorted, nor do many sites: http://stackoverflow.com/feeds/question/1830580
Priyank Bolia
to me reverse sorting looks like a workaround, not a solution
Priyank Bolia
ok I checked it again. I think This is really very little difference. Notifications fill be work in both cases (i think this is done withe simple diff). Only difference is order in Firefox feed preview (but nobody use it anyway).
Maciek Sawicki