<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook V3.1//EN">
<book>
  <bookinfo>
    <title>The Wsmake User Manual</title>
    <edition>User Manual for Wsmake 0.5.10</edition>
    <!-- This will be left out until an appropriate style sheet can be made
    for Abel Technologies documents.
  <author><firstname>Michael</firstname><surname>Brownlow</surname></author>
    -->
    <orgname>Abel Technologies</orgname>
    <author><othername>Abel Technologies</othername></author>
    <revhistory>
      <revision>
	<revnumber>0.5</revnumber>
	<date>Jul ?? 2000</date>
	<authorinitials>mlb</authorinitials>
	<revremark>Updated for Wsmake 0.5.10.</revremark>
      </revision>
      <revision>
	<revnumber>0.4</revnumber>
	<date>Dec 27 1999</date>
	<authorinitials>mlb</authorinitials>
	<authorinitials>rkb</authorinitials>
	<revremark>Updated for Wsmake 0.5.9.</revremark>
      </revision>
      <revision>
	<revnumber>0.3</revnumber>
	<date>Nov 16 1999</date>
	<authorinitials>mlb</authorinitials>
	<authorinitials>rkb</authorinitials>
	<revremark>
	  Updated for Wsmake 0.5.8. New layout for introduction.
	</revremark>
      </revision>
    </revhistory>
    <pubdate>2000</pubdate>
    <date>$Date: 2000/07/30 05:10:29 $</date>
    <copyright><year>2000</year><holder>Michael Brownlow</holder></copyright>
    
    <legalnotice>
      <para>
	Permission to use, copy, modify, and distribute The Wsmake User Manual
	for any purpose and without fee is hereby granted in perpetuity,
	provided that the above copyright notice and this paragraph appear in
	all copies.
      </para>
    </legalnotice>
  </bookinfo>
  
  <preface>
    <title>Preface</title>
    <formalpara>
      <title>Chapter 1. Introduction</title>
      <para>
	The introduction first discusses the need for a tool like Wsmake, then
	explains how Wsmake is designed to facilitate that need. Areas of need
	discussed are website implementation advantages and potential resource
	efficiencies that may be gained. The design discussion familiarizes
	the user/developer with the terminology and organization of Wsmake.
      </para>
    </formalpara>
    
    <formalpara>
      <title>Chapter 2. Wsmake usage</title>
      <para>
	This chapter describes how to use Wsmake. It covers the command line
	options and several ways Wsmake can be used.
      </para>
    </formalpara>
    
    <formalpara>
      <title>Chapter 3. Wsmakefile syntax</title>
      <para>
	Wsmake uses a make file named <filename>wsmakefile</filename> to
	understand what it is supposed to do. This chapter describes how a
	<filename>wsmakefile</filename> file is built and what options are
	allowed for each section.
      </para>
    </formalpara>
    
    <formalpara>
      <title>Chapter 4. Examples</title>
      <para>
	Overviews of the examples provided with the Wsmake package are
	included here.
      </para>
    </formalpara>
    
    <formalpara>
      <title>Chapter 5. Licensing</title>
      <para>
	This section describes the licenses covering the use of Wsmake.
      </para>
    </formalpara>
  </preface>
  
  <chapter><title>Introduction</title>
    <para>
      Welcome. This text is the user manual for the program Wsmake. Wsmake is
      a website pre-processor. The basic function of this tool is to process a
      set of files defined by the administrator, such as those associated with
      website pages, from a "source" location into an "output" location.
    </para>
    
    <section><title>The need</title>
      <section><title>Implementation advantages</title>
	<section><title>Separation of common and unique content</title>
	  
	  <para>
	    The structure of a webpage has both common and unique content.
	    Common content is information that is the same from page to page.
	    Unique content is information that is associated with a single
	    page.
	  </para>
	  
	  <para>
	    A benefit of separating common from unique content is the ability
	    to change the common content of the structure without interfering
	    with the unique content. The ideal way to manage the common content
	    is to have a single source for each content part and, by some
	    mechanism other than manual effort, replicate the common content
	    throughout the site. Wsmake provides this capability because it can
	    use a single source to create common content instances for a
	    website. The ability to re-use that common structure has the
	    potential to lower maintenance time and reduce errors.
	  </para>
	  
	  <para>
	    An example of common content is the header and footer information
	    for a web page. The header and footer could contain navigation
	    control, ads, or contact information. An example of unique content
	    could be news items, a company memo, or a price list.
	  </para>
	  
	  <para>
	    Wsmake is a tool which provides the framework for you to define
	    common, re-usable structures, which are then used, along with the
	    unique content, to generate the pages for your website.
	  </para>
	  
	  <para>
	    In summary, Wsmake can help you manage the implementation and
	    maintenance of your website in a way which is more efficient
	    than by hand. You design the website; Wsmake will help you
	    create and maintain it.
	  </para>
	</section>
      </section>
      
      <section><title>Resource usage improvements</title>
	<section><title>Less system resource consumption</title>
	  
	  <para>
	    There are several ways for webpage structure to be created
	    dynamically when the client makes a request. Webserver
	    directives, modules, CGI scripts, and embedded languages are
	    example implementation possibilities. However, the common
	    attribute for these is that the page being sent to the
	    user is created dynamically every time a client makes a
	    request. Wsmake can eliminate this problem by only creating
	    the page when changes are made. This can potentially save
	    computing resources.
	  </para>
	</section>
	
	<section><title>Time-saving in website maintenance</title>
	  <para>
	    For the same reasons that Wsmake can provide resource usage
	    improvements, there can be a time savings associated with manual
	    labor by:
	  </para>
	  
	  <itemizedlist>
	    <listitem><para>
		Eliminating the need for common content generation code in
		CGI and embedded scripts.
	      </para></listitem>
	    <listitem><para>
		Making a change in only one place in order to update an item
		of common content.
	      </para></listitem>
	  </itemizedlist>
	  
	  <para>
	    When dynamic page creation on the server is not available, it
	    is possible to save hours of tedious work with Wsmake. For
	    instance, consider a situation where there is a company name
	    change which affects every webpage on a website. If the site has
	    many pages, the most efficient way to make the change is to change
	    one occurrence and let Wsmake do the rest.
	  </para>
	</section>
      </section>
    </section>
    
    <section><title>The design</title>
      <para>
	Wsmake was made to simplify website maintenance. It does this using a
	parser, a configuration file, and configuration file syntax which
	describes the website to be generated. The default configuration
	filename is <filename>wsmakefile</filename>, but you can use other
	names.
      </para>
      
      <section><title>Input</title>
	<para>Inputs to Wsmake are:</para>
	
	<itemizedlist>
	  <listitem>
	    <formalpara>
	      <title>Command line options and arguments</title>
	      <para>
		These inputs alter the behavior of the make process and
		amount of feedback.
	      </para>
	    </formalpara>
	  </listitem>
	  
	  <listitem>
	    <formalpara>
	      <title>Configuration file (<filename>wsmakefile</filename>)
	      </title>
	      <para>
		This file defines the website structure and make process.
	      </para>
	    </formalpara>
	  </listitem>
	  
	  <listitem>
	    <formalpara>
	      <title>Source Files</title>
	      <para>
		Any file on the filesystem in any format. Certain conditions
		may need to be set for binary files.
	      </para>
	    </formalpara>
	  </listitem>
	</itemizedlist>
      </section>
      
      <section><title>Processing</title>
	<para>
	  Wsmake was made to reduce the effort required to maintain a website.
	  However, it is not limited to a website <quote>filesystem</quote>.
	  It's programming is abstract enough to allow an administrator to
	  order any group of files to be compiled into a final version. A
	  website <quote>filesystem</quote> happens to be a good example. As
	  such, it is the primary focus for this discussion.
	</para>
	
	<para>
	  Processing first handles the command line options and arguments. It
	  then loads the configuration file. The configuration file is needed
	  for Wsmake to know what to do. Much the same way that GNU Make uses
	  a Makefile. Currently the configuration file can hold one website.
	  In the file there are page groups. In each group, the parser is
	  setup and one or more pages are declared. Wsmake loads the entire
	  configuration file and then processes each group in the order they
	  occur. Each page represents a source file which will be compiled
	  into one or more output files.
	</para>
	
	<section><title>PageGroup Section</title>
	  <para>
	    Each PageGroup section is made up of attributes and declarations
	    which identify website components and structure, and define how
	    the output should be generated. These attributes and declarations
	    will be described in order of terminology dependency. Detailed
	    definitions are described in Chapter 3.
	  </para>
	  
	  <section><title>SubTag Attribute</title>
	    <para>
	      SubTag means Substitution Tag. The SubTag has two parts, a tag
	      name, and a value. When the parser in Wsmake parses the source
	      text, it looks for a tag name. When one is found, the value for
	      the tag is put in place of the tag before the text output is
	      written. You can also create a SubTag whose value is the output
	      of an external command.
	    </para>
	  </section>
	  
	  <section><title>SubTagGroup Section</title>
	    <para>
	      A SubTagGroup is a group of SubTags. Defining a SubTagGroup
	      allows a set of SubTags to be re-used. Each SubTagGroup has a
	      name attribute which can be referenced by some of the other parts
	      of a processing section.
	    </para>
	  </section>
	  
	  <section><title>PageOrder and PagePart Sections</title>
	    <para>
	      A PageOrder is used to define the order of a set of files that
	      will be compiled into an output page. PageOrders use PagePart
	      declarations to identify those files. The focal point of a
	      PageOrder is the unique content. This data is not known to the
	      PageOrder. However, a placeholder for the unique content is
	      placed in the order to identify its occurrence. The label "data"
	      is used for the placeholder. This allows a PageOrder to be
	      re-used to create the common content for many unique content
	      (data) pages.
	    </para>
	    
	    <para>
	      PageParts define a source file and whether or not it should be
	      parsed in preparation for a Page output. They can define SubTags
	      and reference SubTagGroups. Each page part also has a name
	      attribute. The PagePart name is what is referenced by
	      PageOrders. For any given PageOrder, PageParts can be referenced
	      either before or after the unique content. For instance:
	    </para>
	    
	    <itemizedlist spacing="compact">
	      <listitem><para>header</para></listitem>
	      <listitem><para>unique content</para></listitem>
	      <listitem><para>footer</para></listitem>
	    </itemizedlist>
	    
	    <para>
	      In this case "header" represents a PagePart that will be
	      pre-pended to the unique content. Similarly, "footer" represents
	      a PagePart that will be appended to the unique content.
	    </para>
	  </section>
	  
	  <section><title>Theme Section</title>
	    <para>
	      A Theme is a way to group SubTags, SubTagGroups, and PageOrders
	      into one place so that the group as a whole can be referenced
	      by Pages.
	    </para>
	  </section>
	  
	  <section><title>Page Section</title>
	    <para>
	      A Page represents a page on the website. It defines which
	      PageOrder(s) and which unique content source file will be
	      composed into a website page. It also defines whether or not
	      the unique content file will be parsed, and the output path for
	      the new composite file. A Page may also include SubTag
	      definitions and references to SubTagGroups. The following
	      discussions describe how each Page is handled by Wsmake.
	    </para>
	    
	    <section><title>Parser</title>
	      <para>
		The parser works on a line by line basis. It reads in a line
		from the source page, manipulates it, and writes it out to the
		output page. The parser will create the file if it does not
		exist. It also creates directories when necessary. (Note that
		versions 0.5.10 and below do not create parent directories
		where needed)
	      </para>
	    </section>
	    
	    <section><title>References</title>
	      <para>
		There are three references that a Page can use: subtaggroup,
		pageorder, and theme. When references are used, the output
		page takes on the characteristics of the referenced
		information. In the case of a referenced SubTagGroup, the
		SubTags in that SubTagGroup are added to the list of SubTags
		already defined for the Page. For referenced PageOrders,
		the order they are defined is the order in which they are
		applied, so that the first pageorder referenced will be used
		for header and footer additions to the output. Then the next
		pageorder adds to the previous definitions, and so on. When
		a Theme is referenced, the page acquires all of the properties
		defined in the theme.
	      </para>
	    </section>
	    
	    <section><title>Clones</title>
	      <para>
		Each Page has the capability of being cloned. This means
		that Wsmake will process the source of the page not only for
		the original definition, but for each clone as well. Clones
		are treated just like real Pages, and can have all of the
		properties that the Page can have. Depending on where the
		Clone is defined inside a Page, certain properties of the
		Page are inherited by the clone.
	      </para>
	    </section>
	  </section>
	</section>
      </section>
      
      <section><title>Output</title>
	<para>
	  There are three types of output: Normal Feedback, Error Feedback, and
	  File Output. See Chapter 3 for a detailed description of these
	  types.
	</para>
	
	<section><title>Normal Feedback</title>
	  <para>
	    Several "debug" levels are provided which can alter the verbosity.
	    The default feedback consists of showing the user the current
	    state of updated Pages, and the process of making (parsing) the
	    particular Pages that are in need of an update. With debugging set
	    to higher levels, more information is reported about what Wsmake
	    read from the configuration file.
	  </para>
	</section>
	
	<section><title>Error Feedback</title>
	  <para>
	    When Wsmake fails in some part of its run-time, errors are reported
	    to the standard error output for your operating environment. Types
	    of errors include: Configuration file load errors, Database errors,
	    Synchronization errors, and Make errors.
	  </para>
	</section>
	
	<section><title>File Output</title>
	  <para>
	    The files created by Wsmake will take on the same permissions as
	    the source version it was created from. The timestamp is
	    <emphasis>not</emphasis> replicated.
	  </para>
	</section>
      </section>
    </section>
  </chapter>
  
  <chapter><title>Wsmake usage</title>
    <para>
      The basic usage of Wsmake is:
    </para>
    
    <para>
      <prompt>shell$</prompt> <command>wsmake</command> <option>-f</option> <filename>configfilename</filename>
    </para>
    
    <para>
      This runs Wsmake using the configuration file named
      <quote>configfilename</quote>. The defaults for the output are to report
      the status of pages which have been updated. Typical output might look
      like:
    </para>
    
    <para>
      <screen>
