Archive for the 'XSLT' Category

The March of Progress

Sunday, November 12th, 2006

By now you’ve probably noticed the notorious soothing gradient title block that indicates this blog has defected to WordPress.

When I started up the blog, I wrote a short program (actually an extensible stylesheet) to manage it. I wanted something that was simpler to maintain than the other blog software I’d encountered. I didn’t want to have to bother with anything beyond a webserver and a filestore. Other blog management systems required a relational database and some kind of common gateway interface or application server.

I also wanted to host my blog from my own account.

My custom software didn’t handle user comments. Comment spam was becoming a serious problem at the time and there was a school of thought that soon, everyone would have a blog and therefore user comments would become unnecessary.

In retrospect, that was naive. Comments are a big part of what makes blogs fun. I made an attempt to retrofit a comment facillity onto my software in a manner that I hoped would preserve its minimalist design. Although a special add-on was needed to harvest the comments, they were directed into ordinary files and served up through unobtrusive client-side scripting. It probably needed a good week of additional work before it was ready for the sunshine.

But there had been two developments in the meantime.

One, the migration paths between standard blog management offerings got better. WordPress in particular gained a very serviceable feed import facillity. The existence of good migration paths diminished the chance that I would get stuck on some system that ultimately proved to be a dud.

Two, I came into contact with some excellent software that muted the pain I had traditionally associated with web application deployment. Fantastico, cPanel and Ensim made MySQL database installation easier. I was also impressed by how easily I had been able to roll out the Simple Machines Forum software, which like WordPress is implemented using highly-portable server-side scripting.

The Plunge

With a little help from Max at my hosting facillity, everything is now ported over. And although it wasn’t Macintosh-easy, I am nevertheless pleased with the results. I did need to play around with line breaks, but I don’t fault WordPress for that since a variety of odd practices have sprung up for grafting styled content into RSS feeds that were never formally part of the spec.

So what about my custom blogging software? I’m still using it extensively to power my webcomic, where I’ve coupled it with ComicsML to acheive some interesting layout and accessibility features. More on this, later.

XSLT Book Round-up

Saturday, June 17th, 2006

Extensible Stylesheets Language (XSL) is just about my favorite these days. Although Michael Kay’s book is pretty good, Jeni Tennison’s Beginning XSLT 2.0, From Novice to Professional is indispensable.

XSLT uses a lot of very specific terms, and using the back-of-the-book index can be a little tricky if you don’t know exactly what you’re looking for. So, for the benefit of you the Internet blog reader, I have compiled together my index margin notes.

Clip ‘n Save! Beginning XSLT 2.0 index add-on


entry page / reference
[] see predicates
data-type conversion 161
less-than see
lengths (of strings) see string-length
lengths (of sequences) see count()
messages see xsl:message
output methods 761
paths see also predicates
sequences, converting 236
stripping space see normalize-space()
today see current-date()
totals see sum
trim see normalize-space()
URL see Uniform Resource Locator

I also have read and liked O’Reilly’s older XSLT offerings, XSLT and XSLT Cookbook. I might be fonder of O’Reilly’s XSLT if I hadn’t spilled radiator fluid all over it, and subsequently worried that I was going to poison myself whenever I consulted it.

Blogfountain Month 2

Thursday, July 7th, 2005

I’m pleased to report that my custom blogging software appears to have successfully handled the month transition from June to July.

To celebrate, I added some validation, sorting, and capping functions to the stylesheet. I also threw in an optional Apache Ant script for easier builds and deployment.

My brother Michael and my friend Matt have both expressed interest in the code behind this, so I threw together a preliminary archive.

To use this yourself, you’ll need

  • An XSLT 2.0 Processor like Saxon-B 8.4 and most likely a Java virtual machine to support it.

You may want but could get by without

  • The afformentioned Apache Ant. This will also require Java.
  • An HTML authoring tool like Nvu or Dreamweaver for creating content.

I like Blogfountain because it’s easy too customize and I can keep my blog as static HTML files on my own webserver. But if you prefer to go the simpler route and don’t care where your actual content resides, you might be happier with existing blog software.

Matt tells me he written a database-ready PHP-based comments engine for his blog. I may look at grafting this onto Blogfountain. [Note: this blog has since been moved to WordPress]

Giving in to the Dark Side

Wednesday, June 1st, 2005

I couldn’t resist any longer; I have officially given in to the self-congratulatory blog craze. I will try to keep the interminable accounts of what I had for breakfast to a minimum.

I looked at several blogging solutions, but found each too intrusive. All of them required an application server, or worse still an application server that I couldn’t host myself. To my mind, a blog should be simple enough to run on a plain old web server.

So I ended up writing a short XSLT 2.0 script I call Blogfountain. I plan to post this under the GPL 2.0 license after I have worked the more obvious kinks out. Blogfountain circumvents the problem of comment spam by implementing a clever suggestion made by David Siffry: if you want to make a comment, start your own blog. Blogfountain links to a Google listing of pages that link back to it. [Note: this blog has since been moved to WordPress]