Listen to this post:

After stumbling upon this post I decided to give XSLT a go.

A few examples

  1. Making my blog’s RSS feed look like my front page: This site’s RSS feed visually mimics its front page .

  2. Prettifying the output of my feed generator .

  3. Beautiful Podcast Feed with embedded episode player for my youtube to podcast project.

Some notes after playing with XSLT in a few projects:

  1. Styling your site’s feed to match your site’s appearance is trivial, but probably confusing when a user expects to have clicked on an RSS feed (thus the orange banner on this site’s feed).
  2. Poor support across browsers:
  • Safari appears to ignore Content-type, doesn’t want to display the XML at all:

  • Embedding the xsl file into the xml page is possible, and works on Firefox but not Chrome.

On Firefox this can be achieve easily:

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

But on Chrome it will only show a white page. Some background on why here .

  • Firefox does not support disable-output-escaping:

This flag should prevent escaping of <> characters, allowing HTML from the feed’s content to be rendered. Firefox does not seem to be supporting it, contrary to Chrome.

Note that if disable-output-escaping is off, <script> tags won’t get escaped either and Chrome will execute their content!

  • [0] - Style your RSS feed
  • [1] - Wikipedia - XSLT
  • [2] - RSS Banquet - A Modular Atom/RSS Feed Generator
  • [3] - Ydl-Podcast - A simple tool to generate Podcast like RSS feeds from youtube (or other youtube-dl supported services) channels, using youtube-dl
  • [4] - This blog’s RSS Feed
  • [5] - This blog’s RSS Feed’s XSLT template/stylesheet (which you will note is an XML file and could be, itself, styled…)