These pages' technology
Document codning
XML
This is the first page on this site created directly in XML. The plan is that all the pages will be created using XML. The design is then considerably easier, since a suitable grammar (DTD) can be selected. Some other things are also made easy, e.g. the menu of the pages is defined in only one place, the so called tabindices as well as title and alt texts are automatically generated for the documents. And when I got tired of writing <abbr> tags for all the abbreviations, I added a feature using an abreviation table in the document head that takes care of the teadious task of putting all the expansions of abbreviatons in the tags.
The old HTML pages were translated through a transformation, using XSLT (a part of XSL), to XML. All alt and title texts were collected and further all abbreviations were collected for the tables in the document heads. When all material is in XML form the translation from XML to the different target formats is quite easy to perform - using a small number of transformations: to HTML, to XHTML, to WML and to text.
The transformation to the target formats is hereafter performed in the following way. First the documents themselves are written, during this it's possible to validate the document's XML code in EMACS using PSGML (c.f. OpenJade). The following simple script validates all files at once, which is nice when a lot of changes are made in a lot of files, e.g. at grammar changes.
#! /bin/sh
SOURCEDIR=/home/sweet_home/public_html/
for IN in `find $SOURCEDIR -regex '.*\.\(x\|xht\|w\)ml.*' | sort` ; do
if [ -f $IN ]; then
onsgmls -s -wxml -wno-explicit-sgml-decl /usr/share/sgml/openjade/xml.dcl $IN
fi
done
When the code is validated links can be checked. For this I've made another little script, that for every link in every file checks if a link is correct. Since I'm using version control of the XML code, this is when to commit the code to the version control system. Yet another script can then create a web page containing a log over changes recently made (c.f. rcs2log -v).
Finally a script for updating files affected is used. Out of every XML file a HTML, a XHTML and a WML version is generated, given that the XML version has changed or that the corresponding XSLT file has changed. The control if files have changed are made against the local version of the website. The new files are consequently placed at the local site, but also, using ftp, at this site.
Note that through conversion to plain text the pages can also be read by a speech synthesis system over radio.
Read more:
Server
AllegroServe
After seeing Bill Clementson's Slide Generator, it seemed to be a very tempting project to put together XML and Common Lisp in an web application. Since I'm, force of habit, use Allegro Common Lisp, it also seemed natural to use AllegroServe. I've also made it possible to run the application in CMUCL using a portable version of AllegroServe.
The pages are mostly coded in XML and are served after passing, using Lisp, a XML parser and clad in XHTML. Thanks to this procedure the menu is generated automatically and abbreviations are taken care of using a the table that is present in every document. Further <link>-tags of bookmark type are generated. I've made an installation of AllegroServe on gw.sm6vyf.ampr.org with the following installation description.
Here are some interesting links:
-
Rebel With A Cause
Building Web Applications with Common Lisp Deploying on an Apple Xserve running Mac OS X Server - CLiki: The eXtensible Markup Language is
an equivalent of S-expressions for people who are afraid of parentheses
. - CLiki: Web clients, servers, application servers, browsers, etc..
Apache
The most suitable version of a page is selected by Apache by so called content-negotiation and MultiViews using information from the browser. Note that, due to this, most pages' URI lack an extension in their names. The pages are delivered as application/xhtml+xml or text/html and exist mostly in a swedish and an english version.
If you're using Internet Explorer you should read about its accept request header and how to correct this deficiency.
There is, at least, one way to involve Lisp when using Apache too. The one used here is mod_lisp. When Apache gets a request for a certain URI, it passes some, or all, requests on to mod_lisp who in turn passes the request on to a suitable Lisp. This Lisp then processes the request and returns the desired data.
Style sheets
These pages are using style sheets (Cascading Style Sheets) to get their colors and shapes. There are som alternate style sheets available too - try them out!
Checking
I can test the pages using the following operating systems and web browsers: Linux: Mozilla, Opera, Konqueror, and Lynx; Windows 2000: Firefox and Internet Explorer. Even EMACS/W3, although the XHTML support is missing.
Links
Links on these pages are occaisionally checked using W3C's checklink, further I'm trying not to move any pages...
Availability
These pages are also supposed to comply to W3C's content accessibility guidelines.
W3C