From: http://www.ietf.org/internet-drafts/draft-snell-atompub-feed-index-00.txt
Title: Feed Index: Enabling Ordered Entries in Atom
Reference: IETF Network Working Group, Internet Draft 'draft-snell-atompub-feed-index-00.txt'
Date: July 19, 2005
========================================================================
Network Working Group J. Snell
Internet-Draft July 19, 2005
Expires: January 20, 2006
Feed Index: Enabling Ordered Entries in Atom
draft-snell-atompub-feed-index-00.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 January 20, 2006.
Copyright Notice
Copyright (C) The Internet Society (2005).
Abstract
This memo presents a mechanism that allows feed publishers to
establish a numeric sorting index for the entries contained within a
feed.
Snell Expires January 20, 2006 [Page 1]
Internet-Draft Feed Index July 2005
Table of Contents
1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . 3
2. Notational Conventions . . . . . . . . . . . . . . . . . . . . 3
3. The 'i:indexed' Element . . . . . . . . . . . . . . . . . . . 4
4. The 'i:index' Element . . . . . . . . . . . . . . . . . . . . 4
5. Presenting Ordering Entries . . . . . . . . . . . . . . . . . 4
6. Validation . . . . . . . . . . . . . . . . . . . . . . . . . . 6
7. Security Considerations . . . . . . . . . . . . . . . . . . . 7
8. References . . . . . . . . . . . . . . . . . . . . . . . . . . 7
Author's Address . . . . . . . . . . . . . . . . . . . . . . . 8
Intellectual Property and Copyright Statements . . . . . . . . 9
Snell Expires January 20, 2006 [Page 2]
Internet-Draft Feed Index July 2005
1. Introduction
In syndication document formats such as Atom [I-D.ietf-atompub-
format] and RSS ([http://purl.org/rss/1.0/spec][http://
blogs.law.harvard.edu/tech/rss]), the order of entries as presented
in the list is typically insignificant. This presents a challenge
when the list of entries is intended to represent an ordered list of
elements.
This document specifies a mechanism that allows feed publishers to
specify a numeric index within a feed that may be used to order
entries. Although it refers to Atom normatively, the mechanism
described herein can be used with similar syndication formats, such
as the various flavors of RSS.
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 BCP 14, [RFC2119], as
scoped to those conformance targets.
In this specification, "entry" refers to an atom:entry element or
similar construct from other syndication formats (e.g., RSS) that are
contained within a feed.
In this specification, "feed" refers to an Atom Feed Document or
similar syndication format (e.g., RSS) that contains a collection of
entries.
In this specification, "head section" refers to the children of a
feed document's document-wide metadata container; e.g., the child
elements of the atom:feed element in an Atom Feed Document.
In this specification, "index" refers a nonNegativeInteger as defined
by section 3.3.20 of [W3C.REC-xmlschema-2-20041028].
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;
"i": "http://purl.org/syndication/index/1.0"
This specification uses terms from the XML Infoset [W3C.REC-xml-
infoset-20040204]. However, this specification uses a shorthand; the
phrase "Information Item" is omitted when naming Element Information
Items. Therefore, when this specification uses the term "element,"
it is referring to an Element Information Item in Infoset terms.
Snell Expires January 20, 2006 [Page 3]
Internet-Draft Feed Index July 2005
3. The 'i:indexed' Element
The i:indexed element MAY occur no more than once in a feed's head
section and indicates that the entries within the feed will have an
associated index that may be used to sort the entries. The element's
value MUST be empty.
For example,
The i:indexed element MAY have a sort attribute whose value indicates
the default sort order for indexed entries. The attribute's value
MUST be either "desc" indicating a descending sort order (highest
number first) or "asc" indicating an ascending sort order (lowest
number first). If the sort attribute is omitted, a value of "asc" is
assumed. The value of the sort attribute is case insensitive.
For example,
The i:indexed element MUST NOT contain any other attributes.
A feed that does not contain an i:indexed element MUST NOT contain
any i:index elements.
4. The 'i:index' Element
The i:index element conveys a nonNegativeInteger as specified by
[W3C.REC-xmlschema-2-20041028] used to order entries within a feed.
If the feed's head section contains an i:indexed element, every entry
within that feed MUST have a i:index element. The value of each
i:index element MUST NOT be used more than once within a feed,
ensuring that no two elements ever share the same index value. The
index values are not required to be contiguous.
The i:indexed element MUST NOT contain any attributes.
For example,
1
5. Presenting Ordering Entries
When presented with a feed whose head section contains an i:indexed
element, a consumer MAY present the entries ordered in either an
ascending or descending order based on the value of the i:index
element and the value of the i:indexed element's sort attribute if
present (ascending order if not).
Snell Expires January 20, 2006 [Page 4]
Internet-Draft Feed Index July 2005
For example,
...
tag:entry:1
3
...
tag:entry:2
2
...
tag:entry:3
1
...
When presented, the entries from the example feed would be sorted in
ascending order, or:
1. tag:entry:3
2. tag:entry:2
3. tag:entry:1
While entries within a feed containing an i:indexed element are
required to have i:index elements, a consumer MAY still wish to
display indexed feeds whose entries do not contain indexes. In this
case, entries within an indexed feed that do not contain i:index
elements MUST be displayed at the end of the list regardless of sort
order.
Snell Expires January 20, 2006 [Page 5]
Internet-Draft Feed Index July 2005
For example,
...
tag:entry:1
3
...
tag:entry:2
2
...
tag:entry:3
1
...
tag:entry:4
...
1. tag:entry:3
2. tag:entry:2
3. tag:entry:1
4. tag:entry:4
Consumers are not required to present entries in the order
established by the i:indexed and i:index elements.
6. Validation
It is a validation error if a feed contains an i:indexed element but
one or more of it's entries do not contain an i:index element.
It is a validation error if two i:index elements within a single feed
specify the same nonNegativeInteger value.
Snell Expires January 20, 2006 [Page 6]
Internet-Draft Feed Index July 2005
It is a validation warning if a one or more feed entries contains an
i:index element but the feed head section does not contain an
i:indexed element.
It is a validation error if the i:indexed element contains any
attributes other than sort.
It is a validation error if the i:indexed element's sort attribute,
if present, specifies any value other than "asc" and "desc". The
value is case insensitive. e.g. "asc", "Asc", "ASC", "aSc", etc are
all valid variations of "asc".
It is a validation error if the i:indexed element's value is not
empty.
It is a validation error if the i:index element contains any
attributes.
It is a validation error if the i:index element's value is anything
other than a nonNegativeInteger as specified by [W3C.REC-xmlschema-2-
20041028].
7. Security Considerations
It is possible for malicious intermediaries to alter the indexes
specified for entries within a feed or to alter the default sort
order as specified by the i:indexed element. This risk can be
mitigated by digitally signing the indexed feed such the i:indexed
and i:index elements are covered by the signatures.
8. References
[I-D.ietf-atompub-format]
Sayre, R. and M. Nottingham, "The Atom Syndication
Format", draft-ietf-atompub-format-10 (work in progress),
July 2005.
[RFC2119] Bradner, S., "Key words for use in RFCs to Indicate
Requirement Levels", BCP 14, RFC 2119, March 1997.
[W3C.REC-xml-infoset-20040204]
Tobin, R. and J. Cowan, "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.
Snell Expires January 20, 2006 [Page 7]
Internet-Draft Feed Index July 2005
[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.
Author's Address
James M Snell
Phone:
Email: jasnell@gmail.com
URI: http://snellspace.com
Snell Expires January 20, 2006 [Page 8]
Internet-Draft Feed Index July 2005
Intellectual Property Statement
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.
Disclaimer of Validity
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 Statement
Copyright (C) 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.
Acknowledgment
Funding for the RFC Editor function is currently provided by the
Internet Society.
Snell Expires January 20, 2006 [Page 9]