Google

NAME="GENERATOR" CONTENT="Modular DocBook HTML Stylesheet Version 1.71 ">

Chapter 3. Configuration file syntax

The Wsmake configuration file is made up of sections. The first section defined in a configuration file is called "Website". Currently there can only be one Website section for each configuration file.

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:

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.

Details on what a section can reference are described later in this chapter.

General Syntax

Sections

Each section has the following syntax:

SectionName {
     
}
    

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 must 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)

Attributes

Attributes in each section are limited to one "line." The line can span several physical lines by using the escape charcter ("\") followed by a carriage return. The maximum line length is 2048 characters. Attributes are defined within the following syntax:

  AttributeName value

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)

  AttributeName  " The Name value "

In order to use a double quote inside the value, escape it with a '\':

  AttributeName  "The \"Name\" value"

Note: The only escape sequences processed are the double quotes and carriage returns for multi-line attributes. Any other '\' usage is literal.

Note: To have double quotes in the value, always escape them and enclose the entire value in double quotes.

Comments

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

  url http://mysite.com/index.html#about comment
  url "http://mysite.com/index.html#about"

SubTags

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:

  SubTag "SubTag Name" "SubTag Value"

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:

  SubTag SubTag Name SubTag Value

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".

A command-based SubTag can be created by using back quotes around the value part:

  SubTag "DATE" `date`

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)