h1

Stylin’

2006-05-01

With #code4lib's help, I've now got an XSLT stylesheet that lets browsers turn the existing RSS feed into something resembling HTML. This is a big step for all of the work I'm planning to do, since it means I can apply that knowledge to all the rest of the XSLT stuff.

Huzzah! I really need to cacheize the script so I can share the URL with everyone. I've gotten a lot done today and I'm proud of it.

From an email to the stakeholders (hey guys, put those stakes down, I haven't even got my game face on):

Here's what I did today:

http://%5Bserver name deleted]/cgi-bin/recent.pl?location=fyh&output=rss

Yes, it looks very much like the old version.

What's noteworthy about this version:

  • It's actually an RSS feed, meaning that you can paste the URL into bloglines or any other RSS aggregator. (But please don't; I need to make the script cache its results or else we'll have loads of SQL queries bogging down Sunline.)
  • It also has an XSLT stylesheet attached, which lets us skin it so that it looks just like any other TBLC page or SunCat page. (Theoretically. But then, this was all theoretical to me last week!)
  • It takes input directly from the web ("location=fyh"), strips it of all potentially dangerous code, and uses that input to affect the presentation ("at Remington College") as well as the results of the SQL query.

I can apply this knowledge to make this much more useful, and allow users to get exactly what they want from SunCat. My to-do list for this script follows. (Some of it is notes to myself.)

  • Cache the result so we don't query Sybase every time an aggregator requests the feed.
  • Cache images and don't display images that don't exist.
  • Find a way to pass the image URL without using the RSS 'description' attribute.
  • Fix the SQL query to remove duplicates.
  • Fix the SQL query to retrieve title, author, etc.
  • Fix the SQL query to limit to the most recent N items.
  • Add the option to turn off images. (Don't do this in recent.pl, but pass images=yes or images=no to the XSLT stylesheet.)
  • Add the option to see only checked-in items.
  • Add the option to see new items at all libraries (or at some of them? multiple location params?)
  • Add the option to restrict the search to a given author authority or subject authority.

If none of the above makes sense, you can loosely translate it as "Ben has been getting his hack on and has learned a lot that will help us do a lot of impressive stuff."

Ben

Technorati tags: , , , , ,

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: