LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 02-20-2010, 07:14 PM   #1
CoderMan
Member
 
Registered: Jan 2009
Location: Gemini Capsule 25164
Distribution: Gentoo
Posts: 375
Blog Entries: 24

Rep: Reputation: 43
Question Minimalistic but legal atom feed?


Hi. I want to create my own Atom feed file covering some informational posts on a web page. I will maintain it by hand, so I would prefer it to be as minimalistic a file as possible, yet still a valid Atom file.

This is the pattern of what I have at the moment:

Code:
<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
    <title>Gentoo Cluster Project</title>
    <link type="text/html" href="http://www.indicium.us/cgi-bin/pages/get?view=cluster" />
    <link rel="self" type="application/atom+xml" href="http://www.indicium.us/feeds/gentoo.atom.xml" />
    <updated>2010-02-20T01:04:04Z</updated>
    <subtitle>Building a Beowulf-Style Cluster Using Gentoo Linux</subtitle>

<entry>
    <title>2010-02-09</title>
    <link type="text/html" href="http://www.indicium.us/cgi-bin/pages/get?view=cluster#2010-02-09" />
</entry>
<entry>
    <title>2010-02-10</title>
    <link type="text/html" href="http://www.indicium.us/cgi-bin/pages/get?view=cluster#2010-02-10" />
</entry>
<entry>
    <title>2010-02-14</title>
    <link type="text/html" href="http://www.indicium.us/cgi-bin/pages/get?view=cluster#2010-02-14" />
</entry>
<entry>
    <title>2010-02-17</title>
    <link type="text/html" href="http://www.indicium.us/cgi-bin/pages/get?view=cluster#2010-02-17" />
</entry>
<entry>
    <title>2010-02-20</title>
    <link type="text/html" href="http://www.indicium.us/cgi-bin/pages/get?view=cluster#2010-02-20" />
</entry>
</feed>
Is this valid Atom, or are there any more /required/ elements?

I found Atom specification documents online, but there was so much information I felt like a rowboat on the Pacific ocean. I did not find a specific section declaring exactly what /had/ to be in a Atom feed file.
 
Old 02-21-2010, 03:21 PM   #2
paulsm4
LQ Guru
 
Registered: Mar 2004
Distribution: SusE 8.2
Posts: 5,863
Blog Entries: 1

Rep: Reputation: Disabled
Hi -

It certainly *looks* reasonable. I thought id's were *required* .. but perhaps not...

Q: Have you tried this feed with a few readers, and does it seem to work?

Q: Any reason you don't have an "<updated>" element in your "entry's"? Or use "<author>" elements? (it should still be fine without them, however). Or, for that matter, id's?

'Hope that helps .. PSM

PS:
What does the W3C validator say?
http://validator.w3.org/feed/
 
Old 02-21-2010, 03:23 PM   #3
Telemachos
Member
 
Registered: May 2007
Distribution: Debian
Posts: 754

Rep: Reputation: 60
Don't guess or eyeball it, validate it: http://validator.w3.org/feed/

Long story short: The validator fails it. Id is a required element (for the feed as a whole and for each element of the feed).

http://www.atomenabled.org/developers/syndication/

Last edited by Telemachos; 02-21-2010 at 03:39 PM.
 
1 members found this post helpful.
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Minimalistic Linux Help shumi Linux - Distributions 3 12-20-2009 11:43 AM
Looking for RSS & Atom Feed (News Feed)? suse2166 Linux - Software 2 11-16-2006 04:58 PM
Minimalistic Moogey LQ Suggestions & Feedback 14 10-31-2005 10:22 AM
Atom/RSS generator, valid feed? theYinYeti Programming 8 06-07-2005 10:01 AM
Atom Feed added to LinuxQuestions.org jeremy LQ Suggestions & Feedback 3 07-10-2004 10:55 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 06:27 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration