On Thursday, September 22, 2005, at 10:20 AM, James M Snell wrote:
Antone Roundy wrote:
I was thinking yesterday of suggesting that feed/id be used the way
you're using i:domain. Which is better is probably a matter of
whether ranking domains that span multiple feeds will be useful or
not. In the movie ratings use case presented below, perhaps rather
than a fivestarts scheme and netflix and amazon domains, it might
make more sense to do this:
Using atom:id as the ranking domain would limit the ranking to a
single feed which is useful, but does not cover the full range of
cases.
...
Yes, there are two special cases here:
1. Lack of a i:domain
2. i:domain value that is a same document reference
I think a ranking without a domain is pretty much useless--or at least
likely to lead to problems downstream--so that case doesn't need to be
covered. More on that below.
<xhtml:html>
...
<xhtml:body>
<atom:feed>
<atom:id>Feed1</atom:id>
<i:domain>#</i:domain> <!-- document ranking domain -->
<atom:entry>
<atom:id>A</atom:id>
<i:rank scheme="priority">50</i:rank>
<i:rank scheme="priority" domain="#">20</i:rank>
</atom:entry>
<atom:entry>
<atom:id>B</atom:id>
<i:rank scheme="priority">25</i:rank>
<i:rank scheme="priority" domain="#">40</i:rank>
</atom:entry>
</atom:feed>
<atom:feed>
<atom:id>Feed2</atom:id>
<i:domain>#</i:domain> <!-- document ranking domain -->
<atom:entry>
<atom:id>C</atom:id>
<i:rank scheme="priority">50</i:rank>
<i:rank scheme="priority" domain="#">30</i:rank>
</atom:entry>
<atom:entry>
<atom:id>D</atom:id>
<i:rank scheme="priority">25</i:rank>
<i:rank scheme="priority" domain="#">10</i:rank>
</atom:entry>
</atom:feed>
</xhtml:body>
</xhtml:html>
In this example, the domainless rankings were added when the XHTML
document was created, right? So the XHTML document is essentially an
aggregate feed, just not in Atom format. Would it not make as much or
more sense to mint an ID for the document (call it the ID of a "virtual
Atom Feed Document" if you don't actually create an aggregate feed) and
use it to scope those i:rank elements? If, somehow, someone were to
pull the atom:feeds out of the XHTML document (if atom:feed getting
embedded into xhtml:body is going to happen, then is not atom:feed
getting extracted from xhtml:body also likely?) and aggregate them with
other feeds with domainless i:rank elements, the scopes of those
elements would get mixed.
* Since the urn:(netflix|amazon).com/reviews schemes are feed
independent, it is not necessary to indicate a feed (or "domain") in
this case.
* For a feed-specific scheme, like natural order, the feed ID would
be included like this (so that if these entries were aggregated, it
would be clear that the i:order elements were relevant to the source
feed, not the aggregate feed):
The goal of @scheme is to identify the type of ranking to apply while
the goal of @domain is to identify the scope of the ranking. I do not
believe that it is a good idea to conflate the two.
Okay, I've come to agree with that while writing and editing this
message. Note however that "fivestar" also indicates multiple things:
1) Higher numbers are "better"
2) The range is 0 to 5 (BTW, if this is limited to integers, how will
you handle things like 3.5 stars, which are common in that type of
rating system? Maybe decimal values need to be allowed.)
3) Hint: you might want to display the value as stars
#1 is the only one needed for sorting of entries. #2 would be useful if
the feed reader wanted to display some sort of graphical element to
indicate the ranking. #3 might be slightly useful, but except for the
most popular schemes, would probably be ignored. Perhaps all of these
should be separated, a la:
<i:ranking-scheme
label="Amazon rating"
order="descending"
min-value="0"
max-value="5"
symbol="stars"
domain="urn:amazon.com/customer-rating"
/>
...
<entry>
<i:rank domain="url:amazon.com/customer-rating">3</i:rank>
...where @domain is the feed/id of the feed if there's just one feed in
scope, or a value that won't be duplicated by any feed/id otherwise (if
one can mint a unique feed id, surely one can also mint a unique id
that won't be used for a feed).
I'd suggest that i:ranking-scheme/@domain either default to the
containing feed/id (or the one from atom:source, if it exists) or be
required, i:rank/@domain be required, @order default to ascending,
@min-value default to 0, and the rest of the attributes be optional
with no defaults.