From: Giulio Piancastelli Date: 2004-11-19T21:23:17+09:00 Subject: Re: (Yet Another?) RSS::Parser test suite Hi Kouhei, I'm going to address your concerns in a moment, but apart from the details of every single test case, I'd like to know your opinion about the employed technique of testing. Indeed, I'd also like to see an example from your current test suite: where could I find such a case? > channel_author.xml: > Why does /rss/channel/author exist? RSS 2.0 spec.(*) > doesn't say it exists. > > (*) http://blogs.law.harvard.edu/tech/rss > > item_enclosure_multiple.xml: > Where is the description of multiple enclosures? > > rss_namespace_*.xml: > Where is the description of RSS with namespace? In fact, I picked up tests from Mark Pilgrim's Universal Feed Parser without effectively worring about RSS specifications and such. I perceive him and his work as somewhat authoritative in the syndication field. On the other hand, checking the specification, nowhere is stated that, for example, there could be multiple enclosure elements in an item; but, there's nowhere to be explicitly said that there could be only ONE enclosure element in an item as well. You just suppose that there's a single enclosure for each item because that's probably the more natural way of thinking about it. My attempt is a proposal to leverage on prior art test cases also as a way to better understand the fragmented world of syndication formats. I firmly believe that, to use test cases from the Feed Validator and Universal Feed Parser project, it is not enough to turn to specifications, especially when those specifications are a sloppy as the RSS 2.0 one: there's something new to learn, and something old to re-learn at every step. See my comments about RSS plus Dublin Core and RSS versions as an example of that. > rss_version_090.xml: > RSS Parser doesn't support RSS 0.9. OK, so feel free to change the test, or the Ruby driver. As I previously stated, some errors are due to my being unfamiliar with the whole model used by RSS::Parser. This is probably one of such cases. Besides, my driver just tries to do some tests on the RSS 2.0 parser: if you are going to adopt such testing technique, you'll probably have to write different drivers for different RSS versions (especially 1.0 and 2.0) or require more modules, depending on how you implemented things. Anyway, this means that the driver would have to be modified in the future. > rss_version_201.xml: > I can't understand what means this test. > > rss_version_21.xml: > ditto. "There are more RSS version in heaven and earth, Horatio, than are dreamt of in your philosophy." ;) See: http://diveintomark.org/archives/2004/02/04/incompatible-rss > > For example, I've imported 'rss/dublincore' but > > still seem to be unable to access 'dc_subject' and 'dc_author' fields > > in both item and channel. > > Where is the specification of RSS 2.0 with Dublin Core? I > can't support it, if it doesn't exist. Because of > validation. There is obviously NO specification of RSS 2.0 with Dublin Core. If it were, you'll have to provide a similar specification for EVERY SINGLE NAMESPACE people would like to add elements from, and this is quite unfeasible, you see. On the other hand, the RSS 2.0 specification you pointed me to says: "RSS 2.0 adds that capability [of being extensible], following a simple rule. A RSS feed may contain elements not described on this page, only if those elements are defined in a namespace." These days a number of RSS 2.0 feeds offer Dublin Core elements. Even if there could be an arguable degree of funkiness within those practices, that's a fact you definetely have to cope with. Best Regards, Giulio Piancastelli.