Table of Contents
Building a Website consists of three steps.
Resolving the web links and file identities (layout)
Building the html files, by transforming the XML files into html
Uploading the built files (and any other referenced files) from your hard disk to the server from which they will be accessed by readers of your Website.
Before describing the detail, a quick overview. The build tool I've chosen for this example is ant, a build tool that has developed over the years and is both popular and very flexible. It 'hides' the details of what is happening, yet can be understood by someone with a modest understanding of xml. See Appendix A for a link to the ant Website.
Phase one runs first to create a map of the files and connections between them. Figure 2 shows this
This process (layout), produces an intermediary file named
autolayout.xml (so don't create one yourself with
that name!) which is a subtle variation on the
layout.xml file that you created. The XSLT
transform also checks that your XML files have an id value and one or
two other checks are performed.
![]() | When to run phase one |
|---|---|
A key point in the build process is to note that each time
|
The next task is to generate the html, from the xml files, using the standard Docbook stylesheets. Figure 3 shows this
The next step uses the main Website XSLT stylesheets. If you
need to customize (for which see Section 7) the
stylesheet processing in any way, then use a file like
mywebsite.xsl which is really a stepping stone to
the main Website XSLT stylesheet. If you don't need customization this
should be a very simple file which does one job, to call in the main
chunk-website.xsl file which is part of the
Website distribution. The output of this phase of the process is a
series of html files (one for each of your xml files) which are placed
according to your layout, as specified in
layout.xml. Once you have run this step, go take
a look in your designated output directory!
The final phase is an file transfer protocol (ftp) transfer of the files created in phase two up to your server. For this document I have used an extension feature of the ant process. Alternatives are to use something like fireftp, a plugin for the Firefox browser, or any free or commercial ftp program. Once you have set up an 'account' (a name, password and remote server), the operation is simply to connect to the site and transfer the files, adding or replacing existing ones as necessary. The graphical interfaces generally list two windows. One on your local disk, one on the remote server. All you have to do is drag and drop from one to the other. Some may ask you if it's OK to overwrite files (very common since you may be modifying the same files many times, for example, your section headings where the table of content is created automatically by Website). I find fireftp a convenient method, although to transfer many files, ant may be more appropriate.
That's the overview, now for the detail