Torgo χ (torgo_x) wrote in suggestions,
Torgo χ
torgo_x
suggestions

Give LJ RSS feeds a simple stylesheet

Title
Give LJ RSS feeds a simple stylesheet

Short, concise description of the idea
Copy this CSS file I mention and add one line to your RSS output, and they'll look pretty and informative in modern browsers

Full description of the idea
Current Livejournal RSS feeds (like mine, at http://www.livejournal.com/users/torgo_x/data/rss) don't have a stylesheet, so even modern browsers complain that they can't really show it for lack of a stylesheet.

It's more helpful to define a stylesheet that at least says what this XML file is (notably that it's RSS and what that means), and also shows a bit of the data from the file. I made you one that does that:

http://interglacial.com/temp/lj_rss.css

Making LJ RSSs use this is just a matter of copying the feed onto the LJ server and having the RSS feeds add this as the second line of output: <?xml-stylesheet type="text/css" href="http://www.livejournal.com/__WHEREVER__/lj_rss.css"?>

For example, here's my feed with just that line added, so you can see what it looks like: http://interglacial.com/temp/lj_torgox.rss

This doesn't affect how actual RSS readers process the feed data.

An ordered list of benefits

  • * Users will see a pointer to an explanation of what RSS is, how to use it, etc; and if you point it at a LJ-specific about-RSS page, you can mention there how paid members get a fuller feed provided on their journal.
  • An ordered list of problems/issues involved

  • * Some middle-aged browsers (the "current" MSIE?) will understand most of the RSS but won't understand the :root:before { content: ... } construct that I use to add the "This data file is meant to be read in an RSS reader. See http://interglacial.com/rss/about.html" text. I don't see a way around this.
  • * Old browsers won't understand the directive, since just don't process XML at all. Some other old browsers (some older MSIEs?) don't understand stylesheets, so will just keep doing what they do now -- displaying the XML syntax tree. For this latter group, it might be a good idea to add an XML comment early on in the RSS file containing hte same text that the CSS would have shown them (i.e., "This data file...")
  • * Altho this CSS trick may not work fully (or at all) in some older browsers, it doesn't break anything. I've had stylesheets on my RSS feeds ( http://interglacial.com/rss/ ) for months now and have gotten only positive feedback about it. The W3C also uses a stylesheet for their RSS: http://www.w3.org/2000/08/w3c-synd/home.rss -- but mine's prettier, of course. And I made it custom. For you! For Easter!
  • An organized list, or a few short paragraphs detailing suggestions for implementation

  • * Just copy the CSS file I mention and add one line to the RSS generator code, for the XML style declaration.
  • * Optionally change the "About RSS" URL that the CSS file mentions.
  • * Note that all RSS feeds can share the one common CSS file.
  • Tags: styles, syndication, § historical
    Subscribe
    • Post a new comment

      Error

      Anonymous comments are disabled in this journal

      default userpic

      Your reply will be screened

      Your IP address will be recorded 

    • 13 comments