Using Xslt

Xslt is a technology that allows HTML web pages to be computed using data stored in xml format.

Xslt technology overview

The xslt technology can be used to create web pages. It has some nice advantages in creating web pages.

Basically how it works is your original writing is written as an xml file. Here you can basically define your own tags and html using whatever symbols you choose. Yes, you basically invent your own html or redefine existing html. Then you create an xsl style sheet which defines the commands you just created and translates them into html. When you perform the xslt processing step the xml file is then automatically transformed into an html file.

We have used it some, and it is very nice. Once you get the style sheets set up, creating web pages is very fast since the formatting work has already been done. This lets you focus just on the writing.

One advantage of xslt is that the writing is contained in an xml file which contains no formatting information. This means that you can write without worrying how the final result is going to look. The style sheet contains the formatting information, which is in a separate file. This makes the data (writing) and formatting information independent, with the advantage being that you can change for format (say the background color) without making any change to the original writing.

Things can get more complex when commands are nested. The lists below were produced by putting paragraphs inside paragraphs, and the style sheet can be programmed to add the numbering, etc. This makes it very easy to create nested lists, at least once you have the style sheet.

Other notes, platforms, etc.

Here are a few other notes.

(1). Xslt is available as libraries under the Gnu GPL (or LGPL ?) license. This web page itself is produced using these LGPL libraries (the xsltproc command) running under Linux. If you pick around at this link, you will find a wealth of xslt information. There is extensive documentation there as well.

- It is also necessary to install the appropriate xml libraries. These are available under LGPL as well.

- There is a separate command line tool called xsltproc which does the processing easily using filenames as arguments. This is a ready made tool that can be used without any knowledge of the complexities of how to use the libraries.

- The xsltproc tool is also obtainable under win32.

(2). Solaris LGPL versions are also available (see the link given above).

(3). There are Java classes for processing XML and for dealing with xslt. We have not experimented with these to date. More information is at the Sun xml site.

(4). FEREGO has also experimented with xslt transformations using the Microsoft .NET classes.

XSLT is very advanced.

It's not quite so simple as it might look. I just bought the 900 page Wrox book (second edition) on XSLT, and there are many, many subtle aspects to XSLT. There are ways of extracting DOM information, such as the nesting level, so you can completely control the numbering of your custom lists. You can customize your lists to print Roman numerals at the third nesting level if you wish.

(1). Really!

- Yes, I think it works.

- But I'm not so sure.

- I'm becoming convinced.

- Hey, have you checked Heather's website lately.

- But I am sure.

- Really. Yes, why don't you try this out using a slightly different slightly different style sheet. OK I will.
Or you can alternatively vary the background color of every other table cell, or you can sort the items. And there is lots more ability besides this.

FEREGO Web pages created by FEREGO. Copyright @2002 FEREGO. All rights reserved.