Subscribe: cogdogblog: XSLT + RSS: Why Pretty for only some browsers or is some implementations? Comments and Trackbacks
http://cogdogblog.com/alan/archives/2004/08/13/xslt_rss.xml
Added By: Feedage Forager Feedage Grade B rated
Language: English
Tags:
atom feed  atom  attempts making  css  curious new  feed  file  making feeds  new attempts  new  oldaily feed  oldaily  safari  xml  xsl 
Rate this Feed
Rate this feedRate this feedRate this feedRate this feedRate this feed
Rate this feed 1 starRate this feed 2 starRate this feed 3 starRate this feed 4 starRate this feed 5 star

Comments (0)

Feed Details and Statistics Feed Statistics
Preview: cogdogblog: XSLT + RSS: Why Pretty for only some browsers or is some implementations? Comments and Trackbacks

cogdogblog: XSLT + RSS: Why Pretty for only some browsers or is some implementations? Comments and Trackbacks



I've been mildly curious about some of the new attempts at making RSS feeds more human readable at first click- rather than seeing ugly XML code, these "new" feed displays use CSS (Style sheets) and some sort of magical transform...



Last Build Date: Fri, 07 Apr 2006 11:38:36 -0700

 



CDB Entry: XSLT + RSS: Why Pretty for only some browsers or is some implementations?

Fri, 13 Aug 2004 22:40:46 -0700

I've been mildly curious about some of the new attempts at making RSS feeds more human readable at first click- rather than seeing ugly XML code, these "new" feed displays use CSS (Style sheets) and some sort of magical transform...



comment by: Stephen Downes

Sun, 15 Aug 2004 09:41:54 -0700

OK, first, repeat after me: nothing works in Safari.

Sure, this isn't strictly true, of course. Some things work. But I canot count how many times I've heard the phrase "that doesn't work in Safari."

So what's happening here? Why does the Atom feed work and the OLDaily feed not?

The OLDaily feed begins with an XML file, like the Atom feed. But the OLDaily feed includes an XSL file, while the Atom feed includes a CSS file.

The difference between the two is that the XSL used by OLDaily will read the data elements and, depending on what it finds, create some output. While the CSS used by the Atom feed will treat the XML as though it were pseudo-HTML and simply apply formatting to it.

The method used by the Atom file is described here: http://starvingartist.stanleysy.com/archives/2004/july/safarithemedrssandatomfeedswithcss/

Exactly the same thing can be done with an RSS feed. Here is an example: http://home.no.net/ldah/kommentarer.xml

So why did I use XSL rather than CSS?

Simply, because XSL gives me many more options than CSS. For example, if I wanted to use Javascript with my RSS file, I could only do this in XSL. If I want to display only a subset of the XML content, such as a list of titles only, then XSL would be my ticket.

Now here's the kicker: Safari doesn't support XSL. Not at all (at least, not to my knowledge, though I have searched the web to confirm this). So when Safari encounters an RSS file, it treats it as though it were HTML, resulting in the bad output you experienced.

So why don't I simply use the CSS method instead of the XSL method?

Mostly, because I have long ago given up on supporting Safari's odd quicks (such as not supporting an entire standard). If you are using Safari, switch. Use Firefox, which (mostly) supports XSL.

More information: http://interglacial.com/~sburke/stuff/pretty_rss.html