skip navigation

How This Site is Built

This site is built using a number of modern technologies, including XHTML, XSLT, and CSS.

It's built mostly so that I could learn how they worked. It's been interesting...

To keep things simple, I have one stylesheet, which effectively just provides a wrapper around my html file. It picks out the body of the html file and replaces it. It also picks up an RSS to use as the links bar down the side.

There's probably a lot more that could be done to make effective use of the XSLT technology. But it's nice seeing how xpath makes parts of the xsml source document easily available to you. For instance, if you want to find the contents of a meta tag to alter the stylesheet processing, you can do:

<xsl:value-of select="/html/head/meta[@name='mugshot']/@content" />

The really cool bit is when you use XSLT over the input multiple times (which is how I generated the booklist). That's where it really starts to show the benefit of having all your data in XML.

Of course, to process XSLT effectively, the input needs to be xhtml. This makes the authoring a bit more interesting. Normally, I use XEmacs to edit my html files and it works very well, but it's not so good for editing xhtml files. Basically, because it's more SGML than XML. What I need to do, when I find time is create a derived mode from psgml-html-mode that turns on the correct flags for xml. Shouldn't be too difficult, it's just finding the time.

All this is held together by a Makefile and RCS (or maybe CVS). I use xsltproc to generate the HTML offline (my provider isn't going to be running AxKit soon...) and sitecopy to upload it.

UPDATE: (27/6/2001) I found a very cool Emacs mode for editing XSLT style sheets, called XSLIDE. This gives highlighting capabilities and indenting, as well as a nice set of abbrevs for quick creation of style sheets. Oh, and it has a nice menu for quickly jumping to templates in large stylesheets.

UPDATE: (26/7/2001) I wanted to make some changes to the site after leaving it alone for a month. I found that the latest version of the xml parser / xslt processor that I am using have had new "features" added...

  1. The XSLT processor now complains about the XML declaration at the beginning of the file if it doesn't have a space between the double quote and the ?>. This would be less of a problem if the same XSLT processor didn't output things that way...
  2. All of a sudden it's decided to be difficult and try to validate my documents for me, even though I'm specifically asking it not to. Sigh. I'm also getting warnings about "unable to load external entity" even though I have explicitly asked it to not do this...

On a side note, I have actually fixed one problem with these pages which had been bugging me greatly. When viewed in Konqueror (the default KDE2 browser, which I mostly use), these pages looked awful because of a really poor, grainy font. Try as I might, I couldn't adjust the font settings to fix this.

At this point, I looked closer at the HTML being generated and I noticed that it was defaulting to UTF-8 character encoding. When I looked to see which fonts on my system supported that, naturally, it was only the one, ugly font. Changing the output to ISO-8859-1 (latin-1) in the main stylesheet soon had things looking as they should be. But I do need to find a decent unicode font...