James Holderness wrote:
Erik Wilde wrote:
good point. i have not hey thought about how aggregation of aggregated feeds would work. i guess that for the second aggregator, the fact that it is aggregating an aggregated feed should not matter. but then the question is how to treat the <atom:source> and more specifically its via:via="" attribute. so i guess aggregation of aggregated feeds does need some special treatment. how about retaining all the <atom:source> children, but replacing the via:via="" attribute's value with the ID of the aggregated feed?
There should be one and only one atom:source element per entry, reflecting the original source of the entry. If you're aggregating an entry that already has an atom:source, that atom:source element should be left unchanged. See section 4.1.2 of RFC4287: "atom:entry elements MUST NOT contain more than one atom:source element." And 4.2.11: "...by adding an atom:source child element, if it is not already present in the entry".

thanks for pointing that out. i was (almost) proposing to leave atom:source unchanged, with the exception of the foreign markup of the via:via attribute. to not violate the rules you are citing, i could move this information to an extension element as a child of the entry, instead of an attribute of atom:source. so the revised version of the markup would look like this:

<feed xmlns="http://www.w3.org/2005/Atom"; xml:via="...">
<link xml:id="feed1" rel="via" href="http://example.com/feed-A"; />
<link xml:id="feed2" rel="via" href="http://example.com/feed-B"; />
...
<entry>
  <via:via ref="feed1"/>
  <source>
    <link rel="self" href="http://example.com/feed-A"; />

in the first-level aggregation, and the second aggregator would create something like this:

<feed xmlns="http://www.w3.org/2005/Atom"; xml:via="...">
<link xml:id="id1" rel="via" href="http://example.com/feed-C"; />
<link xml:id="id2" rel="via" href="http://example.com/feed-D"; />
...
<entry>
  <via:via ref="id1"/>
  <source>
    <link rel="self" href="http://example.com/feed-A"; />

which would make clear that (a) the entry has been originally published in feed-A, but has been aggregated through feed-C ("id1"). this pattern could be repeated through any number of aggregators. or would the via:via element no simply be a repetition of <link> and it should be like this:

<feed xmlns="http://www.w3.org/2005/Atom"; xml:via="...">
<link xml:id="id1" rel="via" href="http://example.com/feed-C"; />
<link xml:id="id2" rel="via" href="http://example.com/feed-D"; />
...
<entry>
  <link rel="via" href="http://example.com/feed-C"/>
  <source>
    <link rel="self" href="http://example.com/feed-A"; />

if i use this design, the only new markup i need is xml:id on the feed's li...@rel = 'via'] children, but in the end my application would have more strictly defined rules on how to handle <link> when aggregating than what is defined by atom itself. the rules would be:

1. if you aggregate a feed, you must list that feed as a <link rel="via"/> and you must add an @xml:id for it. this id must be stable over time.

2. for each aggregated entry, you must add the feed from which you aggregated it as a <link rel="via"/> on the entry.

these rules ensure that whenever i read an entry from an aggregated feed, there will be a feed/li...@rel = 'via'][exists(@xml:id)] for the entry/li...@rel = 'via'].

cheers,

dret.

Reply via email to