Skip Menu |

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

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

People
Owner: Nobody in particular
Requestors: karjala [...] karjala.org
Cc:
AdminCc:

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



Subject: Allow adding extra XML elements
I need to add pubsubhubbub links to my RSS 2.0 feeds. See https://pubsubhubbub.googlecode.com/git/pubsubhubbub-core-0.3.html#discovery Also to remove the validator warning from my RSS 2.0 feed, I must add <atom:link href="$url" rel="self" type="application/rss+xml" /> as the first child of <channel>, and change <rss to <rss xmlns:atom="http://www.w3.org/2005/Atom" - Then my feed validates 100%. Doing these changes with a regex could be fragile. Therefore, I think it might be best if your module would somehow support them. But maybe not. Feel free to close my ticket.
Subject: [rt.cpan.org #96027] - Already possible in some cases
Date: Fri, 17 Oct 2014 15:50:55 +0100
To: bug-XML-RSS [...] rt.cpan.org
From: Athanasius <cpan [...] miggy.org>
I came across this bug after encountering the same atom-related validation error. It turns out that XML::RSS's modules facility will allow you to add this stuff: $self->{'rss'} = XML::RSS->new(version => '2.0'); $self->{'rss'}->add_module(prefix => 'atom', uri => 'http://www.w3.org/2005/Atom'); $self->{'rss'}->channel( ... atom => { 'link' => { 'href' => '<self URL>', 'rel' => 'self', 'type' => 'application/rss+xml' } } ); Results in: <rss version="2.0" xmlns:blogChannel="http://backend.userland.com/blogChannelModule" xmlns:atom="http://www.w3.org/2005/Atom" Show quoted text
>
<channel> ... <atom:link href="<self URL>" rel="self" type="application/rss+xml"/> ...