shell$ wsmake -f configfilename
Upd Part   : templates/header.html
PoU Webpage: html/index.html               [...]
shell$
      </screen>
    </para>
    
    <para>
      The output shows all Pages that are in need of updating. The 3 character
      state on the left of these lines can be one of the following:
      
      <variablelist>
	<varlistentry>
	  <term><computeroutput>---</computeroutput></term>
	  <listitem><para>
	      This means there was no change since the last run
	    </para></listitem>
	</varlistentry>
	<varlistentry>
	  <term><computeroutput>Err</computeroutput></term>
	  <listitem><para>
	      This means that there was an error in determining the state of
	      the Page. This could be because of:
	      <itemizedlist>
		<listitem><para>Incorrect Permissions</para></listitem>
		<listitem><para>Non-existent directories</para></listitem>
		<listitem><para>Database problems</para></listitem>
	      </itemizedlist>
	    </para></listitem>
	</varlistentry>
	<varlistentry>
	  <term><computeroutput>New</computeroutput></term>
	  <listitem><para>
	      This means that the Page was not in the database on
	      the last run, but now is. And it will be updated.
	    </para></listitem>
	</varlistentry>
	<varlistentry>
	  <term><computeroutput>Frc</computeroutput></term>
	  <listitem><para>
	      This means that the Page will be updated, regardless of it's
	      state, by a request from the user, or because a clone's
	      original was updated.
	    </para></listitem>
	</varlistentry>
	<varlistentry>
	  <term><computeroutput>Upd</computeroutput></term>
	  <listitem><para>
	      This means that the source for this Page was modified, so the
	      output will be updated.
	    </para></listitem>
	</varlistentry>
	<varlistentry>
	  <term><computeroutput>NoO</computeroutput></term>
	  <listitem><para>
	      This means that the Page has no <quote>output</quote> file and
	      will be updated.
	    </para></listitem>
	</varlistentry>
	<varlistentry>
	  <term><computeroutput>NoS</computeroutput></term>
	  <listitem><para>
	      This means that the Page has no <quote>source</quote> file
	    </para></listitem>
	</varlistentry>
	<varlistentry>
	  <term><computeroutput>Old</computeroutput></term>
	  <listitem><para>
	      This means that the <quote>output</quote> file is old and will
	      be updated.
	    </para></listitem>
	</varlistentry>
	<varlistentry>
	  <term><computeroutput>PoU</computeroutput></term>
	  <listitem><para>
	      This means that one of the PageOrders that the Page uses has a
	      PagePart whose source has been modified. So the output page will
	      be updated.
	    </para></listitem>
	</varlistentry>
	<varlistentry>
	  <term><computeroutput>ThU</computeroutput></term>
	  <listitem><para>
	      This means that one of the Themes that the Page uses has been
	      been updated. So the output page will be updated.
	    </para></listitem>
	</varlistentry>
	<varlistentry>
	  <term><computeroutput>Dep</computeroutput></term>
	  <listitem><para>
	      This means that one of the files that the Page has been made
	      to depend on has been been updated. So the output page will
	      be updated.
	    </para></listitem>
	</varlistentry>
	<varlistentry>
	  <term><computeroutput>StU</computeroutput></term>
	  <listitem><para>
	      This means that one of the SubTags that the Page uses has been
	      updated. So the output page will be updated.
	    </para></listitem>
	</varlistentry>
	<varlistentry>
	  <term><computeroutput>SGU</computeroutput></term>
	  <listitem><para>
	      This means that one of the SubTagGroups that the Page uses has
	      been updated. So the output page will be updated.
	    </para></listitem>
	</varlistentry>
      </variablelist>

    <para>
      For all cases the page will be updated unless the state is
      <computeroutput>---</computeroutput>,
      <computeroutput>Err</computeroutput>,
      <computeroutput>NoS</computeroutput>,
      or <computeroutput>Unk</computeroutput>.
    </para>

    <para>
      The next word indicates the type of page: Part, Webpage, or Clone.
    </para>
    
    <para>
      When square brackets appear after a target, it represents the start and
      stop of the make process for that page. The characters in between can be:
    </para>

    <para>
      <variablelist>
	<varlistentry>
	  <term><computeroutput>.</computeroutput></term>
	  <listitem><para>A piece of the page.</para></listitem>
	</varlistentry>
	
	<varlistentry>
	  <term><computeroutput>i</computeroutput></term>
	  <listitem>
	    <para>A file was included by one of the pieces.</para>
	  </listitem>
	</varlistentry>
	
	<varlistentry>
	  <term><computeroutput>X</computeroutput></term>
	  <listitem>
	    <para>A piece of the page source was missing.</para>
	  </listitem>
	</varlistentry>
      </variablelist>
    </para>
  
    <section><title>Options</title>
      <para>
	Wsmake has the following command line options:
      </para>
      <screen>
