atom feed1 message in org.apache.tcl.rivet-devcvs commit: tcl-rivet/doc/html comman...
FromSent OnAttachments
dav...@apache.orgOct 23, 2002 11:42 am 
Subject:cvs commit: tcl-rivet/doc/html commands.html directives.html examples.html installation.html
From:dav...@apache.org (dav@apache.org)
Date:Oct 23, 2002 11:42:29 am
List:org.apache.tcl.rivet-dev

davidw 2002/10/23 11:42:29

Modified: . ChangeLog doc rivet.xsl doc/html commands.html directives.html examples.html installation.html Log: * doc/rivet.xsl: Use <pre> tag for source code examples.

Revision Changes Path 1.77 +4 -0 tcl-rivet/ChangeLog

Index: ChangeLog =================================================================== RCS file: /home/cvs/tcl-rivet/ChangeLog,v retrieving revision 1.76 retrieving revision 1.77 diff -u -r1.76 -r1.77 --- ChangeLog 23 Oct 2002 03:58:29 -0000 1.76 +++ ChangeLog 23 Oct 2002 18:42:28 -0000 1.77 @@ -1,3 +1,7 @@ +2002-10-23 David N. Welton <dav@dedasys.com> + + * doc/rivet.xsl: Use <pre> tag for source code examples. + 2002-10-22 David N. Welton <dav@dedasys.com>

* src/TclWebapache.c (TclWeb_StringToUtf): One more CONST84 - now

1.9 +2 -2 tcl-rivet/doc/rivet.xsl

Index: rivet.xsl =================================================================== RCS file: /home/cvs/tcl-rivet/doc/rivet.xsl,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- rivet.xsl 18 Oct 2002 07:01:31 -0000 1.8 +++ rivet.xsl 23 Oct 2002 18:42:28 -0000 1.9 @@ -286,11 +286,11 @@ </pre> </xsl:when> <xsl:otherwise> - <div style="background:#bbffbb ; width:90ex ; margin: 2ex ; + <pre style="background:#bbffbb ; width:90ex ; margin: 2ex ; padding: 1ex; border: solid black 1px ; white-space: pre; font-family:monospace ; " class="{name(.)}"> <xsl:apply-templates/> - </div> + </pre> </xsl:otherwise> </xsl:choose> </xsl:variable>

1.7 +1 -1 tcl-rivet/doc/html/commands.html

Index: commands.html =================================================================== RCS file: /home/cvs/tcl-rivet/doc/html/commands.html,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- commands.html 20 Oct 2002 17:02:56 -0000 1.6 +++ commands.html 23 Oct 2002 18:42:28 -0000 1.7 @@ -154,7 +154,7 @@ <div class="cmdsynopsis" style="width:80%"><span style="background:#bbbbff ;
margin:1ex ; padding:.4ex ; word-spacing:1ex "><span style="font-weight:bold ;
font-family:monospace">makeurl</span> <span style="font-family:monospace;
text-decoration:underline"><i><tt>filename</tt></i></span></span></div> </span></dt><dd><div style="padding:4 ; margin-top:3 ; margin-bottom:3 ;
width:75%"><div style=" margin:1ex ; margin-bottom:1.5ex ; padding .5ex"> Create a self referencing URL from a filename. For example: - <div style="background:#bbffbb ; width:90ex ; margin: 2ex ; padding: 1ex;
border: solid black 1px ; white-space: pre; font-family:monospace ; "
class="programlisting">makeurl /tclp.gif</div> + <pre style="background:#bbffbb ; width:90ex ; margin: 2ex ; padding: 1ex;
border: solid black 1px ; white-space: pre; font-family:monospace ; "
class="programlisting">makeurl /tclp.gif</pre> returns <tt>http://[hostname]:[port]/tclp.gif</tt>. where hostname and port are the hostname and port of the

1.8 +1 -1 tcl-rivet/doc/html/directives.html

Index: directives.html =================================================================== RCS file: /home/cvs/tcl-rivet/doc/html/directives.html,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- directives.html 20 Oct 2002 17:02:56 -0000 1.7 +++ directives.html 23 Oct 2002 18:42:28 -0000 1.8 @@ -23,7 +23,7 @@ is an actual Tcl script, so to run a file, you would do:

