Current version: 2.0
These pages are currently being rewritten pending the release of NextPage 2.0
Some parts of this text may apply to previous versions of NextPage and not the current version.
.
User's Guide - Table of Contents

Source files

In general
The source file is NextPage's starting point when doing its eventual job, generating HTML files.

When NextPage is run, this is approximately what happens:
NextPage reads the group definitions from the project file, and creates a list of all files it finds under the sourcePath directive of each group defined. Once that list has been made, NextPage's real work begins:
One at a time, every source file is loaded into memory. Next NextPage traverses the file looking for tags. This is done in a logic order:

s the &=<&lt;GROUP ="group_name&=">&=> are seeked first. These must tell NextPage how to process all further tags. If the GROUP tag isn't found, the file isn't considdered to be a source file and will be ignored.

s Next NextPage checks if the templatePath directive has a value for the current group. If so, the appropriate template file is loaded and included in the source.

s The &=<&lt;INSERTTEXT>&=>, &=<&lt;REPLACETEXT>&=> and &lt;INSERTFILE<>&=> tags are looked for. Once any of them are found, the appropriate text/files are inserted into the source file.

s Other tags are searched for and processed. Other directives such as the extension directive, the outputDir, etc are used to finally generate the output file.

Some Notes
The order in which NextPage evaluates tags and directive for each file, compiling the rough output file before editing it, enables you to use tags not only in the actual source file, but also within the template file. Tags found there will automatically apply to the source file's group definition.

The name the output HTML file will get, is compiled from the name of the source file, ie the extension is replaced by the one specified in the extension directive, while the preFix and postFix directives (see the directives section) allow you to further modify the output file name.

Although your sourcefiles are likely to contain the actual content of your HTML pages, it might come in handy to be aware that they don't necessarily have to: a source file containing tags only, with the content coming from inserted files and/or text is an entirely valid way to work.


This page was generated using NextPage 2.0   Edit
User's Guide - Home

Downloading NextPage

Pending NextPage 2.0
Last modified: Saturday, August 10 2002

SourceForge Logo