13 June 2003
Sometimes, usually when I’ve just finished doing something in the manner, I want to do everything with XSL and XML. I even think that I could use the DOM to create my XML and XSL files without angle brackets.
At the moment I’m not using it for anything so ambitious, though. I’m merely trying to transform RSS with it, in two places.
The first is my blogroll (available on my boring start page), which actually works. It takes data from blo.gs at most once an hour, transforms it into XHTML using XSL, and throws that out onto the page, as well as caching the transformed version. I plan to tidy it up, make it work with BlogRolling, and then release it.
The second is in my own RSS feeds. I want to transform that data, on the client side this time, to provide something prettier to look at in the browser. I don’t have this working yet, and it’s what’s holding up the release of Saltshaker, which is what I’m calling my RSS generation script.
XSL is one more reason to mess about with XPath. I’ll admit that I’m no XPath expert, and again I don’t really follow this stuff, just look it up, but there’s something about XPath that just feels right.
Well, all apart from the stupid namespacing issue in RSS 1.0 feeds. That doesn’t feel right, not one bit.
XML.TransformNode(XSL). That’s it.Date formatting just can’t be done properly in XSL. Having messed about a bit with variables and xsl:chooses, it all seems a bit inflexible (partly due to the variables problem, below).
Also, some quick thoughts on internal date formats. They should be sortable numerically/alphabetically. There’s no point in putting the weekday name at the front — year first, then month, then day, then weekday, then time, then timezone. And why do we write dates and times in reverse orders?
(As an aside, À la folie… pas du tout — a.k.a. He Loves Me… He Loves Me Not — is well worth watching. Also, PWEI did a brilliant song called Wise Up! Sucker which contains the lyrics ‘she loves me, she loves me not’ . Funny how these things come back to you when you’re just staring into space. Clearly it’s time to dig out This is the Day, This is the Hour, This is This!.)