12 entries tagged
rss
I have created an experimental RSS feed
(‘channel’)
for this site. In principle this can be used by people with RSS
aggregators to mix my latest headlines in with other channels.
The documentation for RSS I am using is
Dave
Winer’s, because he is one of the few people to
actually document it.
Erm, except that I have taken the liberty of
adding an XML namespace attribute
(using the namespace mentioned in an article about
RSS 1.0).
I am using the description
field to hold (part of)
the first paragraph, by way of a teaser; readers are expected to
follow the link to read the thing in full.
I was a little surprised to discover that RSS 0.91 has no
provision for supplying a date for news items. For weblog-style
channels, this seems like a major omission!
I also really dislike the RSS-0.91 de-facto convention of
using escaped HTML text as the value of titles and
descriptions. For one thing, why not just embed HTML as-is
instead of under an extra layer of encoding? (That’s the
whole point of XML namespaces, for example...) Worse, many
people just grab the first 100, say, characters, regardless of
whether decoding the result will be valid HTML or not! This
means that you cannot safely use XSLT to transform RSS 0.91
to HTML, unless I am missing something...
Anyway, in my feed I am making a point of stripping out all
mark-up before adding to the RSS file. People who want to see
it formatted will have to follow the link!
I’ve been thinking about the various RSS branches and
the RSS-2.0 process and send
this
to Mark Pilgrim and Dave Winer.
Since then I have been sort out a draft recommendation.
It’s tricker than I thought...
The various flavours of RSS offer a variety of namespace
requirements:
URL |
RSS version |
http://my.netscape.com/rdf/simple/0.9/ |
0.9 |
(default) |
0.91, 0.92, 0.94 |
http://purl.org/rss/1.0/
http://purl.org/rss/1.0/modules/rss091#
|
1.0 |
http://backend.userland.com/rss2 |
2.0 |
In my opinion, it is a grave mistake to include a version number
in a namespace URI. The function of a namespace is to prevent
accidental collisions between names defined by different people
(or organizations) when two XML vocabularies are combined in one
document. The version number of the format can be specified
separately (as indeed all the RSS versions do, as an attribute
of their root element). If the 0.9 spec had only used
http://netscape.com/1999/rss
as its namespace
(following the lead of
http://www.w3.org/1999/xhtml
) then all
the versions could have used the same namespace.
Why do I care, you ask? Because if you use actual XML
tools like XSLT to manipulate RSS feeds, then the fact that
there are three or four namespaces in use for essentially the
same elements makes the whole thing more complicated. Where
I might have had
<xsl:template match="/rss:rss/rss:channel">...
I better be prepared for more complicated expressions like
<xsl:template match="/*/*[lname()=channel]">...
(to allow for any root element, and to ignore the namespace of
the channel
element). This clutters the XSLT file
and makes it harder to maintain—and probably also less
efficient. Sigh.
This is not unique to RSS, by the way—I had all sorts
of hassle with early ve4sions of SVG tools which were caught out
by the ever-changing SVG namespace URL. They finally settled on
the quite-sane http://www.w3.org/2000/svg
.
In an earlier note I listed
four namespaces used in
RSS and RSS for the same element names.
One of these has now been unmade: the RSS specification never explicitly
mentioned the namespace, but the sample file included an
xmlns
attribute. While I was away in Canada,
this was
removed to ensure backward compatibility with
RSS 0.91. This makes sense (there exist examples of
applications that genuinely are broken by this), but is kind of icky.
There is still the old RSS 0.9 format—which did use its own
namespace—but given that even RSS 1.0 did not preserve that, I think
we can assume it is dead too. I assume that the programs
that were broken by the fleeting addition of the RSS-2.0 namespace are
also incapable of parsing RSS-1.0 data?
I just tried printing a copy of the RSS 2.0 spec., but
because he chose to use a fixed-width table for the text, it is
clipped all down the right-hand side of the page, making it
useless. Goddammit!
Update (2002-10-14):
I have removed the namespace declaration from
my experimental RSS feed.
Mark
Pilgrim announced a RSS validator, and much to my chagrin my
RSS feed
didn’t validate because the date format was wrong
(I omitted the time-of-day part, which is mandatory in RFC 2822).
This after I had carefully investigated RFC-2822-format
dates specifically only a few weeks later. I have now
fixed this and my
RSS feed validates.
Proposal
for Extremely Simple Syndication (XSS), a profile (a
restricted subset) of RSS 2.0,
proposed by Tim Appnel (tima)
[pointer from Mark
Pilgrim]. This is the same acronym as I timidly suggested for the
successor to RSS 0.92. I had started on
something I was going to call XSS myself, but tima’s is
headed in the same direction, so I should probably just
withdraw my inchoate drafts to prevent any confusion...
I had started drafting a proposal myself, but in the end
I don’t have time to do it properly (my evenings at
home should be spent on the CAPTION
web-site...). Oh, well. Excuses, excuses.
On the subject of things I don’t have time to do: Lars
Marius Garshol points to a treatment of
RSS data in AsTMa=. (AsTMa= is a linear notation for Topic Maps). I would
like to do a proper treatment of interoperable syndication data
in topic-map format, but, again, no time...
Dave
Whiner asks that people not use variations on the
white-on-orange XML icon (used to link to RSS data). So
I have changed the link on my pages to use the
‘standard’ image.
My RSS 0.9x feed failed to validate
after my last entry—because I included an HTML 4
character entity in the title. (I used
—
to create an em-dash.) This is OK for
HTML, but forbidden in RSS. I have fixed the script that
generates the file so it converts these entities in to the
corresponding Unicode character. Sorry for any inconvenience.
Jo Charman has created a LiveJournal
‘syndication account’ for me. As a result you can
see my RSS feed, converted in to a LiveJournal
journal. She says that if you have a paid-for LiveJournal
account, you can add pdc
to your
friends roster. And people can comment on the
LiveJournal pointers to my posts. Woohoo.
Updated (4 March 2007).
Updated URL. Corrected the spelling of Jo’s first name.
Up until today my RSS
feed has had one link per day, even though there might be extra
(supplementary) articles on that day.
If you look at the HTML page, the first article of the day
gets the big heading with the date and suchlike, and the
subsequent articlettes get smaller headings. Up until now the
smaller articles were omitted from the RSS.
I have now tweaked the program that generates it so that these
smaller headings also get links in the RSS data. At the moment
they link to their parent item; this will change once I add
HTML anchors to the headings so that they can link direct to
those. Sorry for any inconvenience.
Last night I hacked the code that generates the archive web
pages for my weblog (or whatever it is this site is) so that the
headings of the supplementary articles also have link anchors.
In the process I broke my RSS feed slightly—it got
confused by the id
tags. (while remaining
technically valid
according to the RSS validator). This has now been fixed,
so that (a) all articles have an HTML link target and
(b) all articles are linked to from the RSS feed.
Small objects of desire
I’have had a Palm 3 for some time
(creaky old 2-MB model). I used to say that when I upgraded
it, I wanted that to be next upgrade for my phone, as
well. That product now exists in the form of
the Handspring
Treo, a compact palmtop with a phone built in, and
Jo
has one. Sadly Handspring don’t consider Grafitti an
asset in a device aimed at non-Palm-users, so the 180g has
already been air-brushed out of history in favour of its
keyboard-sporting cousin. The problem is the Treo does cost
rather a lot more than, say, Adrian’s entry-level Sony
Clié, which is similarly compact and has a high-res
screen. I really don’t know which I would prefer as
the successor to my clunky old Palm 3.
Actually the fact is I don’t need to replace my
disfunctional old Palm 3;
I frankly don’t use very much, not the way Jo and Jeremy use theirs.
Its main failing is not its memory size but its
size—justa little bit bigger than pocket sized (unlike
both the Clié and the Treo).
I have admitedly
upgraded my Alcatel Max DB phone (the same model that caused mpt so
much confusion) for its smaller successor the 311, but that
is still one of Virgin’s cheapest handsets and I only
rarely use the thing. I have absolutely no need to upgrade
either of them. Annoyingly.
I have created an
experimental RSS
2.0 feed for the Picky
Picky Game. It shows comments added to the pictures, plus
an entry whenever the game ‘clocks’ (that is, when a
new panel is completed). Seems to work. Haven’t tried it
in an aggregator yet, but it does validate.
Read more
I have tweaked the RSS feed for the Picky Picky Game so
that comments have the name of the person who wrote the comment
as their title, and also so that the ‘Round N
completed’ refers to the round that has been completed,
not to the one following it…
Read more