我只是嘗試了Grails的飼料,插件http://grails.org/Feeds+PluginGrails的飼料,插件,<pubDate> && <dc:date>,驗證錯誤
它的工作原理很簡單,很好,但there's有一件事我不明白。
只要我添加了一個publishedDate
,如:
reviews.each() {
review -> entry('fooTitle'){
publishedDate = review.dtCreated
review.rating + ' ' + review.comment
}
}
它產生兩個標籤:
<pubDate>Tue, 04 Sep 2012 12:10:02 GMT</pubDate>
<dc:date>2012-09-04T12:10:02Z</dc:date>
在數據庫中的條目是:
"dtCreated": ISODate("2013-01-15T00:52:47.0Z"),
,但我只想要要生成<pubDate>
,因爲Feed驗證器會拋出此錯誤:
An item should not include both pubDate and dc:date
我該如何解決這個問題?我很樂意使用這個插件,但我需要一個有效的RSS。
是我的問題真的那麼unsolveable裏面? – 2013-02-26 10:49:03
您正在使用哪種Feed驗證器? – lucke84 2013-02-27 17:09:16
使用http://validator.w3.org/feed/ – 2013-02-28 10:22:11