Skip Menu |
 

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

Report information
The Basics
Id: 53661
Status: new
Priority: 0/
Queue: XML-Feed

People
Owner: Nobody in particular
Requestors: jwieland [...] gmail.com
Cc:
AdminCc:

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



Subject: Relative Link attributes not being processed properly
Date: Wed, 13 Jan 2010 09:57:16 -0800
To: bug-XML-Feed [...] rt.cpan.org
From: Jason Wieland <jwieland [...] gmail.com>
Download (untitled) / with headers
text/plain 1.8k
The link attribute does not get processed correctly from: http://earthquake.usgs.gov/earthquakes/catalogs/7day-M5.xml Notice the links are relative and should be appended by the base attribute. To test here is a subset of the XML file. Just copy into a file name 7day-M5.xml <?xml version="1.0"?> <feed xml:base="http://earthquake.usgs.gov/" xmlns="http://www.w3.org/2005/Atom" xmlns:georss="http://www.georss.org/georss"> <updated>2010-01-13T17:24:37Z</updated> <title>USGS M5+ Earthquakes</title> <subtitle>Real-time, worldwide earthquake list for the past 7 days</subtitle> <link rel="self" href="/earthquakes/catalogs/7day-M5.xml"/> <link href="http://earthquake.usgs.gov/earthquakes/"/> <author><name>U.S. Geological Survey</name></author> <id>http://earthquake.usgs.gov/</id> <icon>/favicon.ico</icon> <entry><id>urn:earthquake-usgs-gov:us:2010rkb8</id><title>M 5.3, Tonga</title><updated>2010-01-13T16:21:24Z</updated><link rel="alternate" type="text/html" href="/earthquakes/recenteqsww/Quakes/us2010rkb8.php"/><summary type="html"><![CDATA[<img src="http://earthquake.usgs.gov/images/globes/-15_-175.jpg" alt="15.741&#176;S 174.695&#176;W" align="left" hspace="20" /><p>Wednesday, January 13, 2010 16:21:24 UTC<br>Thursday, January 14, 2010 06:21:24 AM at epicenter</p><p><strong>Depth</strong>: 10.00 km (6.21 mi)</p>]]></summary><georss:point>-15.7409 -174.6951</georss:point><georss:elev>-10000</georss:elev><category label="Age" term="Past day"/></entry> </feed> And run this command perl -MXML::Feed -e 'my $feed = XML::Feed->parse("7day-M5.xml"); foreach my $e ($feed->entries) { print $e->link , "\n"; } ' I could not figure out if this bug lies in XML::Feed or XML::Atom. I ran the code through the debugger but for the life of me could not tell how it works. Thanks for you time. Jason


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.