| Network Working Group | M. Nottingham, Editor |
| INTERNET DRAFT | R. Sayre, Editor |
| <draft-ietf-atompub-format-07> | March 2005 |
| Category: Informational | |
| Expires: September 2005 |
The Atom Syndication Format
draft-ietf-atompub-format-07
This document is an Internet-Draft and is subject to all provisions of section 3 of RFC 3667. By submitting this Internet-Draft, each author represents that any applicable patent or other IPR claims of which he or she is aware have been or will be disclosed, and any of which he or she become aware will be disclosed, in accordance with RFC 3668.
Internet-Drafts are working documents of the Internet Engineering Task Force (IETF), its areas, and its working groups. Note that other groups may also distribute working documents as Internet-Drafts.
Internet-Drafts are draft documents valid for a maximum of six months and may be updated, replaced, or obsoleted by other documents at any time. It is inappropriate to use Internet-Drafts as reference material or to cite them other than as “work in progress”.
The list of current Internet-Drafts can be accessed at <http://www.ietf.org/ietf/1id-abstracts.txt>.
The list of Internet-Draft Shadow Directories can be accessed at <http://www.ietf.org/shadow.html>.
This Internet-Draft will expire in September 2005.
Copyright © The Internet Society (2005). All Rights Reserved.
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. However, nothing precludes it from being used for other purposes and kinds of content.
A minimal, single-entry Atom Feed Document:
<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://purl.org/atom/ns#draft-ietf-atompub-format-07">
<title>Example Feed</title>
<link href="http://example.org/"/>
<updated>2003-12-13T18:30:02Z</updated>
<author>
<name>John Doe</name>
</author>
<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>
<content>Some text.</content>
</entry>
</feed>
A more extensive, single-entry Atom Feed Document:
<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://purl.org/atom/ns#draft-ietf-atompub-format-07">
<title type="text">dive into mark</title>
<subtitle type="html">
A <em>lot</em> of effort
went into making this effortless
</subtitle>
<updated>2005-04-02T12:29:29Z</updated>
<id>tag:example.org,2003:3</id>
<link rel="alternate" type="text/html"
hreflang="en" href="http://example.org/"/>
<copyright>Copyright (c) 2003, Mark Pilgrim</copyright>
<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-04-02T12: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>
<uri>http://intertwingly.net/blog/</uri>
</contributor>
<contributor>
<name>Joe Gregorio</name>
<uri>http://bitworking.org/</uri>
</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-07 snapshot is out.]</i></p>
</div>
</content>
</entry>
</feed> 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 XML Namespaces [W3C.REC-xml-names-19990114] to uniquely identify XML element names. It uses the following namespace prefix for the indicated namespace URI;
"atom": http://purl.org/atom/ns#draft-ietf-atompub-format-07
Note that the choice of any 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 collected schema appears in Appendix B.
Some sections of this specification are illustrated with Augmented Backus-Naur Form (ABNF), a format used to represent permissible strings in a protocol or language, as defined in [RFC2234].
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.
This specification describes two kinds of Atom Documents; Atom Feed Documents and Atom Entry Documents.
An Atom Feed Document is a representation of an Atom feed, including metadata about the feed, and some or all of the entries associated with it. Its root is the atom:feed element.
An Atom Entry Document represents exactly one Atom entry, outside of the context of an Atom feed. Its root is the atom:entry element.
namespace atom = "http://purl.org/atom/ns#draft-ietf-atompub-format-07" start = atomFeed | atomEntry
Both kinds of Atom documents are specified in terms of the XML Information Set, serialised as XML 1.0 [W3C.REC-xml-20040204] and identified with the "application/atom+xml" media type. Atom Documents MUST be well-formed XML.
Atom constrains the appearance and content of elements and attributes; unless otherwise stated, Atom Documents MAY contain other Information Items as appropriate.
Any element defined by this specification MAY have an xml:base attribute. XML Base [W3C.REC-xmlbase-20010627] processing MUST be applied to any relative reference [RFC3987] present in an Atom Document. This includes such elements and attributes as specified by Atom itself, as well as those specified by extensions to Atom.
Any element defined by this specification MAY have an xml:lang attribute, whose content indicates the natural language for the element and its children. The language context is only significant for elements and attributes declared to be "language-sensitive" by this specification. Requirements regarding the content and interpretation of xml:lang are specified in XML 1.0 [W3C.REC-xml-20040204], Section 2.12.
atomCommonAttributes =
attribute xml:base { atomUri }?,
attribute xml:lang { atomLanguageTag }? Atom allows the use of IRIs [RFC3987], as well as URIs [RFC3986]. For resolution, IRIs can easily be converted to URIs. When comparing IRIs serving as atom:id values, they MUST NOT be converted to URIs. By definition, every URI is an IRI, so any URI can be used where an IRI is needed.
Atom is an extensible format. See the section titled 'Extending Atom' later in this document for a full description of how Atom Documents can be extended.
Atom Processors MAY keep state (e.g., metadata in atom:feed, entries) sourced from Atom Feed Documents and combine them with other Atom Feed Documents, in order to facilitate a contiguous view of the contents of a feed. The manner in which Atom Feed Documents are combined in order to reconstruct a feed (e.g., updating entries and metadata, dealing with missing entries) is out of the scope of this specification, but may be defined by an extension to Atom.
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.
A Text construct contains human-readable text, usually in small quantities. The content of Text constructs is language-sensitive.
atomPlainTextConstruct =
atomCommonAttributes,
attribute type { "text" | "html" }?,
text
atomXHTMLTextConstruct =
atomCommonAttributes,
attribute type { "xhtml" },
xhtmlDiv
atomTextConstruct = atomPlainTextConstruct | atomXHTMLTextConstruct 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".
Note that MIME media types [RFC2045] are not acceptable values for the "type" attribute.
Example atom:title with text content:
... <title type="text"> Less: < </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 display it using normal text rendering techniques such as proportional fonts, white-space collapsing, and justification.
Example atom:title with HTML content:
... <title type="html"> Less: <em> &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 [W3C.REC-html401-19991224]. Any markup within MUST be escaped; for example, "<br>" as "<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> < </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 [W3C.REC-xhtml-basic-20001219]. The XHTML div MUST contain XHTML text and markup that could validly appear within an XHTML div element. The XHTML div element itself MUST NOT be considered part of the content. Atom Processors which display the content MAY use the markup to aid in displaying it. Escaped characters, such as "&" and ">", represent those characters, not markup.
Examples of valid XHTML content:
...
<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:
...
<summary type="xhtml">
<xh:div>
This is <xh:b>XHTML</xh:b> content.
</xh:div>
</summary>
... A Person construct is an element that describes a person, corporation, or similar entity (hereafter, 'person').
atomPersonConstruct =
atomCommonAttributes,
(element atom:name { text }
& element atom:uri { atomUri }?
& element atom:email { atomEmailAddress }?
& extensionElement*) 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 BNF rule in [RFC2822].
A Date construct is an element whose content MUST conform to the extended date-time form ABNF rule 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.
atomDateConstruct = atomCommonAttributes, xsd:dateTime
Such date values happen to be compatible with the following specifications: [ISO.8601.1988], [W3C.NOTE-datetime-19980827], and [W3C.REC-xmlschema-2-20041028].
Date values SHOULD be as accurate as possible. For example, it would be generally inappropriate for a publishing system to apply the same timestamp to several entries which were published during the course of a single day.
The "atom:feed" element is the document (i.e., top-level) element of an Atom Feed Document, acting as a container for metadata and data associated with the feed. Its element children consist of metadata elements followed by zero or more atom:entry child elements.
atomFeed =
element atom:feed {
atomCommonAttributes,
(atomAuthor?
& atomCategory*
& atomContributor*
& atomCopyright?
& atomGenerator?
& atomIcon?
& atomId?
& atomImage?
& atomLink+
& atomSubtitle?
& atomTitle
& atomUpdated
& extensionElement*),
atomEntry*
} 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):
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 standalone Atom Entry Document.
atomEntry =
element atom:entry {
atomCommonAttributes,
(atomAuthor?
& atomCategory*
& atomContent?
& atomContributor*
& atomCopyright?
& atomId
& atomLink*
& atomPublished?
& atomSource?
& atomSummary?
& atomTitle
& atomUpdated
& extensionElement*)
} 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):
The "atom:content" element either contains or links to the content of the entry. The content of atom:content is language-sensitive.
atomInlineTextContent =
element atom:content {
atomCommonAttributes,
attribute type { "text" | "html" }?,
(text)*
}
atomInlineXHTMLContent =
element atom:content {
atomCommonAttributes,
attribute type { "xhtml" },
xhtmlDiv
}
atomInlineOtherContent =
element atom:content {
atomCommonAttributes,
attribute type { atomMediaType }?,
(text|anyElement)*
}
atomOutOfLineContent =
element atom:content {
atomCommonAttributes,
attribute type { atomMediaType }?,
attribute src { atomUri },
empty
}
atomContent = atomInlineTextContent
| atomInlineXHTMLContent
| atomInlineOtherContent
| atomOutOfLineContent atom:content MAY have a "type" attribute. When present, the value MAY be one of "text", "html", or "xhtml". Failing that, it MUST be a MIME media type [RFC2045] with a discrete top-level type (see Section 5 of [RFC2045]). If the type attribute is not provided, Atom Processors MUST behave as though it 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 Processors MAY use the IRI to retrieve the content. If the "src" attribute is present, atom:content MUST be empty. That is to say, the content may be retrievable using "src=" IRI, or it may be contained within atom:content, but not both.
If the "src" attribute is present, the "type" attribute SHOULD be provided and MUST be a MIME media type [RFC2045], rather than "text", "html", or "xhtml". The value is advisory; that is to say, upon dereferencing the IRI to retrieve the content, if the server providing that content also provides a media type, the server-provided media type is authoritative.
If the value of type begins with "text/" or ends with "+xml", the content SHOULD be local; that is to say, no "src" attribute should be provided.
Atom Documents MUST conform to the following rules. Atom Processors MUST interpret atom:content according to the first applicable rule.
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:
...
<content type="xhtml">
<xh:div>
This is <xh:b>XHTML</xh:b> content.
</xh:div>
</content>
... The "atom:author" element is a Person construct that indicates the author of the entry or feed.
atomAuthor = element atom:author { atomPersonConstruct } The "atom:category" element conveys information about a category associated with an entry or feed.
atomCategory =
element atom:category {
atomCommonAttributes,
attribute term { text },
attribute scheme { atomUri }?,
attribute label { text }?,
empty
} 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. Category elements MAY have a "label" attribute.
The "atom:contributor" element is a Person construct that indicates a person or other entity who contributed to the entry or feed.
atomContributor = element atom:contributor { atomPersonConstruct } The "atom:copyright" element is a Text construct that conveys a human-readable copyright statement for an entry or feed.
atomCopyright = element atom:copyright { atomTextConstruct } The atom:copyright element SHOULD NOT be used to convey machine-readable licensing information.
If an atom:entry element does not contain an atom:copyright element, then the atom:copyright element of the containing atom:feed element's atom:head element, if present, is considered to apply to the entry.
The "atom:generator" element's content identifies the agent used to generate a feed, for debugging and other purposes.
atomGenerator = element atom:generator {
atomCommonAttributes,
attribute uri { atomUri }?,
attribute version { text }?,
text
} The content of this element, when present, MUST be a string that is a human-readable name for the generating agent.
The atom:generator element MAY have a "uri" attribute whose value MUST be an IRI reference [RFC3987]. When dereferenced, that IRI 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. When present, its value is unstructured text.
The "atom:icon" element's content is an IRI reference [RFC3987] which identifies an image which 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 dereferenced, the following normalization strategy is strongly encouraged when generating atom:id elements:
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.
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:
are four distinct identifiers, despite their differences in case.
Likewise,
are three distinct identifiers, because IRI %-escaping is significant for the purposes of comparison.
The "atom:image" element's content is an IRI reference [RFC3987] which identifies an image which provides visual identification for a feed.
atomImage = element atom:image {
atomCommonAttributes,
(atomUri)
} The image SHOULD have an aspect ratio of 2 (horizontal) to 1 (vertical).
The "atom:link" element is an empty element that defines a reference from an entry or feed to a Web resource.
atomLink =
element atom:link {
atomCommonAttributes,
attribute href { atomUri },
attribute rel { atomNCName | atomUri }?,
attribute type { atomMediaType }?,
attribute hreflang { atomLanguageTag }?,
attribute title { text }?,
attribute length { text }?,
empty
} The "href" attribute contains the link's IRI. atom:link elements MUST have a href attribute, whose value MUST be a IRI reference [RFC3987].
atom:link elements MAY have a "rel" attribute that indicates the link relation type. If the "rel" attribute is not present, the link element MUST be interpreted as if the link relation type is "alternate".
ABNF for the "rel" attribute:
rel_attribute = isegment-nz-nc / IRI
The value of "rel" MUST be string that is non-empty, does not contain any colon (":") characters, and matches the "isegment-nz-nc" or "IRI" ABNF forms in [RFC3987]. Note that use of a relative reference is not allowed. If a name is given, implementations MUST consider the link relation type to be equivalent to the same name registered within the IANA Registry of Link Relations Section 7, and thus the IRI that would be obtained by appending the value of the rel attribute to the string "http://www.iana.org/assignments/relation/". The value of "rel" describes the meaning of the link, but does not impose any behavioral requirements on implementations.
This document defines five initial values for the Registry of Link Relations:
<link rel="related" href="http://search.example.com/">
An identical link might appear as a child of any atom:entry whose content contains a discussion of that same search engine.The "type" attribute's value is an advisory media type; it is a hint about the type of the representation that is expected to be returned when the value of the href attribute is dereferenced. Note that the type attribute does not override the actual media type returned with the representation. Link elements MAY have a type attribute, whose value MUST conform to the syntax of a MIME media type [RFC2045].
The "hreflang" attribute's content describes the language of the resource pointed to by the href attribute. When used together with the rel="alternate", it implies a translated version of the entry. Link elements MAY have an hreflang attribute, whose value MUST be a language tag [RFC3066].
The "title" attribute conveys human-readable information about the link. The content of the "title" attribute is language sensitive. Link elements MAY have a title attribute.
The "length" attribute indicates an advisory length of the linked content in octets; it is a hint about the content length of the representation returned when the IRI in the href attribute is dereferenced. Note that the length attribute does not override the actual content length of the representation as reported by the underlying protocol. Link elements MAY have a length attribute.
The "atom:published" element is a Date construct indicating an instant in time associated with an event early in the life cycle of the entry.
atomPublished = element atom:published { atomDateConstruct } Typically, atom:published will be associated with the initial creation or first availability of the resource.
If an atom:entry is copied from one feed into another feed, then the source atom:feed's metadata (all child elements of atom:feed other than the atom:entry elements) MAY be preserved within the copied entry by adding an atom:source child element, if it is not already present in the entry, and including some or all of the source feed's metadata elements as the atom:source element's children. Such metadata SHOULD be preserved if the source atom:feed contains any of the child elements atom:author, atom:contributor, atom:copyright, or atom:category and those child elements are not present in the source atom:entry.
atomSource =
element atom:source {
atomCommonAttributes,
(atomAuthor?
& atomCategory*
& atomContributor*
& atomCopyright?
& atomGenerator?
& atomIcon?
& atomId?
& atomImage?
& atomLink+
& atomSubtitle?
& atomTitle
& atomUpdated
& extensionElement*)
} The "atom:subtitle" element is a Text construct that conveys a human-readable description or subtitle for a feed.
atomSubtitle = element atom:subtitle { atomTextConstruct } The "atom:summary" element is a Text construct that conveys a short summary, abstract or excerpt of an entry.
atomSummary = element atom:summary { atomTextConstruct } The "atom:title" element is a Text construct that conveys a human-readable title for an entry or feed.
atomTitle = element atom:title { atomTextConstruct } The "atom:updated" element is a Date construct indicating the most recent instant in time when an entry or feed was modified in a way the publisher considers significant. Therefore, not all modifications necessarily result in a changed atom:updated value.
atomUpdated = element atom:updated { atomDateConstruct } Publishers MAY change the value of this element over time.
Because Atom is an XML-based format, existing XML security mechanisms can be used to secure its content.
The root of an Atom document (i.e., atom:feed in an Atom Feed Document, atom:entry in an Atom Entry Document) MAY have an Enveloped Signature, as described by XML-Signature and Syntax Processing [W3C.REC-xmldsig-core-20020212].
Processors MUST NOT reject an Atom Document containing such a signature because they are not capable of verifying it; they MUST continue processing and MAY inform the user of their failure to validate the signature.
In other words, the presence of an element with the namespace URI "http://www.w3.org/2000/09/xmldsig#" and a local name of "Signature" as a child of the document element must not cause an Atom Processor to fail merely because of its presence.
Other elements in an Atom Document MUST NOT be signed unless their definitions explicitly specify such a capability.
The root of an Atom Document (i.e., atom:feed in an Atom Feed Document, atom:entry in an Atom Entry Document) MAY be encrypted, using the mechanisms described by XML Encryption Syntax and Processing [W3C.REC-xmlenc-core-20021210].
This specification describes Atom's XML markup vocabulary. Markup from other vocabularies ("foreign markup") can be used in an Atom document. Note that the atom:content element is designed to support the inclusion of arbitrary foreign markup.
Future versions of this specification may add new elements and attributes to the Atom markup vocabulary. Software written to conform to this version of the specification will not be able to process such markup correctly and, in fact, will not be able to distinguish it from markup error. For the purposes of this discussion, unrecognized markup from the Atom vocabulary will be considered "foreign markup".
Software processing an Atom Document which encounters foreign markup in a location that is legal according to this specification MUST NOT stop processing or signal an error. It may be the case that the software is able to process the foreign markup correctly and does so. Otherwise, such markup is termed "unknown foreign markup".
When unknown foreign markup is encountered as a child of atom:entry, atom:feed, or a Person construct, software MAY bypass the markup and any textual content and MUST NOT change its behavior as a result of the markup's presence.
When unknown foreign markup is encountered in a Text Contruct or atom:content element, software SHOULD ignore the markup and process any text content of foreign elements as though the surrounding markup were not present.
Atom allows foreign markup anywhere in an Atom document. Child elements of atom:entry, atom:feed, and Person constructs are considered Metadata Elements, and are described below. Child elements of Person constructs are considered to apply to the construct. The role of other foreign markup is undefined by this specification.
A Simple Extension element MUST NOT have any attributes or child elements. The element MAY contain character data, or be empty. Simple Extension elements are not language-sensitive.
The element can be interpreted as a simple property (or name/value pair) of the parent element that encloses it. The pair consisting of the namespace-URI of the element and the local name of the element can be interpreted as the name of the property. The character data content of the element can be interpreted as the value of the property. If the element is empty, then the property value can be interpreted as an empty string.
The root element of a Structured Extension element MUST have at least one attribute or child element. It MAY have attributes, it MAY contain well-formed XML content (including character data), or it MAY be empty. Structured Extension elements are language-sensitive.
The structure of a Structured Extension element, including the order of its child elements, could be significant.
This specification does not provide an interpretation of a Structured Extension element. The syntax of the XML contained in the element, and an interpretation of how the element relates to its containing element is defined by the specification of the Atom extension.
An Atom Document, when serialized as XML 1.0, can be identified with the following media type:
Additional information:
This registry is maintained by IANA and initially contains five values: "alternate", "related", "self", "enclosure", and "via". New assignments are subject to IESG Approval, as outlined in [RFC2434]. Requests should be made by email to IANA, which will then forward the request to the IESG requesting approval. The request should contain discussion of at least the following five topics:
Text constructs and atom:content allow the delivery of HTML and XHTML to receiving software, which may process it. Many elements in these languages are considered 'unsafe' in that they open clients to one or more types of attack. Implementers of software which processes Atom should carefully consider their handling of every type of element when processing incoming (X)HTML in Atom documents. See the security sections of [RFC2854] and [W3C.REC-html401-19991224] for guidance.
Atom Processors should pay particular attention to the security of the IMG, SCRIPT, EMBED, OBJECT, FRAME, FRAMESET, IFRAME, META, and LINK elements, but other elements may also have negative security properties.
(X)HTML can either directly contain or indirectly reference executable content.
Atom Processors handle URIs. See Section 7 of [RFC3986].
Atom Processors handle IRIs. See Section 8 of [RFC3987].
Atom documents can be encrypted and signed using [W3C.REC-xmlenc-core-20021210] and [W3C.REC-xmldsig-core-20020212], respectively, and are subject to the security considerations implied by their use.
| [Atom-autodiscovery] | Pilgrim, M., “Atom Feed Autodiscovery”, work-in-progress, August 2004. |
| [RFC2045] | Freed, N. and N.S. Borenstein, “Multipurpose Internet Mail Extensions (MIME) Part One: Format of Internet Message Bodies”, RFC 2045, November 1996. |
| [RFC2119] | Bradner, S., “Key words for use in RFCs to Indicate Requirement Levels”, BCP 14, RFC 2119, March 1997. |
| [RFC2234] | Crocker, D., Ed. and P. Overell, “Augmented BNF for Syntax Specifications: ABNF”, RFC 2234, November 1997. |
| [RFC2822] | Resnick, P., “Internet Message Format”, RFC 2822, April 2001. |
| [RFC2854] | Connolly, D. and L. Masinter, “The 'text/html' Media Type”, RFC 2854, June 2000. |
| [RFC3023] | Murata, M., St. Laurent, S., and D. Kohn, “XML Media Types”, RFC 3023, January 2001. |
| [RFC3066] | Alvestrand, H., “Tags for the Identification of Languages”, BCP 47, RFC 3066, January 2001. |
| [RFC3339] | Klyne, G. and C. Newman, “Date and Time on the Internet: Timestamps”, RFC 3339, July 2002. |
| [RFC3548] | Josefsson, S., “The Base16, Base32, and Base64 Data Encodings”, RFC 3548, July 2003. |
| [RFC3986] | Berners-Lee, T., Fielding, R., and L. Masinter, “Uniform Resource Identifier (URI): Generic Syntax”, STD 66, RFC 3986, January 2005. |
| [RFC3987] | Duerst, M. and M. Suignard, “Internationalized Resource Identifiers (IRIs)”, RFC 3987, January 2005. |
| [W3C.REC-html401-19991224] | Raggett, D, Hors, A, and I Jacobs, “HTML 4.01 Specification”, W3C REC REC-html401-19991224, December 1999. |
| [W3C.REC-xhtml-basic-20001219] | Baker, M, Ishikawa, M, Matsui, S, Stark, P, Wugofski, T, and T Yamakami, “XHTML Basic”, W3C REC REC-xhtml-basic-20001219, December 2000. |
| [W3C.REC-xml-20040204] | Yergeau, F, Paoli, J, Sperberg-McQueen, C, Bray, T, and E Maler, “Extensible Markup Language (XML) 1.0 (Third Edition)”, W3C REC REC-xml-20040204, February 2004. |
| [W3C.REC-xml-infoset-20040204] | Cowan, J and R Tobin, “XML Information Set (Second Edition)”, W3C REC REC-xml-infoset-20040204, February 2004. |
| [W3C.REC-xml-names-19990114] | Hollander, D, Bray, T, and A Layman, “Namespaces in XML”, W3C REC REC-xml-names-19990114, January 1999. |
| [W3C.REC-xmlbase-20010627] | Marsh, J, “XML Base”, W3C REC REC-xmlbase-20010627, June 2001. |
| [W3C.REC-xmldsig-core-20020212] | Solo, D, Reagle, J, and D Eastlake, “XML-Signature Syntax and Processing”, W3C REC REC-xmldsig-core-20020212, February 2002. |
| [W3C.REC-xmlenc-core-20021210] | Reagle, J and D Eastlake, “XML Encryption Syntax and Processing”, W3C REC REC-xmlenc-core-20021210, December 2002. |
| [ISO.8601.1988] | International Organization for Standardization, “Data elements and interchange formats - Information interchange - Representation of dates and times”, ISO Standard 8601, June 1988. |
| [RELAX-NG] | OASIS Technical Committee: RELAX NG, “RELAX NG Specification”, December 2001. |
| [RFC2434] | Narten, T. and H.T. Alvestrand, “Guidelines for Writing an IANA Considerations Section in RFCs”, BCP 26, RFC 2434, October 1998. |
| [W3C.NOTE-datetime-19980827] | Wolf, M and C Wicksteed, “Date and Time Formats”, W3C NOTE NOTE-datetime-19980827, August 1998. |
| [W3C.REC-xmlschema-2-20041028] | Malhotra, A and P Biron, “XML Schema Part 2: Datatypes Second Edition”, W3C REC REC-xmlschema-2-20041028, October 2004. |
The following people contributed to preliminary drafts of this document: Tim Bray, Mark Pilgrim, and Sam Ruby. Norman Walsh provided the Relax NG schema. The content and concepts within are a product of the Atom community and the Atom Publishing Format and Protocol Working Group.
This appendix is informative.
# -*- rnc -*-
# RELAX NG Compact Syntax Grammar for the
# Atom Format Specification Version 07
namespace atom =
"http://purl.org/atom/ns#draft-ietf-atompub-format-07"
namespace xhtml = "http://www.w3.org/1999/xhtml"
namespace s = "http://www.ascc.net/xml/schematron"
start = atomFeed | atomEntry
# Common attributes
atomCommonAttributes =
attribute xml:base { atomUri }?,
attribute xml:lang { atomLanguageTag }?
# Text Constructs
atomPlainTextConstruct =
atomCommonAttributes,
attribute type { "text" | "html" }?,
text
atomXHTMLTextConstruct =
atomCommonAttributes,
attribute type { "xhtml" },
xhtmlDiv
atomTextConstruct = atomPlainTextConstruct | atomXHTMLTextConstruct
# Person Construct
atomPersonConstruct =
atomCommonAttributes,
(element atom:name { text }
& element atom:uri { atomUri }?
& element atom:email { atomEmailAddress }?
& extensionElement*)
# Date Construct
atomDateConstruct =
atomCommonAttributes,
xsd:dateTime
# atom:feed
atomFeed =
[
s:rule [
context = "atom:feed"
s:assert [
test = "atom:link[@rel='alternate']"
"An atom:feed must have at least one link element "
~ "with a rel attribute of 'alternate'."
]
]
s:rule [
context = "atom:feed"
s:assert [
test = "atom:author or not(atom:entry[not(atom:author)])"
"An atom:feed must have an atom:author unless all "
~ "of its atom:entry children have an atom:author."
]
]
]
element atom:feed {
atomCommonAttributes,
(atomAuthor?
& atomCategory*
& atomContributor*
& atomCopyright?
& atomGenerator?
& atomIcon?
& atomId?
& atomImage?
& atomLink+
& atomSubtitle?
& atomTitle
& atomUpdated
& extensionElement*),
atomEntry*
}
# atom:entry
atomEntry =
[
s:rule [
context = "atom:entry"
s:assert [
test = "atom:link[@rel='alternate'] or atom:content"
"An atom:entry must have at least one link element "
~ "with a rel attribute of 'alternate' or content."
]
]
s:rule [
context = "atom:entry"
s:assert [
test = "atom:author or "
~ "../atom:author or atom:source/atom:author"
"An atom:entry must have an atom:author "
~ "if its feed does not."
]
]
# N.B. This rule doesn't test
# for content with a non-binary type.
s:rule [
context = "atom:entry"
s:assert [
test = "atom:summary or atom:content[not(@src)]"
"An atom:entry must have an atom:summary "
~ "if the atom:content element is empty."
]
]
]
element atom:entry {
atomCommonAttributes,
(atomAuthor?
& atomCategory*
& atomContent?
& atomContributor*
& atomCopyright?
& atomId
& atomLink*
& atomPublished?
& atomSource?
& atomSummary?
& atomTitle
& atomUpdated
& extensionElement*)
}
# atom:content
atomInlineTextContent =
element atom:content {
atomCommonAttributes,
attribute type { "text" | "html" }?,
(text)*
}
atomInlineXHTMLContent =
element atom:content {
atomCommonAttributes,
attribute type { "xhtml" },
xhtmlDiv
}
atomInlineOtherContent =
element atom:content {
atomCommonAttributes,
attribute type { atomMediaType }?,
(text|anyElement)*
}
atomOutOfLineContent =
element atom:content {
atomCommonAttributes,
attribute type { atomMediaType }?,
attribute src { atomUri },
empty
}
atomContent = atomInlineTextContent
| atomInlineXHTMLContent
| atomInlineOtherContent
| atomOutOfLineContent
# atom:author
atomAuthor = element atom:author { atomPersonConstruct }
# atom:category
atomCategory =
element atom:category {
atomCommonAttributes,
attribute term { text },
attribute scheme { atomUri }?,
attribute label { text }?,
empty
}
# atom:contributor
atomContributor = element atom:contributor { atomPersonConstruct }
# atom:copyright
atomCopyright = element atom:copyright { atomTextConstruct }
# atom:generator
atomGenerator = element atom:generator {
atomCommonAttributes,
attribute uri { atomUri }?,
attribute version { text }?,
text
}
# atom:icon
atomIcon = element atom:icon {
atomCommonAttributes,
(atomUri)
}
# atom:id
atomId = element atom:id {
atomCommonAttributes,
(atomUri)
}
# atom:image
atomImage = element atom:image {
atomCommonAttributes,
(atomUri)
}
# atom:link
atomLink =
element atom:link {
atomCommonAttributes,
attribute href { atomUri },
attribute rel { atomNCName | atomUri }?,
attribute type { atomMediaType }?,
attribute hreflang { atomLanguageTag }?,
attribute title { text }?,
attribute length { text }?,
empty
}
# atom:published
atomPublished = element atom:published { atomDateConstruct }
# atom:source
atomSource =
element atom:source {
atomCommonAttributes,
(atomAuthor?
& atomCategory*
& atomContributor*
& atomCopyright?
& atomGenerator?
& atomIcon?
& atomId?
& atomImage?
& atomLink+
& atomSubtitle?
& atomTitle
& atomUpdated
& extensionElement*)
}
# atom:subtitle
atomSubtitle = element atom:subtitle { atomTextConstruct }
# atom:summary
atomSummary = element atom:summary { atomTextConstruct }
# atom:title
atomTitle = element atom:title { atomTextConstruct }
# atom:updated
atomUpdated = element atom:updated { atomDateConstruct }
# Low-level simple types
atomNCName = xsd:string { minLength = "1" pattern = "[^:]*" }
# Whatever a media type is, it contains at least one slash
atomMediaType = xsd:string { pattern = ".+/.+" }
# As defined in RFC 3066
atomLanguageTag = xsd:string {
pattern = "[A-Za-z]{1,8}(-[A-Za-z0-9]{1,8})*"
}
# Unconstrained; it's not entirely clear how IRI fit into
# xsd:anyURI so let's not try to constrain it here
atomUri = text
# Whatever an email address is, it contains at least one @
atomEmailAddress = xsd:string { pattern = ".+@.+" }
# Extensibility
simpleExtensionElement =
element * - atom:* {
text
}
structuredExtensionElement =
element * - atom:* {
(attribute * { text }+,
(text|anyElement)*)
| (attribute * { text }*,
(text?, anyElement+, (text|anyElement)*))
}
extensionElement =
simpleExtensionElement | structuredExtensionElement
anyElement =
element * - atom:* {
(attribute * { text }
| text
| anyElement)*
}
# XHTML
anyXHTML = element xhtml:* {
(attribute * { text }
| text
| anyXHTML)*
}
xhtmlDiv = element xhtml:div {
(attribute * { text }
| text
| anyXHTML)*
}
# EOF
[rfc.comment.4: This section should be removed before final publication.]
The IETF takes no position regarding the validity or scope of any Intellectual Property Rights or other rights that might be claimed to pertain to the implementation or use of the technology described in this document or the extent to which any license under such rights might or might not be available; nor does it represent that it has made any independent effort to identify any such rights. Information on the procedures with respect to rights in RFC documents can be found in BCP 78 and BCP 79.
Copies of IPR disclosures made to the IETF Secretariat and any assurances of licenses to be made available, or the result of an attempt made to obtain a general license or permission for the use of such proprietary rights by implementers or users of this specification can be obtained from the IETF on-line IPR repository at <http://www.ietf.org/ipr>.
The IETF invites any interested party to bring to its attention any copyrights, patents or patent applications, or other proprietary rights that may cover technology that may be required to implement this standard. Please address the information to the IETF at ietf-ipr@ietf.org.
This document and the information contained herein are provided on an “AS IS” basis and THE CONTRIBUTOR, THE ORGANIZATION HE/SHE REPRESENTS OR IS SPONSORED BY (IF ANY), THE INTERNET SOCIETY AND THE INTERNET ENGINEERING TASK FORCE DISCLAIM ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
Copyright © The Internet Society (2005). This document is subject to the rights, licenses and restrictions contained in BCP 78, and except as set forth therein, the authors retain all their rights.
Funding for the RFC Editor function is currently provided by the Internet Society.