I have posted an
XSL
stylesheet for, more or less, converting
XHTML
1.1 to the Atom syndication format.
I did this because as much I find the whole Atom thing extraordinarily tiresome I find all the hand-wringing from the
RSS
weenies even sillier. And given a chance to piss everyone off, I often jump.
I post this only as a
public service
. I have zero interest in maintaining this for anyone but myself. If you want to use it as fodder for a general purpose library, please be my guest.
I haven't bothered to remove private function calls and there is no documentation. However, there are comments enough for anyone with an understanding of
XSLT
to follow.
Update: this post generated much more interest than I anticipated so, for the curious, some background which has absolutely nothing to do with Atom (except maybe that Atom's content model maps better to my way of doing things than any of the various
RSS
efforts) :
The
XHTML
in question uses my
shiny new weblog format
which I wrote as a way to store
all
the data for a post in a static file. All the data but no form; foofy design stuff is added after the fact using, in my case,
XSL
. There are reasons why I didn't choose another, perhaps more expressive,
XML
application which will become clear below. I still use a database because it's faster for generating things like indexes but it is not considered authoritative. That is, the database
reads
from the flat files and not vice versa.
(It also lets me fob off the versioning
problem
on
CVS
and worry about other things.)
The single capital-R rule I've learned farting around with increasingly complex ways of generating this site is : the
only
thing you can count on is the web server being able to send plain vanilla
HTML
files — everything else will break. The only question you have ask yourself is how much pain will it cause and
how much time
you want to devote to fixing the problem.
Storing everything as
XHTML
and wasting a couple extra computrons on
XML
and
XPath
munging
may not be pretty
but when everything else fails at least the content is just
there
.
Meanwhile, this is sound of me adding a
buzzword-bingo
[meta] category to list all the damn acronyms used in any given post...
I have posted an XSL stylesheet for, more or less, converting XHTML 1.1 to the Atom syndication format.
I did this because as much I find the whole Atom thing extraordinarily tiresome I find all the hand-wringing from the RSS weenies even sillier. And given a chance to piss everyone off, I often jump.
I post this only as a
. I have zero interest in maintaining this for anyone but myself. If you want to use it as fodder for a general purpose library, please be my guest.I haven't bothered to remove private function calls and there is no documentation. However, there are comments enough for anyone with an understanding of XSLT to follow.
Update: this post generated much more interest than I anticipated so, for the curious, some background which has absolutely nothing to do with Atom (except maybe that Atom's content model maps better to my way of doing things than any of the various RSS efforts) :
The XHTML in question uses my
which I wrote as a way to store all the data for a post in a static file. All the data but no form; foofy design stuff is added after the fact using, in my case, XSL . There are reasons why I didn't choose another, perhaps more expressive, XML application which will become clear below. I still use a database because it's faster for generating things like indexes but it is not considered authoritative. That is, the database from the flat files and not vice versa.(It also lets me fob off the versioning
on CVS and worry about other things.)The single capital-R rule I've learned farting around with increasingly complex ways of generating this site is : the only thing you can count on is the web server being able to send plain vanilla HTML files — everything else will break. The only question you have ask yourself is how much pain will it cause and how much time you want to devote to fixing the problem.
Storing everything as XHTML and wasting a couple extra computrons on XML and XPath munging may not be pretty but when everything else fails at least the content is just there .
Meanwhile, this is sound of me adding a
[meta] category to list all the damn acronyms used in any given post...