Tuesday, December 07, 2004

 

Don't Let The Cat Out...

I have a couple things I want to talk to everyone about over the next few days but for right now I only thought it was fair that I give up the ghost about what that plea for help about RDF was about a few weeks ago.

It all started back in the summer of 2003 when I first heard about a new free (as in beer) service called Audioscrobbler that would track what you listened to and keep a log of what you listened to, compare it to other people, offer suggestions on what to pick up next based on what others listened to, keep track of who was the "biggest fan" of this artist and what artist you listened to most often, and on and on and on forever and ever amen. It's wonderful.

Anyone who want to see what I'm listening to should go check out my profile page. It shows the last 10 tracks I listened to and when I did the listening, as well as some other info about who my current most listened to artists and songs are.

What does RDF have to do with any of this? Well, they offer the same info on the profile pages in RDF format, so you can include them in your website, or whatever. (there are a zillion different things you can do with a piece of XML like the RDF from audioscrobbler, so I won't try to explain them all).

I thought I might wedge part of my Audioscrobbler profile into this blog page so that I'd have a dynamic list of what I'm listening to show up in the toolbar on the left, for example, that would be current whenever it was viewed and I wouldn't have to do anything to change it (thus the use of the word 'dynamic')

Turns out though, (any of my web guru readers out there are welcomed in correcting me if I'm wrong - I hope I am wrong about this actually) in order to give some 'style' to XML so it can be displayed by a web browser you have to transform it with an XSL stylesheet. Which is fine, except that said stylesheet has to be a separate file, located somewhere other than IN the page you're trying to display with the XML info in it. What I wanted was to put some type of stylesheet definition inside the HTML for this page that could transform the XML from the RDF URL and display the results as part of this page. Unfourtunately it doesn't seem to be possible with current standards, which is weird. I think I found a way to do it with Javascript and IE's (ie: Microsoft's) DOM object for parsing, but I refuse to bind functionality to IE (or any other browser) especially since I'm NOT using IE.

So there you have it!

Comments:
You can, in general, put style info in the page header. Try an extra style tag with the type="text/xsl" instead of type="text/css"?

The fine folks at w3schools.com got some styling with CSS though. So that might be of some help.

--jamie
 
I'll give it a shot!
 
Post a Comment



<< Home