Skip to content

Commit

Permalink
doc updates
Browse files Browse the repository at this point in the history
  • Loading branch information
jkf committed Aug 12, 2003
1 parent 1269192 commit 5e85a71
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 10 deletions.
26 changes: 23 additions & 3 deletions doc/aserve.html
Expand Up @@ -383,8 +383,8 @@ <h3>Components of a request</h3>
argument is <strong>nil</strong> meaning ignore this value and use the timeout value held
in the server object and retrieved with<strong> wserver-response-timeout</strong>..</li>
<li><strong>plist</strong> - initial property list for this entity</li>
<li><strong>hook</strong> - a function of three arguments: req,ent and extra.
&nbsp;&nbsp; See <a href="#entity-hook-function">entity hook function</a>.</li>
<li><strong>hook</strong> - a function of three arguments: req,ent and extra. &nbsp;&nbsp;
See <a href="#entity-hook-function">entity hook function</a>.</li>
</ul>

<p>The function that handles requests for files will respond correctly to <strong>If-Modified-Since</strong>
Expand Down Expand Up @@ -439,7 +439,8 @@ <h3><a name="entity-hook-function"></a>Entity Hook Function</h3>
&amp;key prefix host port destination remove authorizer server <br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
indexes filter timeout plist publisher access-file<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; hook)</font></strong></p>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
hook)</font></strong></p>

<p><strong>publish-directory</strong> is used to publish a complete directory tree of
files.&nbsp; This is similar to how web servers such as Apache publish files. &nbsp;
Expand Down Expand Up @@ -499,6 +500,25 @@ <h3><a name="entity-hook-function"></a>Entity Hook Function</h3>
for this file.&nbsp; The <strong>publisher</strong> function must return an entity to be
processed to send back a response.&nbsp;&nbsp; The <strong>publisher</strong> function may
wish to publish that entity but it need not do so.</p>
<div align="center"><center>

<table border="1" width="86%" cellpadding="5">
<tr>
<td width="100%">Note:&nbsp; <strong>publish-directory</strong> is a more general function
than its name implies.&nbsp;&nbsp;&nbsp; It looks at each url path for a match for <strong>prefix
</strong>and if such a match is found the <strong>prefix</strong> is removed and replaced
with <strong>destination</strong>.&nbsp;&nbsp; Thus is prefix is <strong>&quot;/foo&quot;</strong>
and destination is <strong>&quot;/bar&quot;</strong> then a url path of&nbsp; <strong>&quot;/foobaz/joe.html&quot;
</strong>would be converted to <strong>&quot;/barbaz/joe.html&quot;.</strong>
&nbsp;&nbsp;&nbsp; This is rarely useful but it does show that you have to be careful
about the prefix and destination strings.&nbsp; It's usually the case that if the prefix
string ends in <strong>&quot;/&quot;</strong> then the destination string should end in <strong>&quot;/&quot;</strong>
(and vice versa).&nbsp; Thus a prefix of <strong>&quot;/foo&quot;</strong> would have a
destination of <strong>&quot;/bar&quot; </strong>and a prefix of <strong>&quot;/foo/&quot;</strong>
would have a destination of <strong>&quot;/bar/&quot;</strong>.&nbsp; </td>
</tr>
</table>
</center></div>

<p>&nbsp;</p>

Expand Down
19 changes: 12 additions & 7 deletions doc/htmlgen.html
Expand Up @@ -9,7 +9,7 @@

<h1 align="center"><strong>HTML Generation Facility</strong></h1>

<p><small><small>This document copyright (c) 2000-2001 Franz Inc.</small></small></p>
<p><small><small>This document copyright (c) 2000-2003 Franz Inc.</small></small></p>

<h2>Introduction</h2>

Expand Down Expand Up @@ -81,9 +81,12 @@ <h2>html macro</h2>
</em>[Macro]</strong></p>

<p>The forms are processed from left to right.&nbsp; The most&nbsp; likely effect is that
html output is generated.&nbsp; The output is sent to the stream htmlgen:*html-stream*.
&nbsp; The action taken depends on what the form looks like at macro-expansion time.
&nbsp;&nbsp; The possibilities are:
html output is generated.&nbsp; The output is sent to the stream <strong>net.html.generator:*html-stream*</strong>.
&nbsp; The <strong>html</strong> macro is designed to run inside AllegroServe's <strong>with-http-body</strong>
macro which binds <strong>*html-stream*</strong> to the correct stream.&nbsp;&nbsp; Also
the <strong>html-stream </strong>macro described below binds <strong>*html-stream* </strong>before
calling <strong>html.</strong>&nbsp; The action taken by <strong>html</strong> depends on
what the form looks like at macro-expansion time. &nbsp;&nbsp; The possibilities are:

<ul>
<li>string -&nbsp; A string is simply written (using <strong>princ</strong>) to the output
Expand Down Expand Up @@ -159,8 +162,9 @@ <h2>html macro</h2>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</em>[Macro]</strong></p>

<p>This binds htmlgen:*html-stream* to the value of the stream argument and then evaluates
the <em>form<strong> </strong></em>arguments just like the <strong>html</strong> macro. </p>
<p>This binds <strong>net.html.generator:*html-stream*</strong> to the value of the stream
argument and then evaluates the <em>form<strong> </strong></em>arguments just like the <strong>html</strong>
macro. </p>

<p>&nbsp;</p>

Expand All @@ -172,7 +176,8 @@ <h2>Examples</h2>
<pre>defun simple-table-a ()
(with-open-file (p &quot;test.html&quot;
:direction :output
:if-exists :supersede)
:if-exists :supersede
:if-does-not-exist :create)

(html-stream p
(:html
Expand Down

0 comments on commit 5e85a71

Please sign in to comment.