aureliendavid/rsspreview

Atom feeds are missing alternative (multiple) links

Closed this issue · 4 comments

quassy commented

An Atom feed entry can have multiple link elements, but RSSPreview will only display the first one, making you miss the others. Maybe alternative links could be displayed under a collapsible element.

hi,

thanks for the report

do you have an example feed to test this?

quassy commented

I could not quickly find a classic usecase like a blog or podcast (where it's often used to link to mp3 and ogg at the same time), but Atom is also quite common for open data source like this example of 3D buildings in the German state Thüringen: This has 4390 different links but only the first is displayed.

Hello,

Sorry for the very delayed response.

The feed you linked as an example is not really an atom/rss feed and seems to be using some specific xml stuff related to geographic data on top of the atom format.

Specifically, the links you mention are written in the source as:

<link rel="section" href="https://geoportal.geoportal-th.de/3dgebaeude/LoD1/LoD1_32_598_5696_2_TH.zip" type="application/zip" hreflang="de" title="LoD1_32_598_5696_2_TH.zip" bbox="51.4063962834009 10.4090023229567 51.4247237040546 10.4383120257587"/>
<link rel="section" href="https://geoportal.geoportal-th.de/3dgebaeude/LoD1/LoD1_32_598_5692_2_TH.zip" type="application/zip" hreflang="de" title="LoD1_32_598_5692_2_TH.zip" bbox="51.3704400097224 10.407898210323 51.3887671036319 10.4371842403712"/>
<link rel="section" href="https://geoportal.geoportal-th.de/3dgebaeude/LoD1/LoD1_32_598_5694_2_TH.zip" type="application/zip" hreflang="de" title="LoD1_32_598_5694_2_TH.zip" bbox="51.3884181765116 10.4084499811298 51.4067454337052 10.4377478413427"/>
...

In the atom format, as you correctly mentioned, an entry can have multiple link elements, but the rel attributes dictates what kind of link it is.

The atom format describes the possible values here: https://datatracker.ietf.org/doc/html/rfc4287#section-4.2.7.2

Notice that the value section for the rel attribute doesn't exist in the rfc.

Basically a feed entry (rss or atom) usually have 2 kinds of links:

  • the main link of the entry (e.g.: the link to the article for a website feed) ; in a atom feed it will usually be the rel="alternate" link
  • one or many enclosure links (basically attachments, mostly used for podcast feeds to link the audio files) ; in atom rel="enclosure"

rsspreview handles correctly multiple enclosures for an entry (like your example of a podcast linking mp3 and ogg files)

if I download the feed you linked and replace all rel="section" by rel="enclosure", it will display like this:

image

which I assume is closer to what you wanted to see.

So I think there is no bug here, we can't really support all kinds of custom feeds that don't follow the standards.

Don't hesitate to reopen if you find other examples, there might actually be an issue to fix.

Thanks for reporting and sorry again for the late response.

Thanks for your time and analysis! It makes complete sense. I checked the document again and it turns out it's not even supposed to be normal Atom or RSS but a specialized OGC GeoRSS format, so it's perfectly reasonable to not support it here :)