March 08, 2004

Enriching Amazon RSS feeds

A few days ago Amazon published some RSS feeds for some of their categories.
This is a simple application of their great Web Services APIs, released since 2 years already, and of their XSLT service.

These feeds were possible before but you had to craft your own stylesheet.
Now that these feeds have a page of their own, regular people will be able to point their RSS agrregator to these using the orange XML buttons instead of having to create their own xsl first :-)

I've started looking at the Amazon APIs in the past 2 weeks: I had played with Google's APIs last year, but not with Amazon's yet.
They cover much more functionalities.

This new RSS feature prodded me to go a bit further.
I've enriched their default stylesheet a bit to enrich the Amazon feeds with informations taken from the AllConsuming seb site, such as the number of weblogs which mentioned the book in the past 60 days, and the urls to these weblogs.
These informations are already present in AllConsuming feeds, but now you can add them directly to the amazon feeds.
This is accomplished thanks to the REST interface that AllConsuming offers to poll the data out of its site.

The stylesheet polls AllConsuming for each isbn and formats the returned data in HTML in the description entry.
I can then read that in my Desktop RSS NewsReader, NetNewsWire.

This is a first draft and it needs more work, but I found it to be a good demo for the benefits XML, REST, SOA, WS and other acronyms you may have heard of but don't know what use they could be for you.

The stylesheet is at
It just adds a few lines to the original

It works when invoked locally on my machine (I launch it from ant), but doesn't work when using Amazon's xslt service.

I think it is because they must forbid accessing external urls using the document() function in your stylesheet, which I can understand.
I need to host a simple xsl service on my box... maybe tomorrow.

Note: in order to get some HTML in the description that displays nicely in NetNewsWire I had to escape all markup in my xslt, which reminded me of Norman Walsh' excellent thread "escaped markup considered harmful".
Norm was so right !

Posted by chanezon at March 8, 2004 07:27 PM | TrackBack
Post a comment

Remember personal info?