Subject: Next page links at the end of a feed

From: Pablo Castro <[email-masked]>
Date: Fri, 21 May 2010 00:06:52 +0000

We are running into a conflict between compliance and efficiency in OData (Astoria) and I wanted to bring it up in case we're not the first ones to run into this.

The Atom spec requires all the atom:link elements in a feed to come before the actual entries (section 4.1.1 of the RFC). The problem is that in order to compute the continuation token that will go in the href of the next link we need to "see" the last entry we'll put on the wire when returning a partial collection. The requirement of having the link before the entries would force us to buffer all the entries, compute the next link, write the link and then write the entries. In order to allow for a fully streaming server implementation, it would be great if it were acceptable for the next link to show up after the entries, at the end of a feed.

Has anybody else run into this? At this point I'm not sure if existing clients would choke when seeing a link in a different place. Is there a way we could change this assuming folks see this as a reasonable thing to relax?

Thanks

-pablo

---

From: eric scheid <[email-masked]>
Date: Fri, 21 May 2010 16:53:22 +1000

On 21/5/10 10:06 AM, "Pablo Castro" <[email-masked]> wrote:

> The Atom spec requires all the atom:link elements in a feed to come before the
> actual entries (section 4.1.1 of the RFC).

Really?

The only time the spec references the question of significance of order of
child elements (eg. atom:entry in atom:feed, child elements of atom:entry,
child elements in a Person construct, etc) it is quite clear that no
significance is assigned.

In context of RFCs, the "exception proves the rule" doctrine does not apply.

Note too that the RELAX NG expressions in the spec are _informative_ only,
and not _normative_.

   "Some sections of this specification are illustrated with fragments of
    a non-normative RELAX NG Compact schema. However, the text of this
    specification provides the definition of conformance."

Since the _text_ spells out no MAY SHOULD MUST specification for the order
of child elements of atom:feed at all, this means there is no such
requirement in effect.

Feel free to to put your atom:link elements following your atom:entry
elements.

e.

---

From: James Snell <[email-masked]>
Date: Fri, 21 May 2010 00:46:33 -0700

Hmmm... from Section 4.1.1.... "Its element children consist of
metadata elements followed by zero or more atom:entry child elements."

This is pretty clear. The entries are expected to come last.

-- 
- James Snell
  http://www.snellspace.com
  [email-masked]