Print

Print


On 3/16/06, Roy Tennant <[log in to unmask]> wrote:
> I'm looking for an XSLT that can detect which version of RSS it is
> being handed and process it appropriately so I end up with the same
> elements out the back no matter what RSS format it was

I don't think XSLT is the way to go on this, given that RSS isn't
always XML nor comes with guarantees of valid nor well-formedness;
your XSLT processor will break. I'd rather do a simple snoop on the
version number, check for well-formedness and *then* possibly send it
to an XSLT script. Also remember that RSS:RDF is a very different
beast to RSS 2.0 for example. My suggested way to handle this is to
convert any RSS feed through a series of PHP/Perl/Ruby/Whatever
scripts to a compliant Atom 1.0 feed, and handle *that* through XSLT.


Alex
--
"Ultimately, all things are known because you want to believe you know."
                                                         - Frank Herbert
__ http://shelter.nu/ __________________________________________________