[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [syndication] XSL stylesheet for RSS (all versions)



> Okay - thanks for explaining. Has there been a registered MIME type for RSS?
> I thought I saw some mail on that a while ago...

No.  It's bogged down in committee it seems.

> Also, who is the 'them' that you speak of? Is it mainly dynamically
> generated RSS? If static stuff is a problem, maybe going to Apache and
> adding a file extension mapping for RSS into the mimetypes config may help.

Trouble is extension mapping presumes a consistently used extension.  There
isn't a consistent extension used.  They range from .php, .xml, .rdf, .rss, many
more and even some without an extension at all.  Depending on file extensions is
not going to work for most, if not all, feeds.

To make matters worse, most Apache sites delivering up feeds aren't going to be
terribly interested in making additions to support per-directory or per-file
configuration changes.  And getting users to construct proper .htaccess files is
perhaps even less likely.

The ForceType directive in mod_mime seems interesting.  I'm not sure that it'll
work as many feeds are coming from the same directory as their HTML pages.  But
if someone had a feed in a different directory and they had .htaccess working
properly this could be used.
http://httpd.apache.org/docs/mod/mod_mime.html#forcetype

It starts to get more interesting (in apache anyway) if you use multiple
extensions.
http://httpd.apache.org/docs/mod/mod_mime.html#multipleext

Thus a feed could be represented as index.rss.xml, backend.rss.php, or
whatever.rss and the AddType set accordingly.  I've no idea how supported this
is in other web servers.  It would also break anything expecting to see the old
single extension URL.

So if someone can run .htaccess in their directory containing the known RSS file
they could use a <file> section directive to apply a ForceType on it.

If the RSS file was at:
    /home/user/public_html/index.xml

they could edit the .htaccess file at:
    /home/user/public_html/.htaccess
to contain this:

<files "index.xml">
        ForceType application/rss+xml
</files>

This assuming their server configuration of apache allows them to have local
.htaccess control over files.  It would work just as well to use this for any
other filename.

I'm not quite sure how to implement it on per-file basis in an IIS server.  One
would imagine it's possible but I can't see where to set it up.

An interesting point here is that a server operator can, quite easily, put this
sort of directive in place and automagically apply the content-type server-wide.
That is, the UserLand, LiveJournal or other sites could make a single httpd.conf
change and instantly have the content-type applied based on the filename or path
ending.  It could, of course, be overridden as users needed via their .htaccess
file.

It appears content-type is a lot easier to apply that the Apache docs (what a
maze) make obvious.

-Bill Kearney