Skip Menu |

This queue is for tickets about the XML-RSS CPAN distribution.

Report information
The Basics
Id: 54135
Status: open
Priority: 0/
Queue: XML-RSS

People
Owner: Nobody in particular
Requestors: user42 [...] zip.com.au
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: guid default isPermaLink=true
Date: Sat, 30 Jan 2010 08:15:38 +1100
To: bug-XML-RSS [...] rt.cpan.org
From: Kevin Ryde <user42 [...] zip.com.au>
With XML::RSS 1.47 and recent debian i386 perl 5.10.1 the program below prints "no permalink" where I expected it to print "http://foo.com/page.html". If I'm not mistaken the rss 2.0 spec is for a default isPermaLink=true if it's omitted from a <guid>, and I believe that's how XML::RSS::LibXML operates.
#!/usr/bin/perl use strict; use warnings; use XML::RSS; my $xml = <<'HERE'; <?xml version="1.0"?> <rss version="2.0"> <channel> <item> <title>Item One</title> <guid>http://foo.com/page.html</guid> </item> </channel> </rss> HERE my $feed = XML::RSS->new; $feed->parse($xml); print $feed->{'items'}->[0]->{'permaLink'} || 'no permaLink', "\n";
From: ogredrew [...] gmail.com
Has anyone even looked at this bug? XML:RSS currently violates the RSS 2.0 spec by assuming a lack of an 'isPermaLink' attribute means false. To make matters worse, there is no way to work around this and do the right thing, as there is no difference from the representation of an attribute-not-found condition and an attribute-set-false condition, which are in fact two desperate and contradictory conditions. Spec is at http://cyber.law.harvard.edu/rss/rss.html
On Sat Jul 06 06:14:13 2013, http://dreamatdrew.dreamwidth.org/ wrote: Show quoted text
> Has anyone even looked at this bug? > XML:RSS currently violates the RSS 2.0 spec by assuming a lack of an > 'isPermaLink' attribute means false. To make matters worse, there is > no way to work around this and do the right thing, as there is no > difference from the representation of an attribute-not-found condition > and an attribute-set-false condition, which are in fact two desperate > and contradictory conditions. > > Spec is at http://cyber.law.harvard.edu/rss/rss.html
A GitHub pull request that fixes this bug (with accompanying tests) would be welcome. XML::RSS is pure Perl and should be relatively easy to fix. Regards, -- Shlomi Fish