RSS Feed Introduced

12th November 2003 · Last updated: 5th October 2016


This website now has an experimental XML RSS 2.0 feed. Please test it out and see if it works. This allows you to grab a concise version of the news on the front page. If you have a news aggregator program, you can process the news file in the same way you would from other sites offering similar feeds. Here it is:

RSS News Channel

I have added a stylesheet so visitors clicking on the link to the feed don't just get raw XML.

Here's where I need your help. I can't see a way to style the Dublin Core elements I've added, namely <dc:relatedlink> and <dc:date>. In fact I'm not even sure if the first one is valid or not. Only it seemed a good idea to add a link that's related to the news post. Otherwise RSS does not have a standard way to include hypertext links in its fields. Other people have included HTML as embedded data in their feeds, but I want to avoid that route for now. The simpler, the better. (Note: I've tried a Javascript routine to replace the text with links but can't get it to work. Maybe later.)

So I tried styling the custom tags but nothing happens. It's possibly down to the semi-colons in the names which are confusing the CSS. If so, how do you do it? This doesn't work:

item dc:date:before {font-weight:bold; content:"Date: ";}

Can you see why? The semi-colon is reserved for things like "before" and "hover". But just styling "dc" doesn't work either. I even tried escaping the semi-colon, unless I did it incorrectly.

If this can't be done, then how do you style such elements? Must they always be hidden? Or similar genuine RSS tags used instead?

Comments (15)

