Is any FmH reader out there good with XML and XSL? If so, I would appreciate help with the following. I have a hankering to display the song currently playing in iTunes here on the weblog page, and have gotten hold of an iTunes plugin that, every time the song changes in iTunes, will write and automatically FTP to my site an XML file like so:
[?xml version=”1.0″ encoding=”iso-8859-1″ ?]
[?xml-stylesheet type=”text/xsl” href=”http://world.std.com/home/dacha/WWW/emg/public_html/playing.xsl”?]
[now_playing playing=”1″]
[song]
[title]Here is the title of a song[/title]
[artist]Song Artist[/artist]
[album]The Album That It Comes From[/album]
[/song]
[/now_playing]
[I have changed the angle brackets enclosing the markup tags to square brackets, of course, so it won’t be parsed as code.]
What I want to do is to put an [iframe] on the webpage whose “src=” points to the XML file, formatted with this XSL stylesheet. However, when I try to look at now_playing.xml, I can do so fine in Internet Explorer but my preferred browser Mozilla tells me,
“Error loading stylesheet: An XSLT stylesheet does not have an XML mimetype:
http://world.std.com/home/dacha/WWW/emg/public_html/playing.xsl”
What am I doing wrong? Can anyone see? I’d be grateful if someone who knows something about this stuff could spot the error of my ways and let me know. Is there another way to grab the title, artist and album information from the XML file to write to an HTML document like my weblog template, without using scripting languages that my server does not permit me?
[Of course, you can feel free to tell me if the entire endeavor seems absurd to you in the first place…]
