Skip Menu |
 
rt.cpan.org will be shut down on March 1st, 2021.

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
MIME-Version: 1.0
X-Mailer: MIME-tools 5.504 (Entity 5.504)
Content-Disposition: inline
X-RT-Interface: Web
Message-ID: <rt-4.0.18-10748-1401254779-1975.0-0-0 [...] rt.cpan.org>
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
X-RT-Encrypt: 0
X-RT-Sign: 0
Content-Length: 576
Download (untitled) / with headers
text/plain 576b
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.
MIME-Version: 1.0
X-Spam-Status: No, score=-1.901 tagged_above=-99.9 required=10 tests=[BAYES_00=-1.9, SPF_HELO_PASS=-0.001] autolearn=ham
Content-Disposition: inline
X-Spam-Flag: NO
X-GPG-Key: http://www.fysh.org/~athan/gpg-key
X-RT-Interface: API
X-GPG-Fingerprint: E218CE1D
X-Virus-Scanned: Debian amavisd-new at bestpractical.com
Message-ID: <20141017145055.GM7192 [...] fysh.org>
content-type: text/plain; charset="utf-8"
X-RT-Original-Encoding: utf-8
X-Spam-Score: -1.901
Received: from localhost (localhost [127.0.0.1]) by hipster.bestpractical.com (Postfix) with ESMTP id D3868240623 for <cpan-bug+XML-RSS [...] hipster.bestpractical.com>; Fri, 17 Oct 2014 10:51:04 -0400 (EDT)
Received: from hipster.bestpractical.com ([127.0.0.1]) by localhost (hipster.bestpractical.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id furluKhbqeCB for <cpan-bug+XML-RSS [...] hipster.bestpractical.com>; Fri, 17 Oct 2014 10:51:03 -0400 (EDT)
Received: from la.mx.develooper.com (x1.develooper.com [207.171.7.70]) by hipster.bestpractical.com (Postfix) with SMTP id 2A3D1240439 for <bug-XML-RSS [...] rt.cpan.org>; Fri, 17 Oct 2014 10:51:02 -0400 (EDT)
Received: (qmail 14938 invoked by alias); 17 Oct 2014 14:51:02 -0000
Received: from river.fysh.org (HELO river.fysh.org) (5.135.154.127) by la.mx.develooper.com (qpsmtpd/0.28) with ESMTP; Fri, 17 Oct 2014 07:50:59 -0700
Received: from athan by river.fysh.org with local (Exim 4.80 #2 (Debian)) id 1Xf8rn-0008Cc-9w for bug-XML-RSS [...] rt.cpan.org; Fri, 17 Oct 2014 15:50:55 +0100
Delivered-To: cpan-bug+XML-RSS [...] hipster.bestpractical.com
Subject: [rt.cpan.org #96027] - Already possible in some cases
User-Agent: Mutt/1.5.21 (2010-09-15)
Return-Path: <cpan [...] miggy.org>
X-Spam-Check-BY: la.mx.develooper.com
X-Original-To: cpan-bug+XML-RSS [...] hipster.bestpractical.com
X-RT-Mail-Extension: xml-rss
Date: Fri, 17 Oct 2014 15:50:55 +0100
X-Spam-Level:
To: bug-XML-RSS [...] rt.cpan.org
From: Athanasius <cpan [...] miggy.org>
RT-Message-ID: <rt-4.0.18-2382-1413557465-330.96027-0-0 [...] rt.cpan.org>
Content-Length: 678
Download (untitled) / with headers
text/plain 678b
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"/> ...


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.