<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"DTD/xhtml1-transitional.dtd">
<head>
<title>
WebMake: Documentation: The Order of Processing
</title>
<meta name="generator" content="WebMake/1.2" />
<style>
body {
background-color: #ffffff;
color: #000000;
font-size: medium;
font-family: verdana,lucida,helvetica,sans-serif;
}
// OL,UL,P,BODY,TD,TR,TH,FORM {
// font-family: verdana,lucida,helvetica,sans-serif;
// font-size: medium;
// color: #000000;
}
code, samp, pre
{
font-family: monospace;
}
H1 { font-size: x-large; font-family: Garamond,Book Antiqua,Times,serif; background: #FFCC66; }
H2 { font-size: large; font-family: Garamond,Book Antiqua,Times,serif; background: #FFDD77; }
H3 { font-size: medium; font-family: Garamond,Book Antiqua,Times,serif; background: #FFEE88; }
H4 { font-size: small; font-family: Garamond,Book Antiqua,Times,serif; }
H5 { font-size: x-small; font-family: Garamond,Book Antiqua,Times,serif; }
H6 { font-size: xx-small; font-family: Garamond,Book Antiqua,Times,serif; }
A:link {
font-weight: bold;
color: #004000;
text-decoration: underline;
}
A:visited {
font-weight: normal;
color: #008000;
text-decoration: underline;
}
A:active {
font-weight: bold;
color: #800000;
text-decoration: underline;
}
</style>
</head>
<body bgcolor="#ffffff" text="#000000" link="#3300cc" vlink="#660066">
<font face="lucida,verdana,sans-serif">
<div align="center">
<img src="images/WebMakeTitle.png" width="500" height="122" />
</div>
<table width="100%">
<tr>
<td valign="top">
Documentation</strong> (version 1.2)
</td>
<td valign="top">
<div align="right">
[ <a href="index_03-proc_logic.html">Back</a> | <a href="set.html">Forward</a> | <a href="index.html">Index</a>
| <a href="allinone.html">All In One</a> ]
</div>
</td>
</tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td bgcolor="#aaaaaa">
<table border="0" cellspacing="4" cellpadding="4" width="100%">
<tr>
<td bgcolor="#ffffff">
<table border="0" cellspacing="4" cellpadding="4" width="100%">
<tr>
<td>
<h1>The Order of Processing</h1><p>
In order to fully control the WebMake file processing using Perl code, it's
important to know the order in which the tags and so on are parsed.
</p>
<a name="Parsing_of_the_WebMake_File"><h2>Parsing of the WebMake File</h2></a> <p>
Initially, WebMake used a set order of tag parsing, but this proved to be
unwieldy and confusing. Now, it uses the order in which the tags are defined
in the .wmk file, so if you want tag A to be interpreted before tag B, put A
before B and the right thing will happen.
</p>
<p>
Perl code embedded inside the WebMake file, using <a href="perl.html"><{perl}></a> processing directives, will be evaluated there
and then (unless the <{perl}> block is embedded in another block, such
as a content item or <a href="out.html"><out></a> file block).
</p>
<p>
This means that you can define content items by hand, search for other content
items using a <a href="contents.html"><contents></a> tag, and then use a <a href="perl.html"><{perl}></a> section to define a list of all content items
which satisfy a particular set of criteria.
</p>
<p>
This list can then be used in later <a href="perl.html"><{perl}></a> blocks, content references, or <a href="for.html"><for></a> tags.
</p>
<a name="Processing_the_lt_out_gt_Tags"><h2>Processing the <out> Tags</h2></a> <p>
Once the file is fully parsed, the <a href="out.html"><out></a> tags are
processed, one by one.
</p>
<p>
At this point, content references, <a href="set.html"><{set}></a> tags, and
<a href="perl.html"><{perl}></a> processing directives will be interpreted,
if they are found within content chunks. Finally, deferred content references
and <a href="metadata.html">metadata</a> references are expanded.
</p>
<p>
Eventually, no content references, <a href="set.html"><{set}></a> tags, <a href="perl.html"><{perl}></a> processing directives, <a href="metadata.html">metadata</a> references, or
URL references are left in the file text. At this point, the file is written
to disk under a temporary name, and the next output file is processed.
</p>
<p>
Once all output files are processed, the entire set of files which have
been modified are moved into place, replacing any previous versions.
</p>
<p>
</p>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
<table width="100%">
<tr>
<td valign="top">
Documentation</strong> (version 1.2)
</td>
<td valign="top">
<div align="right">
[ <a href="index_03-proc_logic.html">Back</a> | <a href="set.html">Forward</a> | <a href="index.html">Index</a>
| <a href="allinone.html">All In One</a> ]
</div>
</td>
</tr>
</table>
<div align="right">
</div>
</font>
</body>
</html>