如何在 RSS 提要中实现创建与更新
我想实现一个 RSS 提要,其中的项目具有可区分的创建和更新日期。
我有一个可以显示差异的自定义应用程序,但我希望“普通”RSS 阅读器回退到更新日期。
我可以将
和
颠覆为一个或另一个,但 feedvalidator.org 通知两者不应同时使用同一时间。
我可以包含一个命名空间来区分创建日期和更新日期吗?或者我被迫创建自己的?
为自定义字段创建自己的命名空间有何影响?
I'd like to implement an RSS feed that has items that have distinguishable created and updated dates.
I have a custom application that can display the difference, but I'd like "normal" RSS readers to fall back to the updated date.
I could subvert <pubDate>
and <dc:date>
to be one and the other, but feedvalidator.org informs that the both shouldn't be used at the same time.
Is there a namespace I could include that distinguishes between created and updated dates? Or am I forced to create my own?
What are the implications of creating your own namespace for custom fields?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我自己也想知道这个问题。原子提要区分创建的和更新的,并且原子元素可以包含在 rss2 中。所以你可以做的是添加一个atom命名空间,然后添加
2011-11-04T19:54:53Z
我不知道这是否得到任何读者的支持,但它符合标准,并提供了区分两者的选项。
I was wondering this myself. Atom feeds distinguish between created and updated, and atom elements can be included in rss2. So what you can do, is add an atom namespace, and then add in
2011-11-04T19:54:53Z
I don't know if this is supported by any readers, but it complies with standards, and gives the option to distinguish between the two.