I did a quick review of Zend_Feed, finding that there is a namespace
registration which seems to be in trouble, but not sure, and it need probaly to switch the item tag of entryRSS class, or add a new entryRDF class.

It's not a matter, but as this the www.php.net feed, it's humoristic (-;

I have the exact same issue. Any idea when this will be resolved? I've used PEAR's RSS class, no good. I've used Magpie/simplepie, no good. This one was able to parse all of the new feeds but cannot parse the 1.0 rdf feeds. So it's the best so far!

Rather than fixing the behavior, I would suggest to add a new RDF class, as proposed in the description of this issue.
RSS 1.0 is completely an other branch compared with RSS 2.0.

The main difference between RSS 0.91 branch (created by Dave Winer) and RSS 1.0 branch (managed by RSS-DEV Working Group) is that the latter is RDF based while RDF architecture has been completely removed in RSS 0.91, RSS 0.92, RSS 2.0.

Additionally, I would suggest to add a new class property to return feed type/version.
The following seems to be a list of formats currently supported by Zend feed:
* Atom 0.3
* Atom 0.5
* Atom 1.0
* RSS 0.91
* RSS 0.92
* RSS 2.0
The following formats should be supported but they are not, right now:
* RSS 1.0
Perhaps a new ticket is the better solution for a new proposal, rather than a comment.

The only difference between RSS 1.0 and other versions that is related to this issue is that item elements are not contained within the channel element. The attached file patch.diff modifies Zend_Feed_Rss to check for this and also patches the appropriate test in the test suite so that, without the patch to Zend_Feed_Rss, RSS 1.0 feed tests will fail.

Posted by Simone Carletti (weppos) on 2008-02-07T15:19:01.000+0000

Hi Matthew,
I gave a look at the patch you submitted a few days ago.

The following line doesn't really makes sense to me.

{quote}
$this->assertTrue($feed->count() > 0);
{quote}

_importRssValid method is an utility method and we cannot assume in advance the file he's going to fetch is not a valid empty feed.
I would create some valid RSS 1.0 unit tests instead.

The other part of the patch, the code fragment that should introduce RSS 1.0 compatibility it's fine, but I think it's incomplete.
Zend_Feed doesn't handle only feed import but it's able to create and edit a feed as well.

Did you think about how an imported RSS 1.0 feed will be printed out?
I assume it would be handled by Zend_Feed_Rss class but this library, as underlined by ZF-44, always returns an RSS 2.0 instance.
It means, an RSS 1.0 come in and an RSS 2.0 come out... I suppose this is not a good workflow.

What do you propose to fix this consequential issue?

For the sake of completeness, I'd like to share an additional though.
http://www.feedparser.org/ is, so far, the best feed parser written in python and probably one of the best feed parsers in the world.
Zend_Feed should probably learn something from this library! :)

Posted by Simone Carletti (weppos) on 2008-06-02T05:05:34.000+0000

Any news on this feature?
I would suggest to change status to unassigned if work is not in progress.

Posted by Benjamin Eberlei (beberlei) on 2008-11-08T00:53:58.000+0000

I am resolving then reoping this bug, since its occupied over a year now.

As far as I'm aware, no conflicting changes have been made to Zend_Feed_Rss since this patch was suggested, so the patch should work. Note that only the portion of the patch for library/Zend/Feed/Rss.php is really needed.

In terms of the portion that patches tests, it may be a better design decision to create an additional supporting method that first calls _importRssValid and then applies a non-empty check, and have all tests with non-empty test data files call that instead of _importRssValid, so that cases where data is expected to be empty can continue to function as normal.

Thoughts anyone?

Posted by Wil Sinclair (wil) on 2008-12-19T15:05:12.000+0000

Matthew, could you please evaluate the proposed solution and determine what we need to do to get this fixed? According to the votes, there seems to be a lot of interest in this issue.

Posted by Matthew Turland (elazar) on 2008-12-19T17:37:59.000+0000

I've considered Simone's point and have updated my patch accordingly. _importRssValid no longer checks the feed item count in this new patch. Instead, it modifies _importRssValid to return the $feed object it creates to be used by the calling method and modifies the two existing RSS 1.0 test methods to check their respective feed item counts.

I've applied my patch to Zend_Feed_Rss in a current SVN checkout to confirm that it still works. If I run the modified unit tests on the unpatched version of this class file, I get this output:

Zend_Feed_Rss#__wakeup() checks if the feed is rdf or not with the following code
but the firstChild of that feed is "xml-stylesheet" and so it is not treated as rdf.
Please improve the check routine.
if ($this->_element->firstChild->nodeName == 'rdf:RDF') {
$this->_element = $this->_element->firstChild;
} else {
$this->_element = $this->_element->getElementsByTagName('channel')->item(0);
}