[Catalyst] Validating RSS feeds
A. Pagaltzis
pagaltzis at gmx.de
Mon Jul 31 21:14:20 CEST 2006
* Jonathan Rockway <jon at jrock.us> [2006-07-31 18:15]:
> Speaking of which, can anything *generate* RSS 2.0?
You don’t want to. RSS 2.0 is broken. The worst misfeature is the
content model, which boils down like this:
Here's something that might be HTML. Or maybe not. I can’t
tell you, and you can’t guess.
There are many other corners where the format is underspecified
and/or broken. (Markup in titles, enclosure arity, RFC822 dates,
no way to specify authors other than by disclosing email
addresses, “funky” feeds, and probably more that I forget.) The
only reason people don’t run into them much is that everyone is
using RSS2 for the same very simple use case, ie. weblogs. If you
try to push RSS2 much harder than that, it breaks.
The better choice is Atom. Every reader supports it at this
point, and it’s a real IETF standard (RSS is only a defacto
standard) with a rigorous spec: RFC 4287. The RFC includes a
(non-normative) RelaxNG grammar, though it doesn’t express all
validation constraints. It is certainly better than no starting
point at all, though. (I’ve pondered writing an extended version
that embeds Schematron to cover the things that RNG cannot… maybe
I should.)
And hey, I have an XML::Atom::SimpleFeed module on CPAN that
makes generation of feeds a very simple task. (Excuse the absence
of useful tests. It’s a work in progress. What’s there works
solidly, though.)
Regards,
--
Aristotle Pagaltzis // <http://plasmasturm.org/>
More information about the Catalyst
mailing list