Introduction
Atom is an XML format for lists of items that change over time, such as weblogs and news, published as RFC 4287
(December 2005, Standards Track). An Atom Feed Document is identified by the media type
application/atom+xml; the common file names are atom.xml, feed.atom and feed.xml. The namespace is http://www.w3.org/2005/Atom.
Structure
Documents must be well-formed XML. The root of a feed document is atom:feed; an atom:entry may also be a whole document (section 4.1.2).
<feed xmlns="http://www.w3.org/2005/Atom">
<title>Example Feed</title>
<link href="http://example.org/"/>
<link rel="self" href="http://example.org/feed.atom"/>
<updated>2003-12-13T18:30:02Z</updated>
<author><name>John Doe</name></author>
<id>urn:uuid:60a76c80-d399-11d9-b93C-0003939e0af6</id>
<entry>
<title>Atom-Powered Robots Run Amok</title>
<link href="http://example.org/2003/12/13/atom03"/>
<id>urn:uuid:1225c695-cfb8-4ebb-aaaa-80da344efa6a</id>
<updated>2003-12-13T18:30:02Z</updated>
<summary>Some text.</summary>
</entry>
</feed>
atom:feed (section 4.1.1)
- MUST contain exactly one
id, onetitleand oneupdated. - MUST contain one or more
authorelements, unless all its entries contain at least one. - SHOULD contain one
linkwithrel="self", the preferred URI for retrieving the feed. - MUST NOT contain more than one
generator,icon,logo,rightsorsubtitle, nor more than onelinkwithrel="alternate"of the same type and hreflang. - MAY contain any number of
categoryandcontributorelements. - Entries with the same
idrepresent the same entry; theirupdatedtimestamps SHOULD differ.
atom:entry (section 4.1.2)
- MUST contain exactly one
id, onetitleand oneupdated. - MUST contain one or more
authorelements, unless itssourceor the feed contains one. - With no
content, MUST contain at least onelinkwithrel="alternate". - MUST contain a
summaryif itscontenthas asrcattribute, or its content is Base64-encoded. - MUST NOT contain more than one
content,published,rights,sourceorsummary.
Constructs (section 3)
- Text (
title,subtitle,summary,rights):typeistext(default),htmlorxhtml; text and html MUST NOT contain child elements (html markup escaped); xhtml MUST be a singlediv. - Person (
author,contributor): exactly onename; optionally oneuriand oneemail. - Date (
updated,published): an RFC 3339 date-time with an upper-caseTbetween date and time and an upper-caseZwhen there is no numeric offset; no white space. id: an IRI, compared character by character, never changed.link: anhrefis required;reldefaults toalternateand must not be empty.
In the explorer
A file with the extension .atom opens here, and so does an .xml file whose root element is feed in the Atom namespace. Any other
.xml file, including a feed element in no namespace, opens as XML as before. The view is the XML tree with an Entries tab (title, link,
updated and id) and a Problems tab. Each rule above is checked and each failure is a problem that names the section of the RFC. Nothing is fetched; signatures and
encryption (RFC 4287 section 5) are not verified.
Not described
Known, not yet covered
- Reference: the Atom Publishing Protocol and the extension mechanisms (RFC 4287 section 6), the
category,sourceandgeneratorelements in detail, and the digital signature and encryption section. - Viewer: an
atom:idis checked for a scheme only, not for the full IRI grammar;contentof non-text types is not decoded; the date check is a shape test, not a calendar check. - Viewer: a standalone Atom Entry Document (root
atom:entry) is read by the same rules if it is dropped under .atom, but is not recognised by content under .xml.
Links
Reference
- RFC 4287: The Atom Syndication Format – the standard