Comments are locked on this topic. Thanks to everyone who posted a comment.

  1. Moose:
    You can do it via direct adjacent selectors. Assume that your < dc:xxx > tag is inside an item (presumably the last child). Let's assume for the sake of presentation that the last non-dc tag is the < language >. You do it thus:

    item>language+* {color: red;}

    Works. I checked.


    Posted on 12th November 2003 at 9:29 pm
  2. Dysfunksional.Monkey:
    Escape the first colon. CSS thinks its looking at a pseudo element, when infact its a literal.

    item dc\:date:before {font-weight:bold; content:"Date: ";}

    Posted on 13th November 2003 at 9:26 am
  3. Chris Hester:
    Great work guys!

    I tried using an escaped colon before but it didn't seem to work. But the code above does!

    Only one thing. This works perfectly in Opera (7.2) but the "Date" text doesn't appear in Mozilla (1.5).

    The good thing is, whatever your browser, you still get the main content. Most of it should be fairly obvious.

    I won't mention the browser with the largest userbase that can't yet handle generated content here... :-)

    Posted on 17th November 2003 at 7:31 pm
  4. Dysfunksional.Monkey:
    If you're going to style an XML sheet/RSS feed and want it to be cross-browser compatible (yes, that means IE), really the best way to do it is to use an XSL stylesheet as well as the CSS.

    < ?xml-stylesheet type="text/xsl" href="rss.xsl" ?>

    That way, your feed gets the full XHTML treatment, and you can include attributes along with the entities without having to rely on CSS Generated content. ;-)

    Posted on 18th November 2003 at 9:49 am
  5. Moose:
    He doesn't have to cater to IE. It's his personal site, and basic compatibility is already provided. Extra gravy goes only to those browsers that deserve it.

    Lowest common denominator thinking is not what I would recommend a friend...

    Don't give up on GC, Chris!


    Posted on 20th November 2003 at 6:43 am
  6. Dysfunksional.Monkey:
    "Extra gravy goes only to those browsers that deserve it."

    Thats reminiscent of the old days when developers, during the youth of the web, would code for netscape and 'balls to the other browsers'. They've learned their lesson. I should hope you change your attitude. If a site is on the internet, and isn't secured from visitors, then it should be viewable from any browser, not just the ones that like gravy.

    You never know when you'll have to use lynx [or similar] to get that little bit of information you need.

    Posted on 21st November 2003 at 8:58 am
  7. Moose:

    No, you have misunderstood me. I am all for accessibility, usability, etc. What I meant is that extra gravy should not be denied to browsers that can process it. We were talking about generated content. A site with no generated content added and that with one added will be as usable to IE and lynx and old NN as it is to Opera, Safari, etc.

    GIving up on GC was the issue, and that's what I meant. I completely agree with what you said, and I think we do not differ at all in our outlook. Yet I think you've misinterpreted my comment.



    Posted on 21st November 2003 at 1:24 pm
  8. Chris Hester:
    Could this idea offer a way to mimic generated content in IE? I'm not sure I understand it.

    Posted on 21st November 2003 at 9:38 pm
  9. Dysfunksional.Monkey:
    "A site with no generated content added and that with one added will be as usable to IE and lynx and old NN as it is to Opera, Safari, etc."

    Possibly not. If you have a form, which uses generated content for the field labels/titles, NN4/IE users won't know what they're for at all.

    Praise the day when all browsers used on the net allow for generated content. Until then, think about the little guy stuck on IE4 at work. ;-)

    Posted on 24th November 2003 at 9:43 am
  10. Moose:

    Oh no. I may think of some IE4 user sitting out there locked into an inefficient framework. But then if we all catered only to the lowest common denominator, we wouldn't have achieved or progressed anything.

    They get all content. That's enough. That's more than enough, since we don't spam them with bloated code.

    Any technique may be killed at birth because iCab doesn't support it. In the same vein, we shouldn't close luxury sections in our department stores just because some can't afford the commodities. The store is open for all, all can see and touch the commodities, but only some will be able to afford some goods.

    I believe in css-discrimination, which may be translated into: content for all, and equality for equals, style-wise.

    respectfully disagreeing,


    Posted on 24th November 2003 at 6:24 pm
  11. Dysfunksional.Monkey:
    Please do not take my comments the wrong way moose, I do agree with you regarding css-discrimination. But I also believe greatly in useability.

    Sites need to be useable. Content needs to be understood. If you're using generated content to inform people of what something is, then you need to cater for those who can't see the generated content.

    Much in the same way that if your department store has wonderful, marvelous items for display on the second floor, and nobody provides a sign to state so, then nobody will know how to get there.

    Remember, those who can't afford it would still like to know what it is, just incase auntie jo pops her clogs and leaves her millions to them. ;-)

    Posted on 24th November 2003 at 7:29 pm
  12. Chris Hester:
    I think the best idea may to be filter the file first using PHP and output it as XHTML + CSS. That way everyone gets the same content.

    Posted on 24th November 2003 at 7:56 pm
  13. Chris Hester:
    I didn't realise there was an RSS Feed Validator (published by Mark Pilgrim and Sam Ruby no less!) so I fed my feed through it. The only error was the empty comments tags I'd left in, when posts didn't have a link for comments.

    Apparently, according to Mark who was kind enough to help me out, I should supress the tags if they're empty. This seems daft to me, as an empty tag is still valid XML. Anyway, who am I to question the RSS spec?

    So I took out any empty tags but now the generated content is putting text on the wrong lines, so I've had to ditch the stylesheet.

    I plan to parse the feed instead with PHP and output it as XHTML. That way it'll look the same for all decent browsers. (I know I should use XSL but that's beyond me right now. PHP does have a built-in XML parser though, which can be used in a very basic manner to replace each XML tag with a suitable XHTML one. It might even be better not to use the parser at all and just use a PHP script to replace the tags in the file directly.)

    So for now... raw XML! :-D

    Posted on 30th November 2003 at 12:43 am
  14. Moose:
    <cite>Apparently, according to Mark who was kind enough to help me out, I should supress the tags if they're empty. This seems daft to me, as an empty tag is still valid XML. Anyway, who am I to question the RSS spec?</cite>


    What does it mean: "to suppress the tags"? It's a serious question, I lack the vocabulary :-O

    In Atom, which I looked into recently, they force us to use tags which are unnecessary. The format seems to be optimized for multi-user weblogs. I have to specify an author of a post, although it's redundantly ridiculous for a one-person site! Also, there are two too many mandatory elements.

    As far as questioning goes, I like to recall what good old Kierkegaard said: "omnibus dubitandum est". In today's language, that Latin phrase may be paraphrased in at least the following ways:

    i. everything's disputable

    ii. those who refuse to be questioned do not deserve any respect

    iii. the right to question, contest, and dispute is the fundamental right of homo sapiens

    iv. indisputable ideas are not scientific, because they cannot be rejected - i.e. they do not validate in the most general validator out there, the methodological validator


    I'm sorry to hear you have given up CSS in favor of XSL.... Perhaps you can give generated content another chance???

    Brendan O'Moose

    Posted on 1st December 2003 at 3:15 pm
  15. Chris Hester:
    'What does it mean: "to suppress the tags"? It's a serious question, I lack the vocabulary.'

    In other words, leave the tag out for that entry.

    Posted on 1st December 2003 at 7:48 pm