This document specifies Atom, an XML-based Web content and metadata syndication format.  Atom is an XML-based document format that describes lists of related information known as "feeds". Feeds are composed of a number of items, known as "entries", each with an extensible set of attached metadata. For example, each entry has a title. The primary use case that Atom addresses is the syndication of Web content such as weblogs and news headlines to Web sites as well as directly to user agents. A brief, single-entry Atom Feed Document: A more extensive, single-entry Atom Feed Document: <?xml version="1.0" encoding="utf-8"?> <feed xmlns="http://www.w3.org/2005/Atom"> <title type="text">dive into mark</title> <subtitle type="html"> A &lt;em&gt;lot&lt;/em&gt; of effort went into making this effortless </subtitle> <updated>2005-07-31T12:29:29Z</updated> <id>tag:example.org,2003:3</id> <link rel="alternate" type="text/html" hreflang="en" href="http://example.org/"/> <link rel="self" type="application/atom+xml" href="http://example.org/feed.atom"/> <rights>Copyright (c) 2003, Mark Pilgrim</rights> <generator uri="http://www.example.com/" version="1.0"> Example Toolkit </generator> <entry> <title>Atom draft-07 snapshot</title> <link rel="alternate" type="text/html" href="http://example.org/2005/04/02/atom"/> <link rel="enclosure" type="audio/mpeg" length="1337" href="http://example.org/audio/ph34r_my_podcast.mp3"/> <id>tag:example.org,2003:3.2397</id> <updated>2005-07-31T12:29:29Z</updated> <published>2003-12-13T08:29:29-04:00</published> <author> <name>Mark Pilgrim</name> <uri>http://example.org/</uri> <email>f8dy@example.com</email> </author> <contributor> <name>Sam Ruby</name> </contributor> <contributor> <name>Joe Gregorio</name> </contributor> <content type="xhtml" xml:lang="en" xml:base="http://diveintomark.org/"> <div xmlns="http://www.w3.org/1999/xhtml"> <p><i>[Update: The Atom draft is finished.]</i></p> </div> </content> </entry> </feed> The XML Namespaces URI [W3C. REC-xml-names-19990114] for the XML data format described in this specification is: For convenience, this data format may be referred to as "Atom 1.0". This specification uses "Atom" internally. This specification describes conformance in terms of two artifacts: Atom Feed Documents and Atom Entry Documents. Additionally, it places some requirements on Atom Processors. This specification uses the namespace prefix "atom:" for the Namespace URI identified in Section 1.2, above. Note that the choice of namespace prefix is arbitrary and not semantically significant. Atom is specified using terms from the XML Infoset [W3C. REC-xml-infoset-20040204]. However, this specification uses a shorthand for two common terms: the phrase "Information Item" is omitted when naming Element Information Items and Attribute Information Items. Therefore, when this specification uses the term "element," it is referring to an Element Information Item in Infoset terms. Likewise, when it uses the term "attribute," it is referring to an Attribute Information Item. Some sections of this specification are illustrated with fragments of a non-normative RELAX NG Compact schema [RELAX-NG]. However, the text of this specification provides the definition of conformance. A complete schema appears in Appendix B. The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in BCP 14, [RFC2119], as scoped to those conformance targets.  Many of Atom's elements share a few common structures. This section defines those structures and their requirements for convenient reference by the appropriate element definitions. When an element is identified as being a particular kind of construct, it inherits the corresponding requirements from that construct's definition in this section. Note that there MUST NOT be any white space in a Date construct or in any IRI. Some XML-emitting implementations erroneously insert white space around values by default, and such implementations will emit invalid Atom Documents.  Text Constructs Text constructs MAY have a "type" attribute. When present, the value MUST be one of "text", "html", or "xhtml". If the "type" attribute is not provided, Atom Processors MUST behave as though it were present with a value of "text". Unlike the atom:content element defined in Section 4.1.3, MIME media types [MIMEREG] MUST NOT be used as values for the "type" attribute on Text constructs. Example atom:title with text content: ... <title type="text"> Less: &lt; </title> ... If the value is "text", the content of the Text construct MUST NOT contain child elements. Such text is intended to be presented to humans in a readable fashion. Thus, Atom Processors MAY collapse white space (including line breaks) and display the text using typographic techniques such as justification and proportional fonts. ... <title type="html"> Less: &lt;em> &amp;lt; &lt;/em> </title> ... If the value of "type" is "html", the content of the Text construct MUST NOT contain child elements and SHOULD be suitable for handling as HTML [HTML]. Any markup within MUST be escaped; for example, "<br>" as "&lt;br>". HTML markup within SHOULD be such that it could validly appear directly within an HTML <DIV> element, after unescaping. Atom Processors that display such content MAY use that markup to aid in its display. Example atom:title with XHTML content: ... <title type="xhtml" xmlns:xhtml="http://www.w3.org/1999/xhtml"> <xhtml:div> Less: <xhtml:em> &lt; </xhtml:em> </xhtml:div> </title> ... If the value of "type" is "xhtml", the content of the Text construct MUST be a single XHTML div element [XHTML] and SHOULD be suitable for handling as XHTML. The XHTML div element itself MUST NOT be considered part of the content. Atom Processors that display the content MAY use the markup to aid in displaying it. The escaped versions of characters such as "&" and ">" represent those characters, not markup. ... <summary type="xhtml"> <div xmlns="http://www.w3.org/1999/xhtml"> This is <b>XHTML</b> content. </div> </summary> ... <summary type="xhtml"> <xhtml:div xmlns:xhtml="http://www.w3.org/1999/xhtml"> This is <xhtml:b>XHTML</xhtml:b> content. </xhtml:div> </summary> ... The following example assumes that the XHTML namespace has been bound to the "xh" prefix earlier in the document:  A Person construct is an element that describes a person, corporation, or similar entity (hereafter, 'person'). This specification assigns no significance to the order of appearance of the child elements in a Person construct. Person constructs allow extension Metadata elements (see Section 6.4). The "atom:name" element's content conveys a human-readable name for the person. The content of atom:name is Language-Sensitive. Person constructs MUST contain exactly one "atom:name" element. The "atom:uri" element's content conveys an IRI associated with the person. Person constructs MAY contain an atom:uri element, but MUST NOT contain more than one. The content of atom:uri in a Person construct MUST be an IRI reference [RFC3987]. The "atom:email" element's content conveys an e-mail address associated with the person. Person constructs MAY contain an atom:email element, but MUST NOT contain more than one. Its content MUST conform to the "addr-spec" production in [RFC2822]. A Date construct is an element whose content MUST conform to the "date-time" production in [RFC3339]. In addition, an uppercase "T" character MUST be used to separate date and time, and an uppercase "Z" character MUST be present in the absence of a numeric time zone offset. This specification assigns no significance to the order of atom:entry elements within the feed. The following child elements are defined by this specification (note that the presence of some of these elements is required): • atom:feed elements MUST contain one or more atom:author elements, unless all of the atom:feed element's child atom:entry elements contain at least one atom:author element. • atom:feed elements MAY contain any number of atom:category elements. • atom:feed elements MAY contain any number of atom:contributor elements. • atom:feed elements MUST NOT contain more than one atom:generator element. • atom:feed elements MUST NOT contain more than one atom:icon element. • atom:feed elements MUST NOT contain more than one atom:logo element. • atom:feed elements MUST contain exactly one atom:id element. • atom:feed elements SHOULD contain one atom:link element with a rel attribute value of "self". This is the preferred URI for retrieving Atom Feed Documents representing this Atom feed. • atom:feed elements MUST NOT contain more than one atom:link element with a rel attribute value of "alternate" that has the same combination of type and hreflang attribute values. • atom:feed elements MAY contain additional atom:link elements beyond those described above. • atom:feed elements MUST NOT contain more than one atom:rights element. • atom:feed elements MUST NOT contain more than one atom:subtitle element. • atom:feed elements MUST contain exactly one atom:title element. • atom:feed elements MUST contain exactly one atom:updated element.  Experience teaches that feeds that contain textual content are in general more useful than those that do not. Some applications (one example is full-text indexers) require a minimum amount of text or (X)HTML to function reliably and predictably. Feed producers should be aware of these issues. It is advisable that each atom:entry element contain a non-empty atom:title element, a non-empty atom:content element when that element is present, and a non-empty atom:summary element when the entry contains no atom:content element. However, the absence of atom:summary is not an error, and Atom Processors MUST NOT fail to function correctly as a consequence of such an absence. The "atom:entry" element represents an individual entry, acting as a container for metadata and data associated with the entry. This element can appear as a child of the atom:feed element, or it can appear as the document (i.e., top-level) element of a stand-alone Atom Entry Document. This specification assigns no significance to the order of appearance of the child elements of atom:entry. The following child elements are defined by this specification (note that it requires the presence of some of these elements): • atom:entry elements MUST contain one or more atom:author elements, unless the atom:entry contains an atom:source element that contains an atom:author element or, in an Atom Feed Document, the atom:feed element contains an atom:author element itself. • atom:entry elements MAY contain any number of atom:category elements. • atom:entry elements MUST NOT contain more than one atom:content element. • atom:entry elements MAY contain any number of atom:contributor elements. • atom:entry elements MUST contain exactly one atom:id element. • atom:entry elements that contain no child atom:content element MUST contain at least one atom:link element with a rel attribute value of "alternate". • atom:entry elements MUST NOT contain more than one atom:link element with a rel attribute value of "alternate" that has the same combination of type and hreflang attribute values. • atom:entry elements MAY contain additional atom:link elements beyond those described above. • atom:entry elements MUST NOT contain more than one atom:published element. • atom:entry elements MUST NOT contain more than one atom:rights element. • atom:entry elements MUST NOT contain more than one atom:source element. • atom:entry elements MUST contain an atom:summary element in either of the following cases: • the atom:entry contains an atom:content that has a "src" attribute (and is thus empty). • the atom:entry contains content that is encoded in Base64; i.e., the "type" attribute of atom:content is a MIME media type [MIMEREG], but is not an XML media type [RFC3023], does not begin with "text/", and does not end with "/xml" or "+xml". • atom:entry elements MUST NOT contain more than one atom:summary element. • atom:entry elements MUST contain exactly one atom:title element. • atom:entry elements MUST contain exactly one atom:updated element. The "atom:content" element either contains or links to the content of the entry. The content of atom:content is Language-Sensitive.  On the atom:content element, the value of the "type" attribute MAY be one of "text", "html", or "xhtml". Failing that, it MUST conform to the syntax of a MIME media type, but MUST NOT be a composite type (see Section 4.2.6 of [MIMEREG]). If neither the type attribute nor the src attribute is provided, Atom Processors MUST behave as though the type attribute were present with a value of "text". atom:content MAY have a "src" attribute, whose value MUST be an IRI reference [RFC3987] . If the "src" attribute is present, atom:content MUST be empty. Atom Processors MAY use the IRI to retrieve the content and MAY choose to ignore remote content or to present it in a different manner than local content. If the "src" attribute is present, the "type" attribute SHOULD be provided and MUST be a MIME media type [MIMEREG], rather than "text", "html", or "xhtml". The value is advisory; that is to say, when the corresponding URI (mapped from an IRI, if necessary) is dereferenced, if the server providing that content also provides a media type, the server-provided media type is authoritative.  Atom Documents MUST conform to the following rules. Atom Processors MUST interpret atom:content according to the first applicable rule. 1. If the value of "type" is "text", the content of atom:content MUST NOT contain child elements. Such text is intended to be presented to humans in a readable fashion. Thus, Atom Processors MAY collapse white space (including line breaks), and display the text using typographic techniques such as justification and proportional fonts. 2. If the value of "type" is "html", the content of atom:content MUST NOT contain child elements and SHOULD be suitable for handling as HTML [HTML]. The HTML markup MUST be escaped; for example, "<br>" as "&lt;br>". The HTML markup SHOULD be such that it could validly appear directly within an HTML <DIV> element. Atom Processors that display the content MAY use the markup to aid in displaying it. 3. If the value of "type" is "xhtml", the content of atom:content MUST be a single XHTML div element [XHTML] and SHOULD be suitable for handling as XHTML. The XHTML div element itself MUST NOT be considered part of the content. Atom Processors that display the content MAY use the markup to aid in displaying it. The escaped versions of characters such as "&" and ">" represent those characters, not markup. 4. If the value of "type" is an XML media type [RFC3023] or ends with "+xml" or "/xml" (case insensitive), the content of atom:content MAY include child elements and SHOULD be suitable for handling as the indicated media type. If the "src" attribute is not provided, this would normally mean that the "atom:content" element would contain a single child element that would serve as the root element of the XML document of the indicated type. 5. If the value of "type" begins with "text/" (case insensitive), the content of atom:content MUST NOT contain child elements. 6. For all other values of "type", the content of atom:content MUST be a valid Base64 encoding, as described in [RFC3548], Section 3. When decoded, it SHOULD be suitable for handling as the indicated media type. In this case, the characters in the Base64 encoding MAY be preceded and followed in the atom:content element by white space, and lines are separated by a single newline (U+000A) character. XHTML inline: ... <content type="xhtml"> <div xmlns="http://www.w3.org/1999/xhtml"> This is <b>XHTML</b> content. </div> </content> ... <content type="xhtml"> <xhtml:div xmlns:xhtml="http://www.w3.org/1999/xhtml"> This is <xhtml:b>XHTML</xhtml:b> content. </xhtml:div> </content> ... The following example assumes that the XHTML namespace has been bound to the "xh" prefix earlier in the document:  Metadata Elements The "atom:author" element is a Person construct that indicates the author of the entry or feed. atomAuthor = element atom:author { atomPersonConstruct } If an atom:entry element does not contain atom:author elements, then the atom:author elements of the contained atom:source element are considered to apply. In an Atom Feed Document, the atom:author elements of the containing atom:feed element are considered to apply to the entry if there are no atom:author elements in the locations described above. The "atom:category" element conveys information about a category associated with an entry or feed. This specification assigns no meaning to the content (if any) of this element.  The "term" attribute is a string that identifies the category to which the entry or feed belongs. Category elements MUST have a "term" attribute. The "scheme" attribute is an IRI that identifies a categorization scheme. Category elements MAY have a "scheme" attribute. The "label" attribute provides a human-readable label for display in end-user applications. The content of the "label" attribute is Language-Sensitive. Entities such as "&amp;" and "&lt;" represent their corresponding characters ("&" and "<", respectively), not markup. Category elements MAY have a "label" attribute. The content of this element, when present, MUST be a string that is a human-readable name for the generating agent. Entities such as "&amp;" and "&lt;" represent their corresponding characters ("&" and "<" respectively), not markup. The atom:generator element MAY have a "uri" attribute whose value MUST be an IRI reference [RFC3987] . When dereferenced, the resulting URI (mapped from an IRI, if necessary) SHOULD produce a representation that is relevant to that agent. The atom:generator element MAY have a "version" attribute that indicates the version of the generating agent. The "atom:icon" element's content is an IRI reference [RFC3987] that identifies an image that provides iconic visual identification for a feed. atomIcon = element atom:icon { atomCommonAttributes, (atomUri) } The image SHOULD have an aspect ratio of one (horizontal) to one (vertical) and SHOULD be suitable for presentation at a small size. The "atom:id" element conveys a permanent, universally unique identifier for an entry or feed. atomId = element atom:id { atomCommonAttributes, (atomUri) } Its content MUST be an IRI, as defined by [RFC3987] . Note that the definition of "IRI" excludes relative references. Though the IRI might use a dereferencable scheme, Atom Processors MUST NOT assume it can be dereferenced. When an Atom Document is relocated, migrated, syndicated, republished, exported, or imported, the content of its atom:id element MUST NOT change. Put another way, an atom:id element pertains to all instantiations of a particular Atom entry or feed; revisions retain the same content in their atom:id elements. It is suggested that the atom:id element be stored along with the associated resource. The content of an atom:id element MUST be created in a way that assures uniqueness. Because of the risk of confusion between IRIs that would be equivalent if they were mapped to URIs and dereferenced, the following normalization strategy SHOULD be applied when generating atom:id elements: • Provide the scheme in lowercase characters. • Provide the host, if any, in lowercase characters. • Only perform percent-encoding where it is essential. • Use uppercase A through F characters when percent-encoding. • Prevent dot-segments from appearing in paths. • For schemes that define a default authority, use an empty authority if the default is desired. • For schemes that define an empty path to be equivalent to a path of "/", use "/". • For schemes that define a port, use an empty port if the default is desired. • Preserve empty fragment identifiers and queries. • Ensure that all components of the IRI are appropriately character normalized, e.g., by using NFC or NFKC. Instances of atom:id elements can be compared to determine whether an entry or feed is the same as one seen before. Processors MUST compare atom:id elements on a character-by-character basis (in a case-sensitive fashion). Comparison operations MUST be based solely on the IRI character strings and MUST NOT rely on dereferencing the IRIs or URIs mapped from them. As a result, two IRIs that resolve to the same resource but are not character-for-character identical will be considered different for the purposes of identifier comparison. For example, these are four distinct identifiers, despite the fact that they differ only in case:  The "atom:link" element defines a reference from an entry or feed to a Web resource. This specification assigns no meaning to the content (if any) of this element.
Atom REF (or RSS [5] ) is an XML-based file format that allows lists of information, known as "feeds", to be synchronized between publishers and consumers.
The Atom Syndication Format