• [ << ]
  • [ 0 ]
  • [ >> ]
Apr '04
25

SiteGenerator

User Manual - 25 April 2004 - V0.95 beta
(C) 2004 E.Hooijmeijer

Introduction
Site Generator generates websites out of an XML document combined with a series of resources (images, templates and such). It is an easy way of creating a website and maintaining it without too much fuzz.

Running SiteGenerator
If you have a copy of SiteGenerator, it has been custom made for your website. It means that extension modules have been added for the requirements of your website and that a special .bat file has been added to easily start the generation process.

The .bat file has the name of your website, so if you are webmaster of www.javatoo.nl , the bat file should be called javatoo.bat If however nothing happens (or just briefly a dos box pops-up) there might be a problem with your java configuration. Open a dosbox and enter :

> java -version

As a reply you should get back the Java virtual machine version. This should be at least 1.4.1. If the version is lower, you should download a more recent version of the Java Virtual machine (java.sun.com) If you get an error message that 'java' is not a command, then you java virtual machine is not (correctly) installed.

If SiteGenerator is installed correctly it should generate something like this:

                
** SiteGenerator V0.95 beta - (C)2004 E.Hooijmeijer **
 Visit www.ctrl-alt-Dev.nl for more information.
 Licence : fixed Site maintenance licence.
------------------------------------------------------
Input Dir : ./resource
Output Dir : c:/temp/javatoo/
------------------------------------------------------
Rendering : index
Rendering : Bijeenkomsten
Rendering : Juni-2004
Rendering : Maart-2004
Rendering : 0304-AscpectJ
Rendering : 0304-Eclipse
Rendering : Aanmelden
Rendering : Contact
------------------------------------------------------
Done.

                
It will print out the version, copyright and licence information. Then it lists the source directory and the target directory (where the website is written to). And then it processes each Content element and renders it.

If there are errors in the XML document the output will look like the following :
                
** SiteGenerator V0.95 beta - (C)2004 E.Hooijmeijer **
 Visit www.ctrl-alt-Dev.nl for more information.
 Licence : fixed Site maintenance licence.
------------------------------------------------------
Input Dir : ./resource
Output Dir : c:/temp/javatoo/
------------------------------------------------------
*** Exception occurred while preparing Site.xml ***
+-org.jdom.input.JDOMParseException: Error on line 127: 
 Next character must be ">" terminating element 
 "RENDERER".
 +-org.xml.sax.SAXParseException: 
 Next character must be ">" terminating 
 element "RENDERER".
------------------------------------------------------
There were errors.

                
Note that SiteGenerator will tell you in which line the error was detected and what the problem is. So it is easy to fix the problem if you know your XML. Alternatively you could use a decent XML editor to prevent mistakes.

Other errors that might occur are missing resources or references from text documents to resources in the XML file (by name). These are reported specifying the Content part where the error occurred and which template variable caused the error.

Uploading your website
As yet the SiteGenerator does not automagically FTP the rendered website to its webserver. This is a manual process.


The Model

The Model

The model above depicts the structure of the Site.xml document and also the objects inside the software. The Site tag is the RootElement of the document. It contains information about the site Name, Copyright and Modification Date. Sub elements of Site are Index, Content and Renderer. Index contains the navigation structure of the Site. Content are the actual documents, complete with associated resources. The renderer is responsible for merging the Template documents and its resources with the actual content using a Processor that can be configured using parameters.


  • [ << ]
  • [ 0 ]
  • [ >> ]