draft-ietf-atompub-format-05.txt   draft-ietf-atompub-format-06.txt 
Network Working Group M. Nottingham, Ed. Network Working Group M. Nottingham, Ed.
Internet-Draft Internet-Draft
Expires: July 27, 2005 R. Sayre, Ed. Expires: September 13, 2005 R. Sayre, Ed.
Boswijck Memex Consulting Boswijck Memex Consulting
January 26, 2005 March 12, 2005
The Atom Syndication Format The Atom Syndication Format
draft-ietf-atompub-format-05 draft-ietf-atompub-format-06
Status of this Memo Status of this Memo
By submitting this Internet-Draft, I certify that any applicable This document is an Internet-Draft and is subject to all provisions
patent or other IPR claims of which I am aware have been disclosed, of Section 3 of RFC 3667. By submitting this Internet-Draft, each
and any of which I become aware will be disclosed, in accordance with 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. RFC 3668.
Internet-Drafts are working documents of the Internet Engineering Internet-Drafts are working documents of the Internet Engineering
Task Force (IETF), its areas, and its working groups. Note that Task Force (IETF), its areas, and its working groups. Note that
other groups may also distribute working documents as other groups may also distribute working documents as
Internet-Drafts. Internet-Drafts.
Internet-Drafts are draft documents valid for a maximum of six months Internet-Drafts are draft documents valid for a maximum of six months
and may be updated, replaced, or obsoleted by other documents at any and may be updated, replaced, or obsoleted by other documents at any
time. It is inappropriate to use Internet-Drafts as reference time. It is inappropriate to use Internet-Drafts as reference
material or to cite them other than as "work in progress." material or to cite them other than as "work in progress."
The list of current Internet-Drafts can be accessed at The list of current Internet-Drafts can be accessed at
http://www.ietf.org/ietf/1id-abstracts.txt. http://www.ietf.org/ietf/1id-abstracts.txt.
The list of Internet-Draft Shadow Directories can be accessed at The list of Internet-Draft Shadow Directories can be accessed at
http://www.ietf.org/shadow.html. http://www.ietf.org/shadow.html.
This Internet-Draft will expire on July 27, 2005. This Internet-Draft will expire on September 13, 2005.
Copyright Notice Copyright Notice
Copyright (C) The Internet Society (2005). All Rights Reserved. Copyright (C) The Internet Society (2005).
Abstract Abstract
This document specifies Atom, an XML-based Web content and metadata This document specifies Atom, an XML-based Web content and metadata
syndication format. syndication format.
Table of Contents Table of Contents
1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 4 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 4
1.1 Editorial Notes . . . . . . . . . . . . . . . . . . . . . 4 1.1 Editorial Notes . . . . . . . . . . . . . . . . . . . . . 4
1.2 Example . . . . . . . . . . . . . . . . . . . . . . . . . 5 1.2 Example . . . . . . . . . . . . . . . . . . . . . . . . . 5
1.3 Conformance . . . . . . . . . . . . . . . . . . . . . . . 5 1.3 Notational Conventions . . . . . . . . . . . . . . . . . . 5
1.4 Notational Conventions . . . . . . . . . . . . . . . . . . 5
2. Atom Documents . . . . . . . . . . . . . . . . . . . . . . . 7 2. Atom Documents . . . . . . . . . . . . . . . . . . . . . . . 7
3. Common Atom Constructs . . . . . . . . . . . . . . . . . . . 9 3. Common Atom Constructs . . . . . . . . . . . . . . . . . . . 9
3.1 Text Constructs . . . . . . . . . . . . . . . . . . . . . 9 3.1 Text Constructs . . . . . . . . . . . . . . . . . . . . . 9
3.1.1 "type" Attribute . . . . . . . . . . . . . . . . . . . 9 3.1.1 "type" Attribute . . . . . . . . . . . . . . . . . . . 9
3.2 Person Constructs . . . . . . . . . . . . . . . . . . . . 10 3.2 Person Constructs . . . . . . . . . . . . . . . . . . . . 11
3.2.1 The "atom:name" Element . . . . . . . . . . . . . . . 10 3.2.1 The "atom:name" Element . . . . . . . . . . . . . . . 11
3.2.2 The "atom:uri" Element . . . . . . . . . . . . . . . . 10 3.2.2 The "atom:uri" Element . . . . . . . . . . . . . . . . 11
3.2.3 The "atom:email" Element . . . . . . . . . . . . . . . 11 3.2.3 The "atom:email" Element . . . . . . . . . . . . . . . 11
3.3 Date Constructs . . . . . . . . . . . . . . . . . . . . . 11 3.3 Date Constructs . . . . . . . . . . . . . . . . . . . . . 11
3.4 Service Constructs . . . . . . . . . . . . . . . . . . . . 11 4. Atom Element Definitions . . . . . . . . . . . . . . . . . . 13
3.4.1 The "href" Attribute . . . . . . . . . . . . . . . . . 11 4.1 Container Elements . . . . . . . . . . . . . . . . . . . . 13
3.5 Identity Constructs . . . . . . . . . . . . . . . . . . . 11 4.1.1 The "atom:feed" Element . . . . . . . . . . . . . . . 13
3.5.1 Dereferencing Identity Constructs . . . . . . . . . . 12 4.1.2 The "atom:entry" Element . . . . . . . . . . . . . . . 14
3.5.2 Comparing Identity Constructs . . . . . . . . . . . . 12 4.1.3 The "atom:content" Element . . . . . . . . . . . . . . 16
4. Element Definitions . . . . . . . . . . . . . . . . . . . . 14 4.2 Metadata Elements . . . . . . . . . . . . . . . . . . . . 19
4.1 The "atom:feed" Element . . . . . . . . . . . . . . . . . 14 4.2.1 The "atom:author" Element . . . . . . . . . . . . . . 19
4.1.1 The "version" Attribute . . . . . . . . . . . . . . . 14 4.2.2 The "atom:category" Element . . . . . . . . . . . . . 20
4.2 The "atom:head" Element . . . . . . . . . . . . . . . . . 14 4.2.3 The "atom:contributor" Element . . . . . . . . . . . . 20
4.2.1 Usage of "atom:head" within "atom:entry" . . . . . . . 16 4.2.4 The "atom:copyright Element . . . . . . . . . . . . . 20
4.3 The "atom:entry" Element . . . . . . . . . . . . . . . . . 16 4.2.5 The "atom:generator" Element . . . . . . . . . . . . . 21
4.4 The "atom:title" Element . . . . . . . . . . . . . . . . . 18 4.2.6 The "atom:icon" Element . . . . . . . . . . . . . . . 21
4.5 The "atom:id" Element . . . . . . . . . . . . . . . . . . 18 4.2.7 The "atom:id" Element . . . . . . . . . . . . . . . . 21
4.6 The "atom:link" Element . . . . . . . . . . . . . . . . . 18 4.2.8 The "atom:image" Element . . . . . . . . . . . . . . . 23
4.6.1 The "href" Attribute . . . . . . . . . . . . . . . . . 19 4.2.9 The "atom:link" Element . . . . . . . . . . . . . . . 23
4.6.2 The "rel" Attribute . . . . . . . . . . . . . . . . . 19 4.2.10 The "atom:published" Element . . . . . . . . . . . . 26
4.6.3 The "type" Attribute . . . . . . . . . . . . . . . . . 20 4.2.11 The "atom:source-feed" Element . . . . . . . . . . . 26
4.6.4 The "hreflang" Attribute . . . . . . . . . . . . . . . 20 4.2.12 The "atom:subtitle" Element . . . . . . . . . . . . 26
4.6.5 The "title" Attribute . . . . . . . . . . . . . . . . 20 4.2.13 The "atom:summary" Element . . . . . . . . . . . . . 27
4.6.6 The "length" Attribute . . . . . . . . . . . . . . . . 20 4.2.14 The "atom:title" Element . . . . . . . . . . . . . . 27
4.7 The "atom:updated" Element . . . . . . . . . . . . . . . . 20 4.2.15 The "atom:updated" Element . . . . . . . . . . . . . 27
4.8 The "atom:published" Element . . . . . . . . . . . . . . . 21 5. Securing Atom Documents . . . . . . . . . . . . . . . . . . 28
4.9 The "atom:author" Element . . . . . . . . . . . . . . . . 21 5.1 Digital Signatures . . . . . . . . . . . . . . . . . . . . 28
4.10 The "atom:contributor" Element . . . . . . . . . . . . . 21 5.2 Encryption . . . . . . . . . . . . . . . . . . . . . . . . 28
4.11 The "atom:host" Element . . . . . . . . . . . . . . . . 21 6. Extending Atom . . . . . . . . . . . . . . . . . . . . . . . 29
4.12 The "atom:copyright" Element . . . . . . . . . . . . . . 21 6.1 Extensions From Non-Atom Vocabularies . . . . . . . . . . 29
4.13 The "atom:category" Element . . . . . . . . . . . . . . 22 6.2 Extensions To the Atom Vocabulary . . . . . . . . . . . . 29
4.13.1 The "term" Attribute . . . . . . . . . . . . . . . . 22 6.3 Software Processing of Foreign Markup . . . . . . . . . . 29
4.13.2 The "scheme" Attribute . . . . . . . . . . . . . . . 22 6.4 Extension Elements . . . . . . . . . . . . . . . . . . . . 29
4.13.3 The "label" attribute . . . . . . . . . . . . . . . 22 6.4.1 Simple Extension Elements . . . . . . . . . . . . . . 30
4.14 The "atom:summary" Element . . . . . . . . . . . . . . . 22 6.4.2 Structured Extension Elements . . . . . . . . . . . . 30
4.15 The "atom:content" Element . . . . . . . . . . . . . . . 23 7. IANA Considerations . . . . . . . . . . . . . . . . . . . . 31
4.15.1 The "type" attribute . . . . . . . . . . . . . . . . 23 7.1 Registry of Link Relations . . . . . . . . . . . . . . . . 31
4.15.2 The "src" attribute . . . . . . . . . . . . . . . . 23 8. Security Considerations . . . . . . . . . . . . . . . . . . 33
4.15.3 Processing Model . . . . . . . . . . . . . . . . . . 24 8.1 HTML and XHTML Content . . . . . . . . . . . . . . . . . . 33
4.16 The "atom:introspection" Element . . . . . . . . . . . . 25 8.2 URIs . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
4.17 The "atom:post" Element . . . . . . . . . . . . . . . . 25 8.3 IRIs . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
4.18 The "atom:edit" Element . . . . . . . . . . . . . . . . 25 8.4 Encryption and Signing . . . . . . . . . . . . . . . . . . 33
4.19 The "atom:tagline" Element . . . . . . . . . . . . . . . 25 9. References . . . . . . . . . . . . . . . . . . . . . . . . . 34
4.20 The "atom:generator" Element . . . . . . . . . . . . . . 25 9.1 Normative References . . . . . . . . . . . . . . . . . . . 34
4.21 The "atom:info" Element . . . . . . . . . . . . . . . . 26 9.2 Informative References . . . . . . . . . . . . . . . . . . 35
5. Managing Feed State . . . . . . . . . . . . . . . . . . . . 27
6. Securing Atom Documents . . . . . . . . . . . . . . . . . . 28
6.1 Digital Signatures . . . . . . . . . . . . . . . . . . . . 28
6.2 Encryption . . . . . . . . . . . . . . . . . . . . . . . . 28
7. Embedding Atom in Other Formats . . . . . . . . . . . . . . 29
8. Extending Atom . . . . . . . . . . . . . . . . . . . . . . . 30
9. IANA Considerations . . . . . . . . . . . . . . . . . . . . 31
9.1 Registry of Link Relations . . . . . . . . . . . . . . . . 31
10. Security Considerations . . . . . . . . . . . . . . . . . . 33
11. References . . . . . . . . . . . . . . . . . . . . . . . . . 34
11.1 Normative References . . . . . . . . . . . . . . . . . . . 34
11.2 Informative References . . . . . . . . . . . . . . . . . . 35
Authors' Addresses . . . . . . . . . . . . . . . . . . . . . 36 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . 36
A. Contributors . . . . . . . . . . . . . . . . . . . . . . . . 37 A. Contributors . . . . . . . . . . . . . . . . . . . . . . . . 37
B. Collected RELAX NG Compact Schema . . . . . . . . . . . . . 38 B. Collected RELAX NG Compact Schema . . . . . . . . . . . . . 38
C. Revision History . . . . . . . . . . . . . . . . . . . . . . 45 C. Change Log . . . . . . . . . . . . . . . . . . . . . . . . . 45
Intellectual Property and Copyright Statements . . . . . . . 47 Intellectual Property and Copyright Statements . . . . . . . 48
1. Introduction 1. Introduction
Atom is an XML-based document format which describes lists of related Atom is an XML-based document format that describes lists of related
information known as "feeds". Feeds are composed of a number of information known as "feeds". Feeds are composed of a number of
items, known as "entries", each with an extensible set of attached items, known as "entries", each with an extensible set of attached
metadata. For example, each entry has a title. metadata. For example, each entry has a title.
The primary use case that Atom addresses is the syndication of Web 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 content such as Weblogs and news headlines to Web sites as well as
directly to user agents. However, nothing precludes it from being directly to user agents. However, nothing precludes it from being
used for other purposes and kinds of content. used for other purposes and kinds of content.
Details of communication protocols between software agents using Atom
can be found in the Atom Protocol specification [Atom-protocol].
[[ more motivation / design principles ]]
1.1 Editorial Notes 1.1 Editorial Notes
The Atom format is a work-in-progress, and this draft is both The Atom format is a work-in-progress, and this draft is both
incomplete and likely to change rapidly. As a result, THE FORMAT incomplete and likely to change rapidly. As a result, THE FORMAT
DESCRIBED BY THIS DRAFT SHOULD NOT BE DEPLOYED, either in production DESCRIBED BY THIS DRAFT SHOULD NOT BE DEPLOYED, either in production
systems or in any non-experimental fashion on the Internet. systems or in any non-experimental fashion on the Internet.
Discussion of this draft happens in two fora; Discussion of this draft happens in two fora;
The mailing list [1] The mailing list <http://www.imc.org/atom-syntax/index.html>
The Atom Wiki Web site [2] The Atom Wiki Web site
<http://www.intertwingly.net/wiki/pie/FrontPage>
Active development takes place on the mailing list, while the Wiki is Active development takes place on the mailing list, while the Wiki is
used for issue tracking and new proposals. used for issue tracking and new proposals.
This document is an early draft and known to be incomplete. Topics
marked [[like this]] indicate where additional text is likely to be
added.
1.2 Example 1.2 Example
A minimal, single-entry Atom Feed Document: A minimal, single-entry Atom Feed Document:
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<feed version="draft-ietf-atompub-format-05:do not deploy" <feed
xmlns="http://purl.org/atom/ns#draft-ietf-atompub-format-05"> xmlns="http://purl.org/atom/ns#draft-ietf-atompub-format-06">
<head>
<title>Example Feed</title> <title>Example Feed</title>
<link href="http://example.org/"/> <link href="http://example.org/"/>
<updated>2003-12-13T18:30:02Z</updated> <updated>2003-12-13T18:30:02Z</updated>
<author> <author>
<name>John Doe</name> <name>John Doe</name>
</author> </author>
</head>
<entry> <entry>
<title>Atom-Powered Robots Run Amok</title> <title>Atom-Powered Robots Run Amok</title>
<link href="http://example.org/2003/12/13/atom03"/> <link href="http://example.org/2003/12/13/atom03"/>
<id>vemmi://example.org/2003/32397</id> <id>urn:uuid:1225c695-cfb8-4ebb-aaaa-80da344efa6a</id>
<updated>2003-12-13T18:30:02Z</updated> <updated>2003-12-13T18:30:02Z</updated>
</entry> </entry>
</feed> </feed>
1.3 Conformance [[anchor4: Ask yourself: is the example atom:entry valid?]]
[[ talk about atom documents and atom consumers, and how requirements 1.3 Notational Conventions
are placed on them ]]
1.4 Notational Conventions This specification describes conformance in terms of two kinds of
artefacts; Atom Feed Documents and Atom Entry documents.
Additionally, it places some requirements on Atom Processors.
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
"SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
document are to be interpreted as described in BCP 14, [RFC2119]. document are to be interpreted as described in BCP 14, [RFC2119], as
scoped to those conformance targets.
This specification uses XML Namespaces [W3C.REC-xml-names-19990114] This specification uses XML Namespaces [W3C.REC-xml-names-19990114]
to uniquely identify XML elements and attribute names. It uses the to uniquely identify XML elements names. It uses the following
following namespace prefixes for the indicated namespace URIs; namespace prefixes for the indicated namespace URIs;
"atom": http://purl.org/atom/ns#draft-ietf-atompub-format-05 "atom": http://purl.org/atom/ns#draft-ietf-atompub-format-06
Note that the choice of any namespace prefix is arbitrary and not Note that the choice of any namespace prefix is arbitrary and not
semantically significant. semantically significant.
Atom is specified using terms from the XML Infoset Atom is specified using terms from the XML Infoset
[W3C.REC-xml-infoset-20011024]. However, this specification uses a [W3C.REC-xml-infoset-20040204]. However, this specification uses a
shorthand for two common terms; the phrase "Information Item" is shorthand for two common terms; the phrase "Information Item" is
omitted when naming Element Information Items and Attribute omitted when naming Element Information Items and Attribute
Information Items. Information Items.
Therefore, when this specification uses the term "element," it is Therefore, when this specification uses the term "element," it is
referring to an Element Information Item in Infoset terms. Likewise, referring to an Element Information Item in Infoset terms. Likewise,
when it uses the term "attribute," it is referring to an Attribute when it uses the term "attribute," it is referring to an Attribute
Information Item. Information Item.
Some sections of this specification are illustrated with fragments of Some sections of this specification are illustrated with fragments of
skipping to change at page 7, line 12 skipping to change at page 7, line 12
text of this specification provides the definition of conformance. A text of this specification provides the definition of conformance. A
collected schema appears in an informative appendix. collected schema appears in an informative appendix.
2. Atom Documents 2. Atom Documents
This specification describes two kinds of Atom Documents; Atom Feed This specification describes two kinds of Atom Documents; Atom Feed
Documents and Atom Entry Documents. Documents and Atom Entry Documents.
An Atom Feed Document is a representation of an Atom feed, including An Atom Feed Document is a representation of an Atom feed, including
metadata about the feed, and some or all of the entries associated metadata about the feed, and some or all of the entries associated
with it. Its document element is atom:feed. with it. Its root is the atom:feed element.
An Atom Entry Document represents exactly one Atom Entry, outside of An Atom Entry Document represents exactly one Atom Entry, outside of
the context of an Atom Feed. Its document element is atom:entry. the context of an Atom Feed. Its root is the atom:entry element.
namespace atom = namespace
"http://purl.org/atom/ns#draft-ietf-atompub-format-05" atom ="http://purl.org/atom/ns#draft-ietf-atompub-format-06"
start = atomFeed | atomEntry start = atomFeed | atomEntry
Both kinds of Atom documents are specified in terms of the XML Both kinds of Atom documents are specified in terms of the XML
Information Set, serialised as XML 1.0 [W3C.REC-xml-20040204] and Information Set, serialised as XML 1.0 [W3C.REC-xml-20040204] and
identified with the "application/atom+xml" media type. Atom identified with the "application/atom+xml" media type. Atom
Documents MUST be well-formed XML. Documents MUST be well-formed XML.
Atom constrains the appearance and content of elements and Atom constrains the appearance and content of elements and
attributes; unless otherwise stated, Atom Documents MAY contain other attributes; unless otherwise stated, Atom Documents MAY contain other
Information Items as appropriate. In particular, Comment Information Information Items as appropriate. In particular, Comment Information
Items and Processing Instruction Information Items SHOULD be ignored Items and Processing Instruction Information Items SHOULD be ignored
in the normal processing of an Atom Document. in the normal processing of an Atom Document.
Any element in an Atom Document MAY have an xml:base attribute. XML Any element in an Atom Document MAY have an xml:base attribute. XML
Base [W3C.REC-xmlbase-20010627] processing MUST be applied to any Base [W3C.REC-xmlbase-20010627] processing MUST be applied to any
relative reference [RFC3986] present in an Atom Document. This relative reference [RFC3987] present in an Atom Document. This
includes such elements and attributes as specified by Atom itself, as includes such elements and attributes as specified by Atom itself, as
well as those specified by extensions to Atom. well as those specified by extensions to Atom.
Any element in an Atom Document MAY have an xml:lang attribute, whose Any element in an Atom Document MAY have an xml:lang attribute, whose
content indicates the natural language of the element's content. 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 Requirements regarding the content and interpretation of xml:lang are
specified in XML 1.0 [W3C.REC-xml-20040204] Section 2.12. specified in XML 1.0 [W3C.REC-xml-20040204], Section 2.12.
atomCommonAttributes = atomCommonAttributes =
attribute xml:base { atomUri }?, attribute xml:base { atomUri }?,
attribute xml:lang { atomLanguageTag }? attribute xml:lang { atomLanguageTag }?
[[ discussion of URI escaping and i18n, IRI ]] Atom allows the use of IRIs [RFC3987], rather than only URIs
[RFC3986]. For resolution, IRIs can easily be converted to URIs.
When comparing IRIs serving as Identity Constructs, they MUST NOT be
converted to URIs. Please note that by definition, every URI is an
IRI, so any URI can be used where an IRI is needed.
[[ discussion of white space ]] [[anchor7: discussion of white space]]
Atom is extensible. See the section titled 'Extending Atom' later in Atom is an extensible format. See the section titled 'Extending
this document for a full description of how Atom Documents can be Atom' later in this document for a full description of how Atom
extended. 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.
3. Common Atom Constructs 3. Common Atom Constructs
Many of Atom's elements share a few common structures. This section Many of Atom's elements share a few common structures. This section
defines a few such structures and their requirements for convenient defines a few such structures and their requirements for convenient
reference by the appropriate element definitions. reference by the appropriate element definitions.
When an element is identified as being a particular kind of When an element is identified as being a particular kind of
construct, it inherits the corresponding requirements from that construct, it inherits the corresponding requirements from that
construct's definition in this section. construct's definition in this section.
3.1 Text Constructs 3.1 Text Constructs
A Text construct contains human readable text, usually in fairly A Text construct contains human readable text, usually in small
small quantities. quantities. Except for the "type" attribute, the content of Text
constructs is language-sensitive.
atomPlainTextConstruct = atomPlainTextConstruct =
atomCommonAttributes, atomCommonAttributes,
attribute type { "TEXT" | "HTML" }?, attribute type { "text" | "html" }?,
text text
atomXHTMLTextConstruct = atomXHTMLTextConstruct =
atomCommonAttributes, atomCommonAttributes,
attribute type { "XHTML" }, attribute type { "xhtml" },
(text|anyElement)* (text|anyElement)*
atomTextConstruct = atomPlainTextConstruct | atomXHTMLTextConstruct atomTextConstruct = atomPlainTextConstruct | atomXHTMLTextConstruct
3.1.1 "type" Attribute 3.1.1 "type" Attribute
Text constructs MAY have a "type" attribute. When present, the value Text constructs MAY have a "type" attribute. [[anchor11: Some feel
MUST be one of "TEXT", "HTML" or "XHTML". If the "type" attribute is type attributes with different allowable values in different elements
not provided, software MUST behave as though it were present with a is confusing.]]. When present, the value MUST be one of "text",
value 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 Note that MIME media types [RFC2045] are not acceptable values for
the "type" attribute. the "type" attribute.
If the value is "TEXT", the content of the Text construct MUST NOT If the value is "text", the content of the Text construct MUST NOT
contain child elements. Such text is intended to be presented to contain child elements. Such text is intended to be presented to
humans in a readable fashion. Thus, software MAY display it using humans in a readable fashion. Thus, Atom Processors MAY display it
normal text rendering techniques such as proportional fonts, using normal text rendering techniques such as proportional fonts,
white-space collapsing, and justification. white-space collapsing, and justification.
If the value of "type" is "HTML", the content of the Text construct If the value of "type" is "html", the content of the Text construct
MUST NOT contain child elements, and SHOULD be suitable for handling MUST NOT contain child elements, and SHOULD be suitable for handling
by software that knows HTML. The HTML markup must be escaped; for as HTML [W3C.REC-html401-19991224]. Any markup within MUST be
example, "<br>" as "&lt;br>". The HTML markup SHOULD be such that it escaped; for example, "<br>" as "&lt;br>". HTML markup within SHOULD
could validly appear directly within an HTML <DIV> element. be such that it could validly appear directly within an HTML <DIV>
Receiving software which displays the content MAY use the markup to element, after unescaping. Atom Processors that display such content
aid in displaying it. MAY use markup to aid in its display.
[[example atom entry w/ escaped markup]] [[anchor12: example atom entry w/ escaped markup]]
If the value of "type" is "XHTML", the content of the Text construct If the value of "type" is "xhtml", the content of the Text construct
MAY contain child elements. The content SHOULD be XHTML text and MUST be a single XHTML div element [W3C.REC-xhtml-basic-20001219].
markup that could validly appear directly within an xhtml:div The XHTML div MUST contain XHTML text and markup that could validly
element. Receiving software which displays the content MAY use the appear within an XHTML div element. The XHTML div element itself
markup to aid in displaying it. Escaped markup is interpreted as a MUST NOT be considered part of the content. Atom Processors which
text representation of markup, and MUST NOT be interpreted as markup display the content MAY use the markup to aid in displaying it.
itself. Escaped markup is interpreted as a text representation of markup, and
MUST NOT be interpreted as markup itself.
Example:
...
<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>
...
3.2 Person Constructs 3.2 Person Constructs
A Person construct is an element that describes a person, A Person construct is an element that describes a person,
corporation, or similar entity. corporation, or similar entity (hereafter, 'person').
Person constructs MAY be extended by namespace-qualified element Person constructs MAY be extended by namespace-qualified element
children. children.
This specification assigns no significance to the order of appearance This specification assigns no significance to the order of appearance
of the child elements in a Person construct. of the child elements in a Person construct.
atomPersonConstruct = atomPersonConstruct =
atomCommonAttributes, atomCommonAttributes,
(element atom:name { text } (element atom:name { text } &
& element atom:uri { atomUri }? element atom:uri { atomUri }? &
& element atom:email { atomEmailAddress }?) element atom:email { atomEmailAddress }?)
3.2.1 The "atom:name" Element 3.2.1 The "atom:name" Element
The "atom:name" element's content conveys a human-readable name for The "atom:name" element's content conveys a human-readable name for
the person. Person constructs MUST contain exactly one "atom:name" the person. The content of atom:name is language sensitive. Person
element. constructs MUST contain exactly one "atom:name" element.
3.2.2 The "atom:uri" Element 3.2.2 The "atom:uri" Element
The "atom:uri" element's content conveys a URI associated with the The "atom:uri" element's content conveys an IRI associated with the
person. Person constructs MAY contain an atom:uri element, but MUST person. Person constructs MAY contain an atom:uri element, but MUST
NOT contain more than one. The content of atom:uri in a Person NOT contain more than one. The content of atom:uri in a Person
construct MUST be a URI reference [RFC3986]. construct MUST be an IRI reference [RFC3987].
xml:base [W3C.REC-xmlbase-20010627] processing MUST be applied to the xml:base [W3C.REC-xmlbase-20010627] processing MUST be applied to the
atom:uri element's content. atom:uri element's content.
3.2.3 The "atom:email" Element 3.2.3 The "atom:email" Element
The "atom:email" element's content conveys an e-mail address The "atom:email" element's content conveys an e-mail address
associated with the persons. Person constructs MAY contain an associated with the person. Person constructs MAY contain an
atom:email element, but MUST NOT contain more than one. Its content atom:email element, but MUST NOT contain more than one. Its content
MUST be an e-mail address [RFC2822]. MUST conform to the addr-spec BNF rule in [RFC2822].
3.3 Date Constructs 3.3 Date Constructs
A Date construct is an element whose content MUST conform to the A Date construct is an element whose content MUST conform to the
date-time BNF rule in [RFC3339]. date-time BNF rule in [RFC3339]. I.e., the content of this element
matches this regular expression:
atomDateConstruct =
atomCommonAttributes,
xsd:dateTime
3.4 Service Constructs
A Service construct is an empty element that conveys the URI of an
Atom Publishing Protocol [Atom-protocol] service associated with an
entry or feed.
atomServiceConstruct =
atomCommonAttributes,
attribute href { atomUri }
3.4.1 The "href" Attribute
The "href" attribute contains the a URI of the service. atom:service
elements MUST have a "href" attribute, whose value MUST be a URI
reference [RFC3986].
xml:base processing MUST be applied to the "href" attribute.
3.5 Identity Constructs
An Identity construct is an element whose content conveys a [0-9]{8}T[0-9]{2}:[0-9]{2}:[0-9]{2}(\.[0-9]+)
permanent, universally unique identifier for the construct's parent. ?(Z|[\+\-][0-9]{2}:[0-9]{2})
Its content MUST be a URI, as defined by [RFC3986]. Note that the
definition of "URI" excludes relative references.
When an Atom document is relocated, migrated, syndicated, As a result, the date values conform to the following specifications:
republished, exported or imported, the content of its Identity [RFC3339], [W3C.REC-xmlschema-2-20041028],
construct MUST NOT change. Put another way, an Identity construct [W3C.NOTE-datetime-19980827], and [ISO.8601.1988].
pertains to all instantiations of a particular Atom entry or feed;
revisions retain the same content in their Identity constructs.
atomIdentityConstruct = atomDateConstruct =
atomCommonAttributes, atomCommonAttributes,
(atomUri) xsd:dateTime
3.5.1 Dereferencing Identity Constructs
The content of an Identity construct MAY be dereferencable (e.g. an
HTTP URI). However, processors MUST NOT assume it to be
dereferencable.
The content of an Identity construct MUST be created in a way that
assures uniqueness, and it is suggested that the Identity construct
be stored along with the associated resource.
Because of the risk of confusion between URIs that would be
equivalent if dereferenced, the following normalization strategy is
strongly encouraged when generating Identity constructs:
o Provide the scheme in lowercase characters.
o Provide the host, if any, in lowercase characters.
o Only perform percent-encoding where it is essential.
o Use uppercase A-through-F characters when percent-encoding.
o Prevent dot-segments appearing in paths.
o For schemes that define a default authority, use an empty
authority if the default is desired.
o For schemes that define an empty path to be equivalent to a path
of "/", use "/".
o For schemes that define a port, use an empty port if the default
is desired.
o Preserve empty fragment identifiers and queries.
o Ensure that all portions of the URI are UTF-8 encoded NFC form
Unicode strings.
3.5.2 Comparing Identity Constructs
Instances of Identity constructs can be compared to determine whether
an entry or feed is the same as one seen before. Processors MUST
compare Identity constructs on a character-by-character basis in a
case-sensitive fashion.
As a result, two URIs 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, "http://www.example.org/thing", 4. Atom Element Definitions
"http://www.example.org/Thing", "http://www.EXAMPLE.org/thing" and
"HTTP://www.example.org/thing" will all be considered different
identifiers, despite their differences in case.
Likewise, "http://www.example.com/~bob", 4.1 Container Elements
"http://www.example.com/%7ebob" and "http://www.example.com/%7Ebob"
will all be considered different identifiers, because URI %-escaping
is significant for the purposes of comparison.
4. Element Definitions 4.1.1 The "atom:feed" Element
4.1 The "atom:feed" Element [[anchor21: Substantially changed from format-05, review carefully.]]
The "atom:feed" element is the document (i.e., top-level) element of 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 an Atom Feed Document, acting as a container for metadata and data
associated with the feed. Its first element child MUST be atom:head, associated with the feed. Its element children consist of one or
which MAY be followed zero or more atom:entry child elements.