wsmake [-Fshvc] [-m|-e] [-d #] [-f configfile] [target] ...
      </screen>
      
      <variablelist>
	<varlistentry>
	  <term><option>-F</option>,<option>--force</option></term>
	  <listitem><para>
	      Force files to be updated regardless of their state.
	    </para></listitem>
	</varlistentry>
	<varlistentry>
	  <term><option>-s</option>,<option>--silent,--quiet</option></term>
	  <listitem><para>Silent. No output.</para></listitem>
	</varlistentry>
	<varlistentry>
	  <term><option>-h</option>,<option>--help</option></term>
	  <listitem><para>This help.</para></listitem>
	</varlistentry>
	<varlistentry>
	  <term><option>-v</option>,<option>--version</option></term>
	  <listitem><para>
	      Show version and copyright information.
	    </para></listitem>
	</varlistentry>
	<varlistentry>
	  <term><option>-c</option>,<option>--clean</option></term>
	  <listitem><para>Clean the website.</para></listitem>
	</varlistentry>
	<varlistentry>
	  <term><option>-m</option>,<option>--match</option></term>
	  <listitem>
	    <para>Targets match anywhere in web paths.</para>
	  </listitem>
	</varlistentry>
	<varlistentry>
	  <term><option>-e</option>,<option>--end-match</option></term>
	  <listitem><para>Targets match at end of web paths.</para></listitem>
	</varlistentry>
	<varlistentry>
	  <term><option>-d #</option>, <option>--debug=#</option></term>
	  <listitem><para>
	      Debug output level. (0-3)
	      <itemizedlist>
		<listitem>
		  <para>0 - No output except for errors</para>
		</listitem>
		<listitem>
		  <para>1 - Level 0 and minimal output (default)</para>
		</listitem>
		<listitem>
		  <para>2 - Level 1 and verbose output</para>
		</listitem>
		<listitem>
		  <para>3 - Level 2 and config file loading info</para>
		</listitem>
	      </itemizedlist>
	    </para></listitem>
	</varlistentry>
	<varlistentry>
	  <term>
	    <option>-f</option> <filename>file</filename>,
	    <option>--file=</option><filename>file</filename>,
	    <option>--wsmakefile=</option><filename>file</filename>
	  </term>
	  <listitem>
	    <para>
	      Location of configuration file (looks for
	      <filename>wsmakefile</filename> if not specified)
	    </para>
	  </listitem>
	</varlistentry>
	<varlistentry>
	  <term><filename>targets</filename></term>
	  <listitem><para>
	      Specific web paths, matching from front, to make. If not
	      specified, all pages will be made.
	    </para></listitem>
	</varlistentry>
      </variablelist>

      <para>
	"clean" is a special target name. When used, all other targets are
	ignored and the website is cleaned. To clean only certain groups of
	files, use the <option>-c</option> or <option>--clean</option> option
	with the targets but without the clean target.
      </para>
      
      <para>
	Note that updates to the configuration file will not update the
	website on the next run. Using the <option>-F</option> or
	<option>--force</option> option is one solution to this problem.
	Another is to use a <quote>depend</quote> attribute (discussed
	in more detail in chapter 3).
      </para>
    </section>

    <section><title>Example Usage</title>
      <para>
	Output all details:
      </para>
      <para>
	<computeroutput>
	  <prompt>shell$</prompt> <command>wsmake</command> <option>-d</option> 3 <option>-f</option> <filename>website.conf</filename>
	</computeroutput>
      </para>
      
      <para>
	Force build of entire website:
      </para>
      <para>
	<computeroutput>
	  <prompt>shell$</prompt> <command>wsmake</command> <option>-Ff</option> <filename>website.conf</filename>
	</computeroutput>
      </para>
      
      <para>
	Don't show any output except for errors:
      </para>
      <para>
	<computeroutput>
	  <prompt>shell$</prompt> <command>wsmake</command> <option>-d</option> 0 <option>-f</option> <filename>website.conf</filename>
	</computeroutput>
      </para>
      
      <para>
	Don't show any output at all:
      </para>
      <para>
	<computeroutput>
	  <prompt>shell$</prompt> <command>wsmake</command> <option>-s</option> <option>-f</option> <filename>website.conf</filename>
	</computeroutput>
      </para>
      
      <para>
	Make just index.html:
      </para>
      <para>
	<computeroutput>
	  <prompt>shell$</prompt> <command>wsmake</command> <option>-f</option> <filename>website.conf</filename> <filename>index.html</filename>
	</computeroutput>
      </para>
      
      <para>
	Use the default config file name <filename>wsmakefile</filename>, and
	make all pages that end with ".html":
      </para>
      <para>
	<computeroutput>
	  <prompt>shell$</prompt> <command>wsmake</command> <option>-e</option> <filename>.html</filename>
	</computeroutput>
      </para>
      
      <para>
	Make all files in the help directory:
      </para>
      <para>
	<computeroutput>
	  <prompt>shell$</prompt> <command>wsmake</command> <option>-f</option> <filename>website.conf</filename> <filename>help</filename>
	</computeroutput>
      </para>
      
      <para>
	Clean the website:
      </para>
      <para>
	<computeroutput>
	  <prompt>shell$</prompt> <command>wsmake</command> <option>-f</option> <filename>website.conf</filename> <filename>clean</filename>
	</computeroutput>
      </para>
      <para>or</para>
      <para>
	<computeroutput>
	  <prompt>shell$</prompt> <command>wsmake</command> <option>-cf</option> <filename>website.conf</filename>
	</computeroutput>
      </para>
    </section>
  </chapter>
  
  <chapter><title>Configuration file syntax</title>
    <para>
      The Wsmake configuration file is made up of sections. The first section
      defined in a configuration file is called <quote>Website</quote>.
      Currently there can only be one Website section for each configuration
      file.
    </para>
    
    <para>
      All of the other sections can have more than one instance, however, there
      are restrictions to their location. In any given config file, the general
      layout is:
    </para>
    
    <mediaobject>
      <imageobject>
	<imagedata fileref="configlayout.jpg" format="jpeg" width="256" depth="668">
      </imageobject>
    </mediaobject>
    
    <para>
      Where "..." indicates an item which can occur more than once.
      As an example, SubTagGroups can have multiple instantiations, but must
      be in the PageGroup section, which must be in the Website section. The
      order that the items should be declared is the same order of their
      dependencies, e.g., if you define a PageOrder that uses (references) a
      certain PagePart, that PagePart must be defined before the PageOrder.
    </para>
    
    <para>
      Details on what a section can reference are described later in this
      chapter.
    </para>
    
    <section><title>General Syntax</title>
      <section><title>Sections</title>
	<para>
	  Each section has the following syntax:
	</para>
	
	<screen>
SectionName {
	  
}
	</screen>
	<para>
	  The section name goes where "SectionName" is defined. The beginning
	  and ending curly brace indicate that the contents within apply to
	  that Section. Note that the first curly brace
	  <emphasis>must</emphasis> be on the same line separated by whitespace
	  after the section name. Also note that the ending curly brace must be
	  on a line of its own. (this behavior is tentative, and will change
	  in the future)
	</para>
      </section>

      <section><title>Attributes</title>
	<para>
	  Attributes in each section are limited to one line. The maximum line
	  length is 2000 characters. Attributes are defined within the
	  following syntax:
	</para>
	
	<screen>  AttributeName value</screen>
	
	<para>
	  The attribute's name goes where "AttributeName" is. The "value" is
	  all characters after the attribute name and space. This means you
	  do not need quotations to include whitespace. However, leading and
	  trailing whitespace are removed before processing, so quotations
	  are necessary for leading and trailing whitespace. The valid
	  quotation recognized is double-quotes. Back-quotes are recognized
	  for SubTags and have special meaning (described later). (note
	  again that the behavior described is tentative)
	</para>

	<screen>  AttributeName  " The Name value "</screen>
	
	<para>
	  In order to use a double quote inside the value, escape it with a
	  '\':
	</para>
	
	<screen>  AttributeName  "The \"Name\" value"</screen>

	<note>
	  <para>
	    The only escape sequence processed is the double quotes. Any
	    other '\' usage is literal.
	  </para>
	</note>
	
	<note>
	  <para>
	    To have double quotes in the value, always escape them and enclose
	    the entire value in double quotes.
	  </para>
	</note>
      </section>

      <section><title>Comments</title>
	<para>
	  Comments can be defined by using the '#' character. Any data
	  following a '#' is ignored by Wsmake, unless it is within quotations
	  of a value:
	</para>

	<screen>  url http://mysite.com/index.html#about comment</screen>
	<screen>  url "http://mysite.com/index.html#about"</screen>
      </section>
      
      <section><title>SubTags</title>
	<para>
	  SubTag attributes are a special type of attribute. They are defined
	  in the same fashion as an AttributeName, but the value is made up of
	  two parts:
	</para>

	<screen>  SubTag "SubTag Name" "SubTag Value"</screen>

	<para>
	  The value is composed of both the SubTag Name and SubTag Value
	  together. The entire attribute must be all on one line. Note that
	  quotes are not mandatory for SubTags. So it is possible to do
	  something like this:
	</para>

	<screen>  SubTag SubTag Name SubTag Value</screen>

	<para>
	  However, Wsmake will split the string on the first whitespace
	  character. So, in the case above, the subtag name will be "SubTag",
	  and the value will be "Name SubTag Value".
	</para>

	<para>
	  A command-based SubTag can be created by using back quotes around
	  the value part:
	</para>
	
	<screen>  SubTag "DATE" `date`</screen>
	
	<para>
	  In this case, whenever the string DATE is found in the source, it
	  will be replaced by the output of the command "date". Note that
	  the date command will be run only once before any pages are parsed,
	  and the output from the command is the same across all pages. (note
	  again that this is tentative)
	</para>
      </section>
    </section>

    <section><title>Website Section</title>
      <para>
	The Website section holds all information about a Wsmake project. There
	can only be one Website section for each configuration file. The
	PageGroup subsection is the only sub-section that can be defined
	within a Website section. There can be multiple PageGroups.
      </para>

      <para>
	<table frame="none"
	       colsep="1" rowsep="1"><title>Website Attributes</title>
	  <tgroup cols="3" align="left">
	    <colspec colname="c1">
	    <colspec colname="c2" colwidth="80%">
	    <colspec colname="c3" colsep="0">
	    <thead>
	      <row>
		<entry>Name</entry>
		<entry>Required / Optional</entry>
		<entry>Description</entry>
	      </row>
	    </thead>
	    <tbody>
	      <row>
		<entry><varname>name</varname></entry>
		<entry>optional</entry>
		<entry>The name of the website</entry>
	      </row>
	      <row>
		<entry><varname>maintainer</varname></entry>
		<entry>optional</entry>
		<entry>The maintainer of the website</entry>
	      </row>
	      <row rowsep="0">
		<entry><varname>url</varname></entry>
		<entry>optional</entry>
		<entry>The url of the website</entry>
	      </row>
	    </tbody>
	  </tgroup>
	</table>
      </para>
      
      <para>
	These settings are identifiers only, and do not play a role in the
	parse process.
      </para>

      <example><title>Website</title>
	<screen>
Website {
  name       "Mike's Website"
  maintainer "Mike"
  url        "http://wsmake.org/~mike/"
}
	</screen>
      </example>

      <section><title>PageGroup Section</title>
	<para>
	  The PageGroup section holds common information for a group of Pages.
	  There can be multiple PageGroup sections in the Website section.
	  The common content items fall into two categories: attributes and
	  subsections. The following subsections can be defined within a
	  PageGroup section:
	</para>

	<itemizedlist>
	  <listitem><para>SubTagGroup</para></listitem>
	  <listitem><para>PagePart</para></listitem>
	  <listitem><para>PageOrder</para></listitem>
	  <listitem><para>Theme</para></listitem>
	</itemizedlist>

	<para>
	  Attributes will be discussed first. Table 3-2 lists the
	  PageGroup attributes.
	</para>
	
	<para>
	  <table frame="none"
		 colsep="1" rowsep="1"><title>PageGroup Attributes</title>
	    <tgroup cols="3" align="left">
	      <colspec colname="c1">
	      <colspec colname="c2" colwidth="80%">
	      <colspec colname="c3" colsep="0">
	      <thead>
		<row>
		  <entry>Name</entry>
		  <entry>Required / Optional</entry>
		  <entry>Description</entry>
		</row>
	      </thead>
	      <tbody>
		<row>
		  <entry><varname>lastmod_tagname</varname></entry>
		  <entry>optional</entry>
		  <entry>Internal subtag, replaced with last modification
		    date of <quote>source</quote> file</entry>
		</row>
		<row>
		  <entry><varname>wsmake_version_tagname</varname></entry>
		  <entry>optional</entry>
		  <entry>Internal subtag, replaced with version of
		    Wsmake</entry>
		</row>
		<row>
		  <entry><varname>output_page_tagname</varname></entry>
		  <entry>optional</entry>
		  <entry>Internal subtag, replaced with output_page of current
		    page</entry>
		</row>
		<row>
		  <entry><varname>source_tagname</varname></entry>
		  <entry>optional</entry>
		  <entry>Internal subtag, replaced with the full path of the
		    <quote>source</quote> page</entry>
		</row>
		<row>
		  <entry><varname>output_tagname</varname></entry>
		  <entry>optional</entry>
		  <entry>Internal subtag, replaced with the full path of the
		    <quote>output</quote> page</entry>
		</row>
		<row>
		  <entry><varname>header_tagname</varname></entry>
		  <entry>optional</entry>
		  <entry>Internal subtag, replaced with the full path of the
		    header output for use with CGI scripts</entry>
		</row>
		<row>
		  <entry><varname>footer_tagname</varname></entry>
		  <entry>optional</entry>
		  <entry>Internal subtag, replaced with the full path of the
		    footer output for use with CGI scripts</entry>
		</row>
		<row>
		  <entry><varname>include_tagname</varname></entry>
		  <entry>optional</entry>
		  <entry>Internal subtag, replaced with contents of file
		    referenced (see details below)</entry>
		</row>
		<row>
		  <entry><varname>database_filename</varname></entry>
		  <entry>required</entry>
		  <entry>Filename of database for the PageGroup</entry>
		</row>
		<row>
		  <entry><varname>source_dir</varname></entry>
		  <entry>required *</entry>
		  <entry>The default source directory</entry>
		</row>
		<row>
		  <entry><varname>output_dir</varname></entry>
		  <entry>required *</entry>
		  <entry>The default output directory</entry>
		</row>
		<row rowsep="0">
		  <entry><varname>part_dir</varname></entry>
		  <entry>optional *</entry>
		  <entry>The default PagePart directory</entry>
		</row>
		<row>
		  <entry>command</entry>
		  <entry>required</entry>
		  <entry>The default external command to use on the data
		    after the wsmake parser. Default is none.</entry>
		</row>
		<row rowsep="0">
		  <entry>options</entry>
		  <entry>required</entry>
		  <entry>The default options for the default command</entry>
		</row>
	      </tbody>
	    </tgroup>
	  </table>
	</para>

	<para>
	  * Can be overridden in PageParts and Pages. If part_dir is not
	  specified, source_dir will be used for PageParts.
	</para>

	<para>
	  ** Can be overridden in Pages.
	</para>

	<para>
	  The include_tagname subtag is used to specify a tag name for
	  including a file during the make process. For instance:
	</para>
	
	<screen>  include_tagname    "include(%s)"</screen>

	<para>
	  The specified tag name requires the characters "%s" somewhere in the
	  string to represent the name of the file to be included. This means
	  that for every occurrence in the source where the string "include("
	  is found, with some filename text and a ")" after it, Wsmake will
	  replace it with the contents of the filename given:
	</para>

	<screen>
This is HTML. Now a file will be included:
include(/web/include.txt).
	</screen>

	<para>
	  This will take the entire string "include(/web/include.txt)" and
	  replace it with the contents of the file
	  <filename>/web/include.txt</filename>. The start and stop string
	  before and after the filename is required.
	</para>

	<example><title>DefaultSetup</title>
	  <screen>
PageGroup {
  database_filename      "website.db"
  lastmod_tagname        "`LASTMOD`"
  wsmake_version_tagname "`WSMAKEVERSION`"
  web_path_tagname       "`FILEPATH`"
  source_tagname         "`FILESOURCE`"
  output_tagname         "`FILEOUTPUT`"
  include_tagname        "include(%s)"
  header_tagname         "`CGI_HEADER`"
  footer_tagname         "`CGI_FOOTER`"
  source_dir             "/web/source"
  output_dir             "/web/docs"
  part_dir               "/web/templates"
  command                "myparser.pl"
  options                "&lt;%s &gt;%o"
}
	  </screen>
	</example>

	<section><title>SubTagGroup Sections</title>
	  <para>
	    The SubTagGroup section defines a group of SubTags which can be
	    re-used by PageParts and Pages. The following attributes can
	    be defined in a SubTagGroup section:
	  </para>

	  <para>
	    <table frame="none"
		   colsep="1" rowsep="1"><title>SubTagGroup Attributes</title>
	      <tgroup cols="3" align="left">
		<colspec colname="c1">
		<colspec colname="c2" colwidth="80%">
		<colspec colname="c3" colsep="0">
		<thead>
		  <row>
		    <entry>Name</entry>
		    <entry>Required / Optional</entry>
		    <entry>Description</entry>
		  </row>
		</thead>
		<tbody>
		  <row>
		    <entry><varname>name</varname></entry>
		    <entry>required</entry>
		    <entry>The name of the SubTagGroup</entry>
		  </row>
		  <row rowsep="0">
		    <entry><varname>SubTag</varname></entry>
		    <entry>optional</entry>
		    <entry>A SubTag attribute</entry>
		  </row>
		</tbody>
	      </tgroup>
	    </table>
	  </para>
	  
	  <para>
	    There can only be one name for a SubTagGroup. SubTags may be
	    defined 0, 1, or many times.
	  </para>

	  <example><title>SubTagGroup</title>
	    <screen>
SubTagGroup {
  name "default"
  SubTag "`EMAILLNK`" "&lt;a href=\"mailto:`EMAIL`\"&gt;`EMAIL`&lt;/a&gt;"
  SubTag "`EMAIL`"    "mike@wsmake.org"
  SubTag "`FONTFACE`" "Arial, Helvetica"
  SubTag "`HOST`"     "http://wsmake.org/~mike/"
}
	    </screen>
	  </example>
	  
	  <para>
	    Note in this example how a SubTag was used inside of another
	    SubTag. This is valid as long as the SubTag being used inside is
	    defined after its use. Remember that SubTags are parsed in the
	    order that they are declared. You cannot nest a SubTag within
	    its own value.
	  </para>
	</section>

	<section><title>PagePart Sections</title>
	  <para>
	    The PagePart section defines a file to be used as a piece of a
	    PageOrder. It also references any PageOrders it needs to complete
	    itself. The following attributes can be defined in a PagePart
	    section:
	  </para>

	  <para>
	    <table frame="none"
		   colsep="1" rowsep="1"><title>PagePart Attributes</title>
	      <tgroup cols="3" align="left">
		<colspec colname="c1">
		<colspec colname="c2" colwidth="80%">
		<colspec colname="c3" colsep="0">
		<thead>
		  <row>
		    <entry>Name</entry>
		    <entry>Required / Optional</entry>
		    <entry>Description</entry>
		  </row>
		</thead>
		<tbody>
		  <row>
		    <entry><varname>name</varname></entry>
		    <entry>required</entry>
		    <entry>The name of the PagePart</entry>
		  </row>
		  <row>
		    <entry><varname>filename</varname></entry>
		    <entry>required</entry>
		    <entry>The filename of the pagepart (no directory!)</entry>
		  </row>
		  <row>
		    <entry><varname>directory</varname></entry>
		    <entry>optional *</entry>
		    <entry>The directory that the file is in</entry>
		  </row>
		  <row>
		    <entry><varname>SubTag</varname></entry>
		    <entry>optional</entry>
		    <entry>A SubTag to use for this PagePart</entry>
		  </row>
		  <row>
		    <entry><varname>subtaggroup</varname></entry>
		    <entry>optional</entry>
		    <entry>A SubTagGroup to use for this PagePart</entry>
		  </row>
		  <row>
		    <entry><varname>pageorder</varname></entry>
		    <entry>optional</entry>
		    <entry>A PageOrder to use for this PagePart</entry>
		  </row>
		  <row>
		    <entry><varname>theme</varname></entry>
		    <entry>optional</entry>
		    <entry>A Theme to use for this PagePart</entry>
		  </row>
		  <row rowsep="0">
		    <entry><varname>parse</varname></entry>
		    <entry>optional</entry>
		    <entry><para>
			A value of <constant>NO</constant>,
			<constant>YES</constant>, or
			<constant>INCLUDES_ONLY</constant> which tells how
			Wsmake should parse this PagePart. The default is
			<constant>YES</constant>
		      </para></entry>
		  </row>
		</tbody>
	      </tgroup>
	    </table>
	  </para>

	  <para>
	    * If the directory is not defined here, it will use the part_dir
	    attribute defined in PageGroup.
	  </para>

	  <para>
	    There can only be one name, filename, directory, and parse
	    attribute for each PagePart. The rest can have multiples
	    definitions, and they are applied to the PagePart in the order
	    that they are defined.
	  </para>

	  <example><title>PagePart</title>
	    <screen>
PagePart {
  name      "header"
  filename  "header.html"
  directory "templates"

  SubTag    "`INFO`" "Header piece"

  subtaggroup "default"
  parse     YES
}
	    </screen>
	  </example>
	</section>

	<section><title>PageOrder Sections</title>
	  <para>
	    The PageOrder section defines a group of files to be used by
	    PageParts and Pages for ordering content. The following attributes
	    can be defined in a PageOrder section:
	  </para>
	  
	  <para>
	    <table frame="none"
		   colsep="1" rowsep="1"><title>PageOrder Attributes</title>
	      <tgroup cols="3" align="left">
		<colspec colname="c1">
		<colspec colname="c2" colwidth="80%">
		<colspec colname="c3" colsep="0">
		<thead>
		  <row>
		    <entry>Name</entry>
		    <entry>Required / Optional</entry>
		    <entry>Description</entry>
		  </row>
		</thead>
		<tbody>
		  <row>
		    <entry><varname>name</varname></entry>
		    <entry>required</entry>
		    <entry>The name of the PageOrder</entry>
		  </row>
		  <row>
		    <entry><varname>part</varname></entry>
		    <entry>optional</entry>
		    <entry>A PagePart name to use</entry>
		  </row>
		  <row rowsep="0">
		    <entry><varname>data</varname></entry>
		    <entry>required</entry>
		    <entry>A placeholder for the unique content of the page.
		      It has no value.</entry>
		  </row>
		</tbody>
	      </tgroup>
	    </table>
	  </para>
	  
	  <example><title>PageOrder</title>
	    <screen>
PageOrder {
  name "default"
  part "header"
  data
  part "footer"
}
	    </screen>
	  </example>

	  <para>
	    Any page that uses this pageorder will have the PagePart whose name
	    is "header" prepended to it and will have the PagePart whose name
	    is "footer" appended to it in the <quote>output</quote> file. The
	    "part" definitions are applied in the order that they are defined.
	    There can only be one name and data definition for each PageOrder.
	  </para>
	</section>

	<section><title>Theme</title>
	  <para>
	    The Theme section defines a set of SubTags, SubTagGroups, and
	    PageOrders to be reused by Pages. The following attributes can
	    be defined in a Theme section:
	  </para>
	  
	  <para>
	    <table frame="none"
		   colsep="1" rowsep="1"><title>Theme Attributes</title>
	      <tgroup cols="3" align="left">
		<colspec colname="c1">
		<colspec colname="c2" colwidth="80%">
		<colspec colname="c3" colsep="0">
		<thead>
		  <row>
		    <entry>Name</entry>
		    <entry>Required / Optional</entry>
		    <entry>Description</entry>
		  </row>
		</thead>
		<tbody>
		  <row>
		    <entry><varname>name</varname></entry>
		    <entry>required</entry>
		    <entry>The name of the Theme</entry>
		  </row>
		  <row>
		    <entry><varname>SubTag</varname></entry>
		    <entry>optional</entry>
		    <entry>A SubTag to use for this Theme</entry>
		  </row>
		  <row>
		    <entry><varname>subtaggroup</varname></entry>
		    <entry>optional</entry>
		    <entry>A SubTagGroup to use for this Theme</entry>
		  </row>
		  <row>
		    <entry><varname>pageorder</varname></entry>
		    <entry>optional</entry>
		    <entry>A PageOrder to use for this Theme</entry>
		  </row>
		  <row>
		    <entry><varname>command</varname></entry>
		    <entry>optional</entry>
		    <entry>The external command to use on the data after the
		      wsmake parser.</entry>
		  </row>
		  <row>
		    <entry><varname>options</varname></entry>
		    <entry>optional</entry>
		    <entry>The command line options to use for the parser
		      specified by command</entry>
		  </row>
		</tbody>
	      </tgroup>
	    </table>
	  </para>

	  <example><title>Theme</title>
	    <screen>
Theme {
  name "home"
  SubTag "`SECTION`" "Home"
  subtaggroup "home"
  pageorder "home"
}
	    </screen>
	  </example>
	</section>
      </section>
      
      <section><title>Page Section</title>
	<para>
	  The Page section defines a Page on the website. Each Page represents
	  an item to be <quote>made</quote> by the make process. The following
	  attributes can be defined in a Page section:
	</para>
	
	<para>
	  <table frame="none"
		 colsep="1" rowsep="1"><title>Page Attributes</title>
	    <tgroup cols="3" align="left">
	      <colspec colname="c1">
	      <colspec colname="c2" colwidth="80%">
	      <colspec colname="c3" colsep="0">
	      <thead>
		<row>
		  <entry>Name</entry>
		  <entry>Required / Optional</entry>
		  <entry>Description</entry>
		</row>
	      </thead>
	      <tbody>
		<row>
		  <entry><varname>web_page</varname></entry>
		  <entry>required **</entry>
		  <entry>The web page of the Page, i.e., the directory after
		    the http://servername/ <emphasis>including</emphasis> the
		    page filename.</entry>
		</row>
		<row>
		  <entry><varname>source_page</varname></entry>
		  <entry>required **</entry>
		  <entry>A string that, when appended to the source_dir
		    attribute, represents the filename of the source for this
		    Page.</entry>
		</row>
		<row>
		  <entry><varname>output_page</varname></entry>
		  <entry>optional</entry>
		  <entry>A string that, when appended to the output_dir
		    attribute, represents the filename of the output for this
		    Page. If this is not set, the corresponding web_page or
		    source_page value will be used.</entry>
		</row>
		<row>
		  <entry><varname>source_dir</varname></entry>
		  <entry>optional</entry>
		  <entry>The directory prefix to <varname>web_page</varname>
		    and/or <varname>source_page</varname> that represents the
		    <quote>source</quote> location</entry>
		</row>
		<row>
		  <entry><varname>output_dir</varname></entry>
		  <entry>optional</entry>
		  <entry>The directory prefix to
		    <varname>output_page</varname> that represents the
		    <quote>output</quote> location</entry>
		</row>
		<row>
		  <entry><varname>SubTag</varname></entry>
		  <entry>optional</entry>
		  <entry>A SubTag to use for this Page</entry>
		</row>
		<row>
		  <entry><varname>subtaggroup</varname></entry>
		  <entry>optional</entry>
		  <entry>A SubTagGroup to use for this Page</entry>
		</row>
		<row>
		  <entry><varname>pageorder</varname></entry>
		  <entry>optional</entry>
		  <entry>A PageOrder to use for this Page</entry>
		</row>
		<row>
		  <entry><varname>theme</varname></entry>
		  <entry>optional</entry>
		  <entry>A Theme to use for this Page</entry>
		</row>
		<row>
		  <entry><varname>page_type</varname></entry>
		  <entry>optional</entry>
		  <entry><para>
		      A value of <constant>NORMAL</constant>, or
		      <constant>CGI</constant> which tells Wsmake the way it
		      should output the header/footer information. The default
		      is <constant>NORMAL</constant>
		    </para></entry>
		</row>
		<row>
		  <entry><varname>parse</varname></entry>
		  <entry>optional</entry>
		  <entry><para>
		      A value of <constant>NO</constant>,
		      <constant>YES</constant>, or
		      <constant>INCLUDES_ONLY</constant> which tells how
		      Wsmake should parse this PagePart. The default is
		      <constant>YES</constant>
		    </para></entry>
		</row>
		<row>
		  <entry><varname>cgi_header</varname></entry>
		  <entry>optional</entry>
		  <entry><para>
		      This defines the name of the header file to output to
		      (relative to the location of the output) for CGI
		      page_types
		    </para></entry>
		</row>
		<row rowsep="0">
		  <entry><varname>cgi_footer</varname></entry>
		  <entry>optional</entry>
		  <entry><para>
		      This defines the name of the footer file to output to
		      (relative to the location of the output) for CGI
		      page_types
		    </para></entry>
		</row>
		<row>
		  <entry><varname>command</varname></entry>
		  <entry>optional</entry>
		  <entry>The external command to use on the data after the
		    wsmake parser.</entry>
		</row>
		<row>
		  <entry><varname>options</varname></entry>
		  <entry>optional</entry>
		  <entry>The command line options to use for the parser
		    specified by command</entry>
		</row>
	      </tbody>
	    </tgroup>
	  </table>
	</para>
	
	<para>
	  ** Either web_page or source_page may be defined. They are both
	  considered the same. It may be more readable to use web_page if both
	  the source_page and output_page are the same value.
	</para>

	<para>
	  There can only be one web_page/source_page, source_dir, output_dir,
	  page_type, parse, cgi_header, and cgi_footer definition for each
	  Page. When the page_type is CGI, the output of the header and footer
	  information (if any) goes to the files defined by cgi_header and
	  cgi_footer. If cgi_header or cgi_footer is not defined,
	  "header.html" or "footer.html" is used as a default, respectively.
	</para>

	<para>
	  For <varname>options</varname>, '%s' is replaced by the full path
	  to the source file and '%o' is replaced by the full path to the
	  output file at make time. If <varname>options</varname> is not
	  specified, but the command is, the default <varname>options</varname>
	  from the PageGroup section are <emphasis>not</emphasis> used.
	</para>

	<example><title>Page</title>
	  <screen>
Page {
  web_page   "index.html"
  source_dir "html"
  output_dir "docs"

  SubTag "`FONTFACE`" "Courier"

  subtaggroup "default"
  pageorder   "default"

  page_type   NORMAL
  parse       YES
}
	  </screen>
	</example>
      </section>
    </section>
  </chapter>

  <chapter><title>Examples</title>
    <para>
      In this chapter we overview the set of examples that come with the Wsmake
      package. The locations given are relative to the doc directory in the
      source package.
    </para>
    
    <section><title>The Basics</title>
      <para>
	Location: examples/ex1/README
      </para>
      
      <para>
	This example covers the minimal use of Wsmake. It describes what to
	expect when running Wsmake as well as the use of relative directories
	and the use of comments.
      </para>
    </section>
    
    <section><title>Using SubTags</title>
      <para>
	Location: examples/ex2/README
      </para>
      
      <para>
	This example covers the use of SubTags for tag substitution in a
	webpage.
      </para>
    </section>
    
    <section><title>Using SubTagGroups</title>
      <para>
	Location: examples/ex3/README
      </para>
      
      <para>
	This example demonstrates how to use SubTagGroups with webpages.
      </para>
    </section>
    
    <section><title>Using PageParts and PageOrders</title>
      <para>
	Location: examples/ex4/README
      </para>
      
      <para>
	This example covers page ordering and describes how the dependencies
	work out when updates are made.
      </para>
    </section>
    
    <section><title>Including files</title>
      <para>
	Location: examples/ex5/README
      </para>
      
      <para>
	This example shows how to use the <varname>include_tagname</varname>
	attribute to have files included during the make process.
      </para>
    </section>
    
    <section><title>Nesting PageOrders</title>
      <para>
	Location: examples/ex6/README
      </para>
      
      <para>
	This example shows how PageParts can have PageOrders. It also describes
	the order in which Wsmake creates the pages that utilize this.
      </para>
    </section>
    
    <section><title>Menus</title>
      <para>
	Location: examples/ex7/README
      </para>
      
      <para>
	This example shows one way of making a menu for a website using a
	combination of PageOrders, SubTagGroups, and SubTags.
      </para>
    </section>
    
    <section><title>CGI Scripts</title>
      <para>
	Location: examples/ex8/README
      </para>
      
      <para>
	This example shows how you can use CGI scripts with Wsmake. It shows
	how <varname>header_tagname</varname> and
	<varname>footer_tagname</varname> can be used by the script to
	generate the final page.
      </para>
    </section>
    
    <section><title>External Page</title>
      <para>
	Location: examples/ex9/README
      </para>
      
      <para>
	This example shows how to use other pre-processors with Wsmake.
      </para>
    </section>
    
    <section><title>Clones and Cascading Makes</title>
      <para>
	Location: examples/ex10/README
      </para>
      
      <para>
	This example shows how to use clones to make multiple output pages from
	a single source page. It then shows how to use the output from one
	page made by wsmake as input to another page.
      </para>
    </section>

    <section><title>Themes</title>
      <para>
	Location: examples/ex11/README
      </para>
      
      <para>
	This example explains what themes are and how they are used.
      </para>
    </section>

    <section><title>Depend Attribute</title>
      <para>
	Location: examples/ex12/README
      </para>
      <para>
	This example explains how to use the depend attribute for pages.
      </para>
    </section>
  </chapter>
  
  <chapter><title>Licensing</title>
    <para>
      Wsmake may be copied only under the terms of either the Artistic License
      or the GNU General Public License, which may be found in the Wsmake
      source distribution.
      
      If you have any doubt about using Wsmake in a way that may violate the
      license, please contact mike@wsmake.org and we'll discuss it.
    </para>
  </chapter>
</book>
