像ATOM和RSS这样的订阅中的分页是什么?

37

这真的可能吗?

也许可以吧?

<link rel=“next” type=“application/atom+xml” href=”[//path/page2]”></link> 

我不太确定你在这里问什么。你能详细说明一下吗? - Ross McFarlane
我相信他在询问是否可以仅从21-30个源中检索,或类似的内容。 - Samuel Carrijo
相关链接:http://stackoverflow.com/questions/15428056/is-the-atomid-element-unique-per-physical-feed-or-logical-feed - DanMan
2个回答

28

似乎ATOM 允许使用以下语法(第一个谷歌搜索结果 'ATOM feed next/previous'):

<link rel="self" type="application/atom+xml" href="http://www.syfyportal.com/atomFeed.php?page=3"/>
<link rel="first" href="http://www.syfyportal.com/atomFeed.php"/>
<link rel="next" href="http://www.syfyportal.com/atomFeed.php?page=4"/>
<link rel="previous" href="http://www.syfyportal.com/atomFeed.php?page=2"/>
<link rel="last" href="http://www.syfyportal.com/atomFeed.php?page=147"/>

我在RSS上找不到任何信息,但是由于它被称为“真正简单的”聚合,我想这样的功能应该超出了其范围。


1
RSS也代表RDF站点摘要。;) RSS 1.0和2.0之间有很多区别(实际上它们是不同的标准,而不是真正的不同版本)。 - panzi
实际上,在 RSS 2 订阅中使用 atom:link 是被推荐的:https://validator.w3.org/feed/docs/warning/MissingAtomSelfLink.html - Knowleech

20

这在RFC 5005中定义,即“Feed Paging and Archiving”(订阅源分页和归档),第3节

您可以将first、previous、next和last用作链接关系:

<link rel="next" href="http://example.org/index.atom?page=2"/>

不需要额外的 "type" 属性。


1
这是在blogspot.com feed中实现的,同时使用opensearch标签显示总计数。不幸的是,还不是所有的rss阅读器都支持这个功能,但希望这只是时间问题。 - Sergey Ponomarev

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接