CONTENT="Modular DocBook HTML Stylesheet Version 1.71
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.
Table 3-1. Website Attributes
The name, maintainer, and url settings are identifiers only and do not play a role in the parse process.
When the value of an include attribute does not start with a '/', the file is looked for relative to the configuration file.
Example 3-1. Website
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:
Attributes will be discussed first. Table 3-2 lists the PageGroup attributes.
Table 3-2. PageGroup Attributes
* Can be overridden in PageParts and Pages. If part_dir is not specified, source_dir will be used for PageParts.
** Can be overridden in Pages.
*** The filename is optional when the Timestamp format is requested. But even if one is given, no data is stored in it. When the Timestamp format is requested, only the source pages have bearing on the update process. This means changing SubTags, Depends, or other entities that would normally be tracked, will not have there state cached.
The include_tagname subtag is used to specify a tag name for including a file during the make process. For instance:
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:
This will take the entire string "include(/web/include.txt)" and replace it with the contents of the file /web/include.txt. The start and stop string before and after the filename is required.
If the filename doesn't begin with a '/' character, the file is first looked for relative to the source file that is being parsed, and the in the directory defined by include_dir, if specified. Globs, however, are only looked for relative to the source file.
The subtag_format definition can be used to abstract a common part of all subtags so that you can define them without the common part. For example, if every SubTag you use on a website is of the form:
Then you can specify a ssubtag_format of:
Then when you specify SubTags, it is not necessary to include the extra information in the subtag_format:
With the subtag_format definition above, Wsmake will look for `test` when it parses the source data.
As in the Website section, the include files will be looked for relative to the configuration file if not prefixed with a '/'. The same is true for the depend attribute.
Example 3-2. PageGroup
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:
Table 3-3. SubTagGroup Attributes
There can only be one name for a SubTagGroup. SubTags may be defined 0, 1, or many times.
Example 3-3. SubTagGroup
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.
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:
Table 3-4. PagePart Attributes
* If the directory is not defined here, it will use the part_dir attribute defined in PageGroup.
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.
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:
Table 3-5. PageOrder Attributes
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 "output" 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.
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:
Table 3-6. Theme Attributes
The Page section defines a Page on the website. Each Page represents an item to be "made" by the make process. The following attributes can be defined in a Page section:
Table 3-7. Page Attributes
** 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.
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.
For options, '%i' is replaced by the full path to the wsmake parsed source file and '%o' is replaced by the full path to the output file at make time. Other options are '%s', the full path to the source file, '%w' the web path of the page, '%ds', the full path to the directory of the source file, '%do', the full path to the directory of the output file. If options is not specified, but the command is, the default options from the PageGroup section are not used.