Website setting on UbuntuLinux HowTo
Luca Roversi

Table of Contents


1 The configuration of Website on Ubuntu

The following directories where apt-get install docbook-website installs dockbook-website are relevant to us:
  • /usr/share/xml/docbook/custom/website/2.5.0/, which contains:

    • the directory xsl/ with XML style sheets,

    • the directory schema/dtd/ with DTD,

    • the file catalog.xml, which requires to be modified;

  • /usr/share/doc/docbook-website/examples/ with all XML sources that constitute a very useful starting point to play with;

  • /etc/xml/ that contains tha catalog docbook-website.xml, a catalog pointing to /usr/share/xml/docbook/custom/website/2.5.0/catalog.xml.

2 Setting up a working copy of website

  • Replace /usr/share/xml/docbook/custom/website/2.5.0/catalog.xml with this-version-of-catalog.xml which defines, uniformly, reasonable PUBLIC identifiers for DTD and XSL files;

  • Make a local copy of /usr/share/doc/docbook-website/examples/ in some directory local-website and issue cd local-website;

  • Please, read all the information, by starting from index.html;

  • Then, for example, focus on website.xml file, the document root of the example. It starts with:
      <!DOCTYPE webpage SYSTEM "../schema/dtd/website.dtd" [
       <!NOTATION XML SYSTEM "xml">
       <!ENTITY test1a SYSTEM "test1a.xml" NDATA XML>
       <!ENTITY test3 SYSTEM "test3.xml" NDATA XML>
       <!ENTITY about.xml SYSTEM "about.xml" NDATA XML>
    Just replace the root element declaration by:
      <?xml version="1.0" ?>
       <!DOCTYPE webpage PUBLIC "-//Norman Walsh//DTD Website V2.5.0//EN" 
                                  "website.dtd" [
        <!NOTATION XML SYSTEM "xml">
        <!ENTITY test1a SYSTEM "test1a.xml" NDATA XML>
        <!ENTITY test3 SYSTEM "test3.xml" NDATA XML>
        <!ENTITY about.xml SYSTEM "about.xml" NDATA XML>
    which exploits, correctly, PUBLIC identifiers

    Repeat an analogous operation for every of the files that you decide to be part of your website, as indicated by layout.xml;

  • If you do not know how writing the correct Makefile as described in build-make.xml, you can use this script, based on xsltproc, which exploits the catalog just settled out.

  • In fact, setting up this-version-of-catalog.xml is useful also for editing files in local-website, for example, by JEdit.

    JEdit's XML oriented plugins can be set to load /etc/xml/docbook-website.xml to get validation based on the correct DTDs.