| Network Working Group | M. Pilgrim |
| INTERNET DRAFT | IBM |
| <draft-ietf-atompub-autodiscovery-01.txt> | May 2005 |
| Category: Standards Track | |
| Expires: November 2005 |
Atom Feed Autodiscovery
draft-ietf-atompub-autodiscovery-01.txt
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 in November 2005.
Copyright (C) The Internet Society (2005). All Rights Reserved.
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 <link> element.
To provide feedback on this Internet-Draft, join the atom-syntax mailing list (http://www.imc.org/atom-syntax/index.html).
1
Introduction
2
Notational Conventions
3
Relationship to HTML and XHTML
3.1
Definition of an autodiscovery element
3.2
Syntax rules inherited from HTML
3.3
Syntax rules inherited from XHTML
4
Required attributes
4.1
rel attribute
4.2
type attribute
4.3
href attribute
5
Optional attributes
5.1
title attribute
6
Multiple autodiscovery elements
7
Examples
7.1
rel attribute variations
7.2
type attribute variations
7.3
Link element variations
7.4
HTML variations
8
IANA Considerations
9
Security Considerations
§
Normative References
§
Informative References
§
Author's Address
A
Contributors
B
Revision History
§
Intellectual Property and Copyright Statements
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 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 could also be built directly into future versions of desktop web browsers.
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].
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 <head> element of an HTML or XHTML document, but it MUST NOT appear within the <body>.
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:
XHTML [W3C.REC-xhtml1-20020801] is a reformulation of HTML in XML [W3C.REC-xml-20001006]. It also defines a <link> 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:
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.
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 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.
The href attribute MUST be present in an Atom autodiscovery element, and its value MUST be the URI [RFC2396] 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 [RFC2396]) using the document's base URI (section 12.4 of HTML 4 [W3C.REC-html401-19991224]).
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.
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.
An HTML or XHTML document MAY contain one or more Atom autodiscovery elements. If multiple autodiscovery elements are present in a single document:
The following is a non-exhaustive list of valid rel attributes for an Atom autodiscovery element in an HTML or XHTML document:
In an HTML document, the following forms are also valid:
The following are examples of valid type attributes for an Atom autodiscovery element in an HTML or XHTML document:
In an HTML document, the following form is also valid:
Each of the following examples represents an Atom autodiscovery 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.
<link rel="alternate" type="application/atom+xml" href="http://www.example.com/xml/index.atom">
<link rel="alternate" type="application/atom+xml" href="xml/index.atom">
<link rel="alternate" type="application/atom+xml" href="/xml/index.atom">
<link rel='alternate' type='application/atom+xml' href='http://www.example.com/xml/index.atom'>
<link rel=alternate type='application/atom+xml' href="http://www.example.com/xml/index.atom">
<link rel="AlTeRnAtE" type="application/atom+xml" href="http://www.example.com/xml/index.atom">
<link rel="alternate" type="APPLICATION/ATOM+XML" href="http://www.example.com/xml/index.atom">
<LINK REL="alternate" TYPE="application/atom+xml" HREF="http://www.example.com/xml/index.atom">
<link href="http://www.example.com/xml/index.atom" type="APPLICATION/ATOM+XML" rel="alternate">
<link rel="alternate foo" type="application/atom+xml" href="http://www.example.com/xml/index.atom">
<link rel="foo alternate" type="application/atom+xml" href="http://www.example.com/xml/index.atom">
<link rel="foo alternate bar" type="application/atom+xml" href="http://www.example.com/xml/index.atom">
<link rel="Alternate" type="application/atom+xml" href="http://www.example.com/xml/index.atom">
<link rel="alternate" type="application/atom+xml" href="http://www.example.com/xml/index.atom">
Each of the following examples represents an Atom autodiscovery 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.
<link rel="alternate" type="application/atom+xml" href="http://www.example.com/xml/index.atom" />
<link rel="alternate" type="application/atom+xml" href="xml/index.atom" />
<link rel="alternate" type="application/atom+xml" href="/xml/index.atom" />
<link rel='alternate' type='application/atom+xml' href='http://www.example.com/xml/index.atom' />
<link rel="AlTeRnAtE" type="application/atom+xml" href="http://www.example.com/xml/index.atom" />
<link rel="alternate" type="APPLICATION/ATOM+XML" href="http://www.example.com/xml/index.atom" />
<link href="http://www.example.com/xml/index.atom" type="APPLICATION/ATOM+XML" rel="alternate" />
<link rel="alternate foo" type="application/atom+xml" href="http://www.example.com/xml/index.atom" />
<link rel="foo alternate" type="application/atom+xml" href="http://www.example.com/xml/index.atom" />
<link rel="foo alternate bar" type="application/atom+xml" href="http://www.example.com/xml/index.atom" />
<link rel="Alternate" type="application/atom+xml" href="http://www.example.com/xml/index.atom" />
<link rel="alternate" type="application/atom+xml" href="http://www.example.com/xml/index.atom" />
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.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html lang="en">
<head>
<link rel="alternate"
type="application/atom+xml"
href="?format=atom">
</head>
</html>
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 <base> element.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html lang="en">
<head>
<base href="http://www.example.org/">
<link rel="alternate"
type="application/atom+xml"
href="index.atom">
</head>
</html>
This is an example of a complete HTML document located at
http://www.example.com/index.html. It contains three autodiscovery elements that point to Atom feeds at http://www.example.com/xml/index.atom, http://www.example.com/xml/comments.atom, and http://example.org/index.atom respectively. It uses the optional title attribute to label each autodiscovery element.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html lang="en">
<head>
<link rel="alternate"
type="application/atom+xml"
title="Main Atom feed"
href="/xml/index.atom">
<link rel="alternate"
type="application/atom+xml"
title="Recent comments feed"
href="/xml/comments.atom">
<link rel="alternate"
type="application/atom+xml"
title="Atom feed (mirror)"
href="http://example.org/index.atom">
</head>
</html>
This document relies on the registration of the Atom media type, which is defined in [I-D.ietf-atompub-format].
Since the entire purpose of an Atom autodiscovery element is for clients to dereference the URI given in the href attribute, the security issues listed in section 7 of [RFC2396] should be considered.
A publisher could construct a malicious URI in the href attribute, such as a "javascript:" URI to include an inline script, or some other URI scheme that typically launches an external program when dereferenced. Clients should be aware of the security context in which they execute scripts, and they should give the end user the ability to disable the automatic execution of external programs when dereferencing autodiscovery URIs.
| [I-D.ietf-atompub-format] | Nottingham, M, "The Atom Syndication Format", Internet-Draft draft-ietf-atompub-format-08, April 2005. |
| [RFC2119] | Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", BCP 14, RFC 2119, March 1997. |
| [RFC2396] | Berners-Lee, T., Fielding, R.T. and Masinter, L., "Uniform Resource Identifiers (URI): Generic Syntax", RFC 2396, August 1998. |
| [W3C.REC-xml-20001006] | Paoli, J, Sperberg-McQueen, C, Bray, T and Maler, E, "Extensible Markup Language (XML) 1.0 (Second Edition)", W3C FirstEdition REC-xml-20001006, October 2000. |
| [RFC2045] | Freed, N. and Borenstein, N.S., "Multipurpose Internet Mail Extensions (MIME) Part One: Format of Internet Message Bodies", RFC 2045, November 1996. |
| [W3C.REC-html401-19991224] | Hors, A, Jacobs, I and Raggett, D, "HTML 4.01 Specification", W3C REC REC-html401-19991224, December 1999. |
| [W3C.REC-xhtml1-20020801] | Pemberton, S, "XHTML 1.0 The Extensible HyperText Markup Language (Second Edition)", W3C REC REC-xhtml1-20020801, August 2002. |
| Mark Pilgrim | |
| International Business Machines Corporation | |
| 4400 Silicon Drive |
|
| Durham, NC 27713 | |
| US | |
| EMail: | pilgrim@gmail.com |
The following people contributed to this specification's content: Joe Gregorio, Paul Hoffman, and the members of the atom-syntax mailing list.
The IETF takes no position regarding the validity or scope of any intellectual property 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; neither does it represent that it has made any effort to identify any such rights. Information on the IETF's procedures with respect to rights in standards-track and standards-related documentation can be found in BCP-11. Copies of claims of rights made available for publication 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 implementors or users of this specification can be obtained from the IETF Secretariat.
The IETF invites any interested party to bring to its attention any copyrights, patents or patent applications, or other proprietary rights which may cover technology that may be required to practice this standard. Please address the information to the IETF Executive Director.
Copyright (C) The Internet Society (2005). All Rights Reserved.
This document and translations of it may be copied and furnished to others, and derivative works that comment on or otherwise explain it or assist in its implementation may be prepared, copied, published and distributed, in whole or in part, without restriction of any kind, provided that the above copyright notice and this paragraph are included on all such copies and derivative works. However, this document itself may not be modified in any way, such as by removing the copyright notice or references to the Internet Society or other Internet organizations, except as needed for the purpose of developing Internet standards in which case the procedures for copyrights defined in the Internet Standards process must be followed, or as required to translate it into languages other than English.
The limited permissions granted above are perpetual and will not be revoked by the Internet Society or its successors or assignees.
This document and the information contained herein is provided on an "AS IS" basis and THE INTERNET SOCIETY AND THE INTERNET ENGINEERING TASK FORCE DISCLAIMS 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.
Funding for the RFC editor function is currently provided by the Internet Society.