- <div style="background:#bbffbb ; width:90ex ; margin: 2ex ; padding: 1ex;
border: solid black 1px ; white-space: pre; font-family:monospace ; "
class="programlisting">Rivet_Script GlobalInitScript &quot;source
/var/www/foobar.tcl&quot;</div> + <pre style="background:#bbffbb ; width:90ex ; margin: 2ex ; padding: 1ex;
border: solid black 1px ; white-space: pre; font-family:monospace ; "
class="programlisting">Rivet_Script GlobalInitScript &quot;source
/var/www/foobar.tcl&quot;</pre> </div></div></dd><dt><span class="term"> <div class="cmdsynopsis" style="width:80%"><span style="background:#bbbbff ;
margin:1ex ; padding:.4ex ; word-spacing:1ex "><span
style="font-family:monospace; text-decoration:underline">ChildInitScript</span>
<span style="font-family:monospace;
text-decoration:underline"><i><tt>script</tt></i></span></span></div> </span></dt><dd><div style="padding:4 ; margin-top:3 ; margin-bottom:3 ;
width:75%"><div style=" margin:1ex ; margin-bottom:1.5ex ; padding .5ex">

1.6 +12 -12 tcl-rivet/doc/html/examples.html

Index: examples.html =================================================================== RCS file: /home/cvs/tcl-rivet/doc/html/examples.html,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- examples.html 20 Oct 2002 17:02:56 -0000 1.5 +++ examples.html 23 Oct 2002 18:42:28 -0000 1.6 @@ -10,16 +10,16 @@ Assuming you have Apache configured correctly, create a file called <tt>hello.rvt</tt> where Apache can find it, with the following content: - </p><div style="background:#bbffbb ; width:90ex ; margin: 2ex ; padding: 1ex;
border: solid black 1px ; white-space: pre; font-family:monospace ; "
class="programlisting">&lt;? + </p><pre style="background:#bbffbb ; width:90ex ; margin: 2ex ; padding: 1ex;
border: solid black 1px ; white-space: pre; font-family:monospace ; "
class="programlisting">&lt;? puts &quot;Hello World&quot; ?&gt; -</div><p style="width:90%"> +</pre><p style="width:90%"> If you then access it with your browser, you should see a blank page with the text &quot;Hello World&quot; (without the quotes) on it. </p></div><div class="example"><a name="table"></a><p class="title"><b>Example
2. Generate a Table</b></p><p style="width:90%"> In another simple example, we dynamically generate a table: - </p><div style="background:#bbffbb ; width:90ex ; margin: 2ex ; padding: 1ex;
border: solid black 1px ; white-space: pre; font-family:monospace ; "
class="programlisting">&lt;? puts &quot;&lt;table&gt;\n&quot; + </p><pre style="background:#bbffbb ; width:90ex ; margin: 2ex ; padding: 1ex;
border: solid black 1px ; white-space: pre; font-family:monospace ; "
class="programlisting">&lt;? puts &quot;&lt;table&gt;\n&quot; for {set i 1} { $i &lt;= 8 } {incr i} { puts &quot;&lt;tr&gt;\n&quot; for {set j 1} {$j &lt;= 8} {incr j} { @@ -30,7 +30,7 @@ puts &quot;&lt;/tr&gt;\n&quot; } puts &quot;&lt;/table&gt;\n&quot; ?&gt; -</div><p style="width:90%"> +</pre><p style="width:90%"> If you read the code, you can see that this is pure Tcl. We could take the same code, run it outside of Rivet, and it would generate the same HTML! @@ -41,7 +41,7 @@ POST operations. </p><p style="width:90%"> Given an HTML form like the following: - </p><div style="background:#bbffbb ; width:90ex ; margin: 2ex ; padding: 1ex;
border: solid black 1px ; white-space: pre; font-family:monospace ; "
class="programlisting">&lt;form action=&quot;vars.rvt&quot;&gt; + </p><pre style="background:#bbffbb ; width:90ex ; margin: 2ex ; padding: 1ex;
border: solid black 1px ; white-space: pre; font-family:monospace ; "
class="programlisting">&lt;form action=&quot;vars.rvt&quot;&gt; &lt;p&gt; &lt;input name=&quot;title&quot;&gt; &lt;input name=&quot;salary&quot;&gt; @@ -54,9 +54,9 @@ &lt;/select&gt; &lt;/p&gt; &lt;/form&gt; -</div><p style="width:90%"> +</pre><p style="width:90%"> We can use this Rivet script to get the variable values: - </p><div style="background:#bbffbb ; width:90ex ; margin: 2ex ; padding: 1ex;
border: solid black 1px ; white-space: pre; font-family:monospace ; "
class="programlisting">&lt;? + </p><pre style="background:#bbffbb ; width:90ex ; margin: 2ex ; padding: 1ex;
border: solid black 1px ; white-space: pre; font-family:monospace ; "
class="programlisting">&lt;? set errlist {} if { [var exists title] } { set salary [var get title] @@ -92,7 +92,7 @@ } else { puts &quot;Thanks for the information!&quot; } -?&gt;</div><p style="width:90%"> +?&gt;</pre><p style="width:90%"> The first statement checks to make sure that the <tt>boss</tt> variable has been passed to the script, and then does something with that information. If @@ -118,15 +118,15 @@ </p></div><div class="example"><a name="upload"></a><p class="title"><b>Example
4. File Upload</b></p><p style="width:90%"> The following HTML in one file, say, <tt>upload.html</tt> - </p><div style="background:#bbffbb ; width:90ex ; margin: 2ex ; padding: 1ex;
border: solid black 1px ; white-space: pre; font-family:monospace ; "
class="programlisting">&lt;form action=&quot;foo.ttml&quot;
enctype=&quot;multipart/form-data&quot; + </p><pre style="background:#bbffbb ; width:90ex ; margin: 2ex ; padding: 1ex;
border: solid black 1px ; white-space: pre; font-family:monospace ; "
class="programlisting">&lt;form action=&quot;foo.ttml&quot;
enctype=&quot;multipart/form-data&quot; method=&quot;post&quot;&gt; &lt;input type=&quot;file&quot; name=&quot;MyUpload&quot;&gt;&lt;/input&gt; -&lt;/form&gt;</div><p style="width:90%"> +&lt;/form&gt;</pre><p style="width:90%"> Can be used with the following Tcl code, in a second file (<tt>upload.rvt</tt> for instance) in order to create a file upload form. - </p><div style="background:#bbffbb ; width:90ex ; margin: 2ex ; padding: 1ex;
border: solid black 1px ; white-space: pre; font-family:monospace ; "
class="programlisting">&lt;? + </p><pre style="background:#bbffbb ; width:90ex ; margin: 2ex ; padding: 1ex;
border: solid black 1px ; white-space: pre; font-family:monospace ; "
class="programlisting">&lt;? upload save MyUpload /tmp/uploadfiles/file1 puts &quot;Saved file [upload filename MyUpload] \ ([upload size MyUpload] bytes) to server&quot; -?&gt;</div></div></div><div class="navfooter"><hr><table width="100%"
summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p"
href="commands.html">Prev</a> </td><td width="20%" align="center"><a
accesskey="u" href="index.html">Up</a></td><td width="40%" align="right"> <a
accesskey="n" href="help.html">Next</a></td></tr><tr><td width="40%"
align="left" valign="top">Rivet Tcl Commands and Variables </td><td width="20%"
align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%"
align="right" valign="top"> Resources - How to Get
Help</td></tr></table></div></body></html> +?&gt;</pre></div></div><div class="navfooter"><hr><table width="100%"
summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p"
href="commands.html">Prev</a> </td><td width="20%" align="center"><a
accesskey="u" href="index.html">Up</a></td><td width="40%" align="right"> <a
accesskey="n" href="help.html">Next</a></td></tr><tr><td width="40%"
align="left" valign="top">Rivet Tcl Commands and Variables </td><td width="20%"
align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%"
align="right" valign="top"> Resources - How to Get
Help</td></tr></table></div></body></html>

1.7 +7 -7 tcl-rivet/doc/html/installation.html

Index: installation.html =================================================================== RCS file: /home/cvs/tcl-rivet/doc/html/installation.html,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- installation.html 20 Oct 2002 17:02:56 -0000 1.6 +++ installation.html 23 Oct 2002 18:42:28 -0000 1.7 @@ -21,8 +21,8 @@ You must uncompress the Rivet sources in the directory where you wish to compile them.

- </p><div style="background:#bbffbb ; width:90ex ; margin: 2ex ; padding: 1ex;
border: solid black 1px ; white-space: pre; font-family:monospace ; "
class="programlisting">gunzip tcl-rivet-X.X.X.tar.gz - tar -xvf tcl-rivet-X.X.X.tar.gz</div><p style="width:90%"> + <pre style="background:#bbffbb ; width:90ex ; margin: 2ex ; padding: 1ex;
border: solid black 1px ; white-space: pre; font-family:monospace ; "
class="programlisting">gunzip tcl-rivet-X.X.X.tar.gz +tar -xvf tcl-rivet-X.X.X.tar.gz</pre>

</p></li><li><p class="title"><b>Building Rivet</b></p><p style="width:90%"> Rivet uses a unique build system which we created especially @@ -36,8 +36,8 @@ set certain options. Try the next step first, and see if it's successful. </p></li><li><p style="width:90%">At this point, you are ready to run the build - system:</p><div style="background:#bbffbb ; width:90ex ; margin: 2ex ;
padding: 1ex; border: solid black 1px ; white-space: pre; font-family:monospace
; " class="programlisting">cd src/ -./make.tcl <i><tt>option</tt></i></div><p style="width:90%">where
<i><tt>option</tt></i> can be + system:</p><pre style="background:#bbffbb ; width:90ex ; margin: 2ex ;
padding: 1ex; border: solid black 1px ; white-space: pre; font-family:monospace
; " class="programlisting">cd src/ +./make.tcl <i><tt>option</tt></i></pre><p style="width:90%">where
<i><tt>option</tt></i> can be either <tt><span style="text-decoration:underline">shared</span></tt> or <tt><span style="text-decoration:underline">static</span></tt>. </p></li><li><p class="title"><b>Install</b></p><p style="width:90%"> @@ -51,13 +51,13 @@ </p></li></ol></li><li><p class="title"><b>Apache Configuration Files</b></p><p
style="width:90%"> Rivet is relatively easy to configure - we start off by adding the module itself: - </p><div style="background:#bbffbb ; width:90ex ; margin: 2ex ; padding: 1ex;
border: solid black 1px ; white-space: pre; font-family:monospace ; "
class="programlisting">LoadModule rivet_module
<i><tt>/usr/lib/apache/1.3/mod_rivet.so</tt></i></div><p style="width:90%"> + </p><pre style="background:#bbffbb ; width:90ex ; margin: 2ex ; padding: 1ex;
border: solid black 1px ; white-space: pre; font-family:monospace ; "
class="programlisting">LoadModule rivet_module
<i><tt>/usr/lib/apache/1.3/mod_rivet.so</tt></i></pre><p style="width:90%"> This tells Apache to load the Rivet shared object, wherever it happens to reside on your file system. Now we have to tell Apache what kind of files are &quot;Rivet&quot; files and how to process them: - </p><div style="background:#bbffbb ; width:90ex ; margin: 2ex ; padding: 1ex;
border: solid black 1px ; white-space: pre; font-family:monospace ; "
class="programlisting">AddType application/x-httpd-rivet .rvt - AddType application/x-rivet-tcl .tcl</div><p style="width:90%"> + </p><pre style="background:#bbffbb ; width:90ex ; margin: 2ex ; padding: 1ex;
border: solid black 1px ; white-space: pre; font-family:monospace ; "
class="programlisting">AddType application/x-httpd-rivet .rvt + AddType application/x-rivet-tcl .tcl</pre><p style="width:90%"> These tell Apache to process files with the <tt>.rvt</tt> and <tt>.tcl</tt> extensions as Rivet files.