Forrest

In this article I will describe my reasons for chosing Apache Forrest as a publishing framework for my site.

Introduction:

Forrest's definition is as follows: an XML standards-oriented project documentation framework based on Apache Cocoon, providing XSLT stylesheets and schemas, images and other resources.

In effect Forrest isn't that much different from what I did before. Both systems are using Cocoon and therefore both systems are able to separate content from style. Cocoon's the actual XML publisher in this case. I used Linux programs to accomplish certain functionalities (like getting the actual pages and putting them somewhere). That worked for almost two years now and would still be working if I wouldn't have thought about many more features.

I was thinking about a complete Java based framework that was able to do even more, like link validation. And then I stumbled across Forrest. Forrest has even more features and manages to go even further than what I had in mind. I have to admit that I don't even use every aspect of Forrest to create this site. It was more a reason of getting the site to some kind of standard then the actual need of new features which made me take a deeper look.

Standards:

Talking about standards, first of all I had to put the whole content into the document-v12-standard so that forrest could read it. All the content was in some kind of format I was sure future projects should still be able to use it.

Secondly I was looking for a standardized output. That includes valid (and of course well-formed) XHTML. Therefore I had to write some XSLTs which transform the XML content (now in document-v12) into XHTML. The generated XHTML should be readable by all common browsers.

The separation of content and style is also achieved on the web-browser level by assigning a certain CSS to the generated XHTML. CSS Level 2 is by far more sophisticated and powerful than CSS Level 1. It's possible to format text (as in CSS Level 1) but also format the whole page including positioning of text, graphics, define layout, etc. Unfortunately it's not implemented completely in the up-to-date browsers, therefore I had to use some hacks to achieve the desired look. Those hacks are still valid for CSS-formatted pages according to the standard and nothing but some work-arounds for the different implementations and limitations of some browsers.

There are also some pages which I consider to be far more helpful if they are preserved in another format than HTML. The Adobe PDF has become the standard for pages in a printable format. XSL:FO on the basis of XPATH and XSL provides a transformation to PDF.

Using it:

As starting to use Apache Forrest is not a simple task for many, I put up an introduction. It can be downloaded as PDF.

Now what?:

Using Forrest is one thing. At the moment Forrest's latest release is labelled 0.6 - so it's pretty obvious that it's probably going to undergo many changes. If you're in for some buggy tests or trying to achieve the same thing I did, I think it's a good idea to take a deeper look. But if you want to save your nerves you might better want to wait until the first release candidate is out (which might take some time).