From: http://www.ietf.org/internet-drafts/draft-ietf-atompub-autodiscovery-01.txt Title: Atom Feed Autodiscovery Reference: IETF ATOMPUB Working Group, Internet Draft 'draft-ietf-atompub-autodiscovery-01.txt' Date: May 10, 2005 WG: Atom Publishing Format and Protocol Working Group Previous version: http://xml.coverpages.org/draft-ietf-atompub-autodiscovery-00.txt Version history, Internet Report Catalog: http://ietfreport.isoc.org/idref/draft-ietf-atompub-autodiscovery HTML: http://philringnalda.com/rfc/draft-ietf-atompub-autodiscovery-01.html Diff (01 against -00): http://philringnalda.com/rfc/diff-00-01.txt See also: http://xml.coverpages.org/draft-ietf-atompub-format-10.txt "The Atom Syndication Format" http://xml.coverpages.org/draft-ietf-atompub-protocol-04.txt "The Atom Publishing Protocol" See: http://xml.coverpages.org/atom.html "Atom Publishing Format and Protocol" Atom WG charter: http://www.ietf.org/html.charters/atompub-charter.html Atom syntax mailing list: http://www.imc.org/atom-syntax/index.html Atom protocol mailing list: http://www.imc.org/atom-protocol/index.html Atom Wiki web site: http://www.intertwingly.net/wiki/pie/FrontPage ======================================================================== ATOMPUB Working Group M. Pilgrim Internet-Draft IBM Expires: November 11, 2005 P. Ringnalda, Ed. May 10, 2005 Atom Feed Autodiscovery draft-ietf-atompub-autodiscovery-01.txt Status of this Memo 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 becomes aware will be disclosed, in accordance with Section 6 of BCP 79. 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 on November 11, 2005. Copyright Notice Copyright (C) The Internet Society (2005). Abstract This document specifies a machine-readable method of linking to an Atom feed from a HyperText Markup Language (HTML) or Extensible HyperText Markup Language (XHTML) document, using the element. Editorial Note To provide feedback on this Internet-Draft, join the atom-syntax mailing list (http://www.imc.org/atom-syntax/index.html) [1]. Pilgrim & Ringnalda Expires November 11, 2005 [Page 1] Internet-Draft Atom Feed Autodiscovery May 2005 Table of Contents 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 3 2. Notational Conventions . . . . . . . . . . . . . . . . . . . 3 3. Relationship to HTML and XHTML . . . . . . . . . . . . . . . 3 3.1 Definition of an autodiscovery element . . . . . . . . . . 3 3.2 Syntax rules inherited from HTML . . . . . . . . . . . . . 3 3.3 Syntax rules inherited from XHTML . . . . . . . . . . . . 4 4. Required attributes . . . . . . . . . . . . . . . . . . . . 4 4.1 rel attribute . . . . . . . . . . . . . . . . . . . . . . 4 4.2 type attribute . . . . . . . . . . . . . . . . . . . . . . 4 4.3 href attribute . . . . . . . . . . . . . . . . . . . . . . 5 5. Optional attributes . . . . . . . . . . . . . . . . . . . . 5 5.1 title attribute . . . . . . . . . . . . . . . . . . . . . 5 6. Multiple autodiscovery elements . . . . . . . . . . . . . . 5 7. Examples . . . . . . . . . . . . . . . . . . . . . . . . . . 6 7.1 rel attribute variations . . . . . . . . . . . . . . . . . 6 7.2 type attribute variations . . . . . . . . . . . . . . . . 6 7.3 Link element variations . . . . . . . . . . . . . . . . . 6 7.4 HTML variations . . . . . . . . . . . . . . . . . . . . . 8 8. IANA Considerations . . . . . . . . . . . . . . . . . . . . 10 9. Security Considerations . . . . . . . . . . . . . . . . . . 10 10. References . . . . . . . . . . . . . . . . . . . . . . . . . 10 10.1 Normative References . . . . . . . . . . . . . . . . . . 10 10.2 Informative References . . . . . . . . . . . . . . . . . 11 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . 11 A. Contributors . . . . . . . . . . . . . . . . . . . . . . . . 12 B. Revision History . . . . . . . . . . . . . . . . . . . . . . 12 Intellectual Property and Copyright Statements . . . . . . . 13 Pilgrim & Ringnalda Expires November 11, 2005 [Page 2] Internet-Draft Atom Feed Autodiscovery May 2005 1. Introduction Atom is an XML-based file format intended to allow lists of information, known as "feeds", to be synchronised between publishers and consumers. Feeds are composed of a number of items, known as "entries", each with an extensible set of attached metadata. The primary use case that Atom addresses is for syndicating web content such as weblogs and news headlines to other web sites and directly to consumers. However, nothing precludes it from being used for other purposes and types of content. The purpose of Atom autodiscovery is for clients who know the URI of a web page to find the location of that page's associated Atom feed. For example, say an end user wishes to subscribe to the Atom feed of a site. Their Atom-aware aggregator client could prompt them to enter the home page of the site. The client could retrieve the HTML source of the home page, find the Atom autodiscovery element, and then retrieve the Atom feed or cache the URI of the Atom feed for later retrieval. Autodiscovered Atom feeds may be presented to the user in a variety of other ways. In the past, Atom-enabled clients have implemented local proxies that monitor visited web sites and notify the end user of autodiscovered Atom feeds in real time. Such notification is also built directly into some desktop web browsers. 2. Notational Conventions 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 [RFC2119]. 3. Relationship to HTML and XHTML 3.1 Definition of an autodiscovery element An Atom autodiscovery element is a link element, as defined in section 12.3 of HTML 4 [W3C.REC-html401-19991224]. As with other types of link elements, an autodiscovery element MAY appear within the
element of an HTML or XHTML document, but it MUST NOT appear within the . 3.2 Syntax rules inherited from HTML When an Atom autodiscovery element appears in an HTML document, it shares all the syntax rules and restrictions of other HTML elements. The most relevant rules are listed here: Pilgrim & Ringnalda Expires November 11, 2005 [Page 3] Internet-Draft Atom Feed Autodiscovery May 2005 o Element names are not case-sensitive. For example, clients MUST treat the same as o Attribute names are not case-sensitive. For example, clients MUST treat the same as . o Attributes may appear in any order; the order MUST NOT be considered significant. o Attribute values MUST be one of the following: enclosed in double quotes, enclosed in single quotes, or not enclosed in quotes at all. o Attribute values MAY contain leading or trailing spaces, or both. Clients MUST ignore both leading and trailing spaces in attribute values. For example, clients MUST treat all of the following the same way: , , , and . 3.3 Syntax rules inherited from XHTML XHTML [W3C.REC-xhtml1-20020801] is a reformulation of HTML in XML [W3C.REC-xml-20040204]. It also defines a element, so XHTML documents are a suitable container for Atom autodiscovery elements. When an Atom autodiscovery element appears in an XHTML document, it shares all the syntax rules and restrictions of other XHTML elements. The syntax rules of XHTML documents are slightly different than HTML documents. The most relevant differences are listed here: o Element names are case-sensitive, and MUST be lowercase. o Attribute names are case-sensitive, and MUST be lowercase. o Attribute values MUST be enclosed in either double quotes or single quotes. o Empty elements (such as link elements) MUST be closed with an end tag. 4. Required attributes 4.1 rel attribute The rel attribute MUST be present in an Atom autodiscovery element. As defined in section 6.12 of HTML 4 [W3C.REC-html401-19991224], the value of the rel attribute is a space-separated list of keywords. The list of keywords MUST include the keyword "alternate" in uppercase, lowercase, or mixed case. 4.2 type attribute The type attribute MUST be present in an Atom autodiscovery element. As defined in section 12.3 of HTML 4 [W3C.REC-html401-19991224], the Pilgrim & Ringnalda Expires November 11, 2005 [Page 4] Internet-Draft Atom Feed Autodiscovery May 2005 value of the type attribute of any link element MUST be a registered Internet media type [RFC2045]. The media type for Atom is "application/atom+xml" [I-D.ietf-atompub-format], so in an Atom autodiscovery element the value of the type attribute MUST contain the string "application/atom+xml" in uppercase, lowercase, or mixed case. 4.3 href attribute The href attribute MUST be present in an Atom autodiscovery element, and its value MUST be the URI [RFC3986] of an Atom feed. The value MAY be a relative URI, and if so, clients MUST resolve it to a full URI (section 5 of [RFC3986]) using the document's base URI (section 12.4 of HTML 4 [W3C.REC-html401-19991224]). 5. Optional attributes An Atom autodiscovery element MAY contain any other attributes of the link element defined in section 12.4 of HTML 4 [W3C.REC-html401- 19991224]. Clients MAY ignore any attributes other than rel, type, and href. 5.1 title attribute The title attribute MAY be present in an Atom autodiscovery element. If so, the client MAY treat the value of the title attribute as a human-readable label of the Atom feed. Clients MAY present this label to the end user. 6. Multiple autodiscovery elements An HTML or XHTML document MAY contain one or more Atom autodiscovery elements. If multiple autodiscovery elements are present in a single document: o Each autodiscovery element SHOULD point to a different Atom feed. o Each autodiscovery element SHOULD include a title attribute that gives a human-readable label for the feed that the element points to. Clients MAY use these titles to present a list of available Atom feeds to the end user. o The order of the autodiscovery elements is significant. The first element SHOULD point to the publisher's preferred feed for the document. o Clients who present a list of autodiscovered feeds to the end user SHOULD present them in the same order as the autodiscovery elements appear in the document. Pilgrim & Ringnalda Expires November 11, 2005 [Page 5] Internet-Draft Atom Feed Autodiscovery May 2005 o Clients who wish to choose exactly one feed without user input SHOULD choose the one pointed to by the first autodiscovery element. 7. Examples 7.1 rel attribute variations The following is a non-exhaustive list of valid rel attributes for an Atom autodiscovery element in an HTML or XHTML document: rel="alternate" rel="alternate " rel=" alternate" rel=" alternate " rel="foo alternate" rel="alternate bar" rel="foo alternate bar" rel="ALTERNATE" rel="Alternate" rel="AlTeRnAtE" rel='alternate' rel="Alternate" In an HTML document, the following forms are also valid: REL="alternate" rel=alternate 7.2 type attribute variations The following are examples of valid type attributes for an Atom autodiscovery element in an HTML or XHTML document: type="application/atom+xml" type="application/atom+xml " type=" application/atom+xml" type=" application/atom+xml " type="APPLICATION/ATOM+XML" type="Application/Atom+Xml" In an HTML document, the following form is also valid: TYPE="application/atom+xml" 7.3 Link element variations Each of the following examples represents an Atom autodiscovery Pilgrim & Ringnalda Expires November 11, 2005 [Page 6] Internet-Draft Atom Feed Autodiscovery May 2005 element in an HTML document located at http://www.example.com/index.html. Each example points to an Atom feed located at http://www.example.com/xml/index.atom. Each of the following examples represents an Atom autodiscovery Pilgrim & Ringnalda Expires November 11, 2005 [Page 7] Internet-Draft Atom Feed Autodiscovery May 2005 element in an XHTML document located at http://www.example.com/index.xhtml. Each example points to an Atom feed located at http://www.example.com/xml/index.atom. 7.4 HTML variations This is an example of a complete HTML document located at http://www.example.com/index.html. It contains an Atom autodiscovery element that points to an Atom feed at http://www.example.com/index.html?format=atom. Pilgrim & Ringnalda Expires November 11, 2005 [Page 8] Internet-Draft Atom Feed Autodiscovery May 2005 This is an example of a complete HTML document located at http://www.example.com/index.html. It contains an Atom autodiscovery element that points to an Atom feed at http://www.example.org/index.atom. It uses a relative URI which is relative to the base URI specified in the