Next Previous Up Top Contents Index

WebMaker User Guide

12.2 Include files

You can define include files. Each include file is treated as if all the definitions in it appeared in the WML file you are editing. The general syntax is:

INCLUDE <filename> 
INCLUDE "filename"

The angle bracket syntax (<filename>) allows you to include the standard library WML files without being required to specify the directory they are in. When WebMaker sees an include file named by <filename>, it looks for the file in the lib subdirectory of the directory in which WebMaker is installed. So, for example, if you have installed WebMaker for the PC in C:\webmaker\, WebMaker will look for <nodes.wml> in C:\webmaker\lib\nodes.wml.

In the standard syntax using double quotes ("filename"), filename may be either a relative pathname or an absolute pathname. If it is a relative pathname, the included file must be relative to the directory of the WML file you are editing.

Note that the only way to specify a relative pathname is to edit the WML file in a text editor. When you specify an include file using WebMaker interactively, the result is always an absolute pathname.

In the following example of a relative pathname, the nodesTI.wml file must be in the same directory as the WML file you are editing. The syntax for a relative pathname of an include file that is in the same directory as the WML file you are editing is the same on all platforms:

INCLUDE "nodesTI.wml"

In the following examples of relative pathnames, the lib directory must be in the same directory as the WML file you are editing:

A relative pathname on Unix:

INCLUDE "lib/nodesTI.wml"

A relative pathname on Windows:

INCLUDE "lib\nodesTI.wml"

A relative pathname on the Macintosh:

INCLUDE "lib:nodesTI.wml"

The following are examples of absolute pathnames.

Absolute pathnames on Unix:

INCLUDE "/nova/webmaker/lib/nodesTI.wml"
INCLUDE "~skeene/lib/nodesTI.wml"

An absolute pathname on Windows:

INCLUDE "c:\webmaker\lib\nodesTI.wml"

An absolute pathname on the Macintosh:

INCLUDE "Banana:Applications:WebMakerTM 2.1:lib:nodesTI.wml"

Most WML files that use only the standard libraries should have the following at the beginning of the files:

INCLUDE <nodesBTI.wml> 
INCLUDE <headings.wml> 
INCLUDE <normals.wml> 
INCLUDE <lists.wml> 
INCLUDE <contents.wml> 

You can combine standard library WML files and other files. You can, for example, use the double quotes syntax to include files that are in directories other than WebMaker's lib directory:

INCLUDE <normals.wml> 
INCLUDE <headings.wml> 
INCLUDE "C:\office\memos.wml" 
INCLUDE "personal.wml"