2
我和我的同事正在构建Atom提要。我们正在对许多单独的Atom文档进行分页,并为每个文档添加链接以允许消费者遍历整个Feed。为什么Atom使用这么多不同的链接关系?
我们在想知道哪个link relations我们应该选择指出与Feed中下一个和上一个文档的链接。 REST in Practice使用“next-archive”和“previous-archive”。 AtomPub使用“下一个”和“上一个”。 “prev”是“previous”的可接受别名。
<?xml version="1.0">
<feed xmlns="http://www.w3.org/2005/Atom">
<id>urn:uuid:ff31a040-75bc-11e2-bcfd-0800200c9a66</id>
<link rel="next" href="http://example.com/documents/4" />
<link rel="prev" href="http://example.com/documents/2" />
<entry>..</entry>
<entry>..</entry>
<entry>..</entry>
</feed>
有什么理由选择一套关系而不是其他的?消费者最容易理解哪一点。为什么会有这种多样性?