jcastura 00/11/06 18:10:26
Modified: xdocs contributors.xml design.xml migration.xml
user-guide.xml install.xml
Log:
Edits.
Revision Changes Path
1.14 +1 -1 jakarta-velocity/xdocs/contributors.xml
Index: contributors.xml
===================================================================
RCS file: /home/cvs/jakarta-velocity/xdocs/contributors.xml,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -r1.13 -r1.14
--- contributors.xml 2000/11/03 19:44:46 1.13
+++ contributors.xml 2000/11/07 02:10:24 1.14
@@ -97,7 +97,7 @@
<tr>
<td>John Castura</td>
<td><link href="mailto:[EMAIL PROTECTED]">[EMAIL PROTECTED]</link></td>
- <td>-</td>
+ <td></td>
<td>Apprentice</td>
</tr>
1.8 +5 -5 jakarta-velocity/xdocs/design.xml
Index: design.xml
===================================================================
RCS file: /home/cvs/jakarta-velocity/xdocs/design.xml,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- design.xml 2000/10/16 03:07:21 1.7
+++ design.xml 2000/11/07 02:10:24 1.8
@@ -27,18 +27,18 @@
<p>
Velocity has a myriad of potential uses -- generating SQL, PostScript,
- or Java source code from templates -- but it is expected to be most
- widely used by web developers looking for a viable alternative to
+ or Java source code from templates -- but web developers looking for
+ a viable alternative to
<link href="http://www.php.net/">PHP</link> and
<link href="http://java.sun.com/products/jsp/">Java
- Server Pages</link> (JSPs).
+ Server Pages</link> (JSPs) are expected to be its principle user group.
</p>
<p>
Velocity allows web page designers to embed simple yet powerful script
elements in their web pages. These script elements work
in conjunction with a Context object, which is defined in Java code.
- A context object--essentially a Hashtable that provides get and set
+ A context object--essentially a hashtable that provides get and set
methods for retrieving and setting objects by name within the Context
--provides a "hook" from the Java code to the Velocity script
elements. These script elements allow a web designer to retrieve
@@ -53,7 +53,7 @@
Velocity does not allow Java code to be embedded in pages. Unlike PHP,
Velocity does not implement features with other functions. The MVC
approach is one of Velocity's great strengths, and allows for more
- maintainable and better designed web pages.
+ maintainable and better-designed web pages.
</p>
<p>
1.3 +42 -19 jakarta-velocity/xdocs/migration.xml
Index: migration.xml
===================================================================
RCS file: /home/cvs/jakarta-velocity/xdocs/migration.xml,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- migration.xml 2000/10/22 02:11:39 1.2
+++ migration.xml 2000/11/07 02:10:24 1.3
@@ -15,39 +15,62 @@
<s1 title="Converting Templates">
<p>
- We have tried to make using your existing templates with
- Velocity as simple as possible. Right now we only have a WebMacro
- to Velocity template converter, but we hope to have a
- Tea to Velocity template converter, and a FreeMarker to Velocity
- template converter.
+ Legacy documents are the bane of any software migration. The Velocity
+ Team has tried to ensure that existing templates can be converted
+ for use within Velocity in as painless a manner as possible.
+</p>
+
+<p>
+ Currently there is only a WebMacro to Velocity template converter, but
+ there are plans for a Tea to Velocity template converter, and a
+ FreeMarker to Velocity template converter.
</p>
+</s1>
+
+<s1 title="WebMacro to Velocity Template Converter">
+
<p>
- There is a script in the convert directory called
- convert-wm.sh that can convert a single WebMacro template
- to a Velocity template, or convert an entire directory
- structure of WebMacro templates to Velocity templates.
- To use the script simply provide the template, or directory
- of templates to convert:
+ The <pre>convert-wm.sh</pre> script in the <pre>convert</pre> directory
+ converts a single WebMacro template (<pre>*.wm</pre>) to a Velocity
+ template (<pre>*.vm</pre>), or converts an entire directory structure
+ of WebMacro templates to Velocity templates.
</p>
<p>
+ The <pre>convert-wm.sh</pre> script can convert a single
+ WebMacro template to a Velocity template.
+</p>
+
+<p>
<source><![CDATA[
- ./convert-wm.sh template.wm
-
- or
-
- ./convert-wm.sh templates
+ ./convert-wm.sh template.wm
]]></source>
</p>
<p>
This will produce a single Velocity template named
- template.vm, or a directory structure of templates
- named templates.vm. Your original templates are
- preserved.
+ <pre>template.vm</pre> from the WebMacro template <pre>template.wm</pre>.
+ The original WebMacro template will be preserved.
+</p>
+
+<p>
+ To convert an entire directory structure of WebMacro templates using
+ the <pre>convert-wm.sh</pre> script, simply include the directory
+ name instead of the template name, as indicated below.
</p>
+<p>
+ <source><![CDATA[
+ ./convert-wm.sh template.wm
+ ]]></source>
+</p>
+
+<p>
+ This will produce a directory structure of templates
+ named <pre>templates.vm</pre>. The original WebMacro templates will be
+ preserved during the conversion process.
+</p>
</s1>
</body>
1.15 +23 -20 jakarta-velocity/xdocs/user-guide.xml
Index: user-guide.xml
===================================================================
RCS file: /home/cvs/jakarta-velocity/xdocs/user-guide.xml,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -r1.14 -r1.15
--- user-guide.xml 2000/11/03 12:44:48 1.14
+++ user-guide.xml 2000/11/07 02:10:25 1.15
@@ -16,7 +16,7 @@
<p>
The Velocity User Guide is intended to help page designers and content
- providers get aquainted with Velocity and the syntax of its simple yet
+ providers get acquainted with Velocity and the syntax of its simple yet
powerful scripting language, the Velocity Template Language (VTL).
Many of the examples in this guide deal with using Velocity to embed
dynamic content in web sites, but all VTL examples are equally applicable
@@ -64,10 +64,10 @@
place orders for various types and quantities of mud. They
login to your site using their username and password, which allows them to
view their orders and buy more mud. Right now, Terracotta Mud is on sale, which
- is very popular. A minority of your customers regularly buy Bright Red
+ is very popular. A minority of your customers regularly buys Bright Red
Mud, which is also on sale, though not as popular and usually relegated
to the margin of your web page. Information about each customer is tracked
- in your database, so it occurs to you one day, Why not use Velocity to target
+ in your database, so one day the question arises, Why not use Velocity to target
special deals on mud to the customers who are most interested in those types of
mud?
</p>
@@ -115,7 +115,7 @@
</p>
<p>
- The extact details of the <pre>foreach</pre> statement will be described
+ The exact details of the <pre>foreach</pre> statement will be described
in greater depth shortly; what's important is the impact this short
script can have on your web site. When a customer with a
penchant for Bright Red Mud logs in, and Bright Red Mud
@@ -240,7 +240,7 @@
<p>
A single line comment begins with <pre>##</pre> and finishes at the end of the
line.
If you're going to write a few lines of commentary, there's no need to have
numerous
- single line comments. Multiline comments, which begin with <pre>#*</pre>
+ single line comments. Multi-line comments, which begin with <pre>#*</pre>
and end with <pre>*#</pre>, are available to handle this scenario.
</p>
@@ -268,16 +268,16 @@
<source><![CDATA[
This text is visible. ## This text is not.
This text is visible.
- This text is visible. #* This text, as part of a comment block, is not.
- This text is not visible; it is also part of the comment block.
- This text still not visible. *# This text is outside the comment block, so
+ This text is visible. #* This text, as part of a multi-line comment, is not
visible.
+ This text is not visible; it is also part of the multi-line comment.
+ This text still not visible. *# This text is outside the comment, so
it is visible.
## This text is not visible.
]]></source>
</p>
<p>
- There is a third type of comment, the VTL comment block, which ma y be used to
+ There is a third type of comment, the VTL comment block, which may be used to
store such information as the document author and versioning information:
</p>
@@ -496,7 +496,7 @@
<p>
There is ambiguity here, and Velocity assumes that $vicemaniac,
- not $vice, is the Identifer that you mean to use. Finding no
+ not $vice, is the Identifier that you mean to use. Finding no
value for $vicemaniac, it will return <pre>$vicemaniac</pre>.
Using formal notation can resolve this problem.
</p>
@@ -531,7 +531,7 @@
<p>
When the form initially loads, the variable
- reference <pre>$email</pre> has no value, but you prefer the
+ reference <pre>$email</pre> has no value, but you prefer
a blank text field to one with a value of "$email".
Using the quiet reference notation circumvents Velocity's
normal behavior; instead of using $email in the
@@ -689,7 +689,7 @@
</p>
<p>
- The left hand side (LHS) of the assigment must be
+ The left hand side (LHS) of the assignment must be
a variable reference or a property reference. The
right hand side (RHS) can be one of the following
types:
@@ -735,6 +735,12 @@
]]></source>
</p>
+ <p>
+ Unlike some directive that will be discussed below, the <pre>set</pre>
directive
+ does not have a <pre>#end</pre> statement. The <pre>set</pre> statement
<em>must</em>
+ end with a newline character (obtained by pressing Enter); it cannot be used
inline.
+ </p>
+
<s1 title="Conditionals">
<strong>If / ElseIf / Else</strong>
@@ -753,7 +759,7 @@
</p>
<p>
- The variable $foo is evaluated to see if it is true, which will happen
+ The variable $foo is evaluated to determine whether it is true, which will
happen
under one of two circumstances: (i) $foo is a boolean (true/false) which
has a true value, or (ii) the value is not null. The content between the
<pre>#if</pre> and the <pre>#end</pre> statements become the output if
@@ -786,7 +792,7 @@
<p>
In this example, $foo is greater than or equal to 10, so the Velocity
- Templating Engine makes the output of the if-ifelse-ifelse-else-end
+ Templating Engine makes the output of the if-statment
statement <strong>Go East</strong>. If $foo had a value of 10 and $bar
had a value of 6.1, then $foo is neither greater than 10 nor equal to
10, and $bar is not equal to 6. All if and elseif statements are false,
@@ -798,10 +804,7 @@
</p>
<p>
- Logical operators are not yet available in Velocity, but
- this functionality is expected to be added soon. There will be
- two kinds of logical operators: logical AND and
- logical OR. Below is an example of an if statement using
+ Two kinds of logical operators, logical AND and logical OR, are expected to
be added to Velocity soon. Below is an example of an if statement using
logical AND.
</p>
@@ -877,7 +880,7 @@
</p>
<p>
- The contents of the $allProducts variable is either a Vector, a Hashtable
+ The contents of the $allProducts variable is a Vector, a Hashtable
or an Array. The value assigned to the $product variable is a Java
Object and can be referenced from a variable as such. For example, if
$product was really a Product class in Java, its name could be retrieved
@@ -919,7 +922,7 @@
<s1 title="Macro">
<p>
With the #macro script element, the template designer can define a
- time-saving macro.
+ timesaving macro.
</p>
<p>
1.7 +12 -7 jakarta-velocity/xdocs/install.xml
Index: install.xml
===================================================================
RCS file: /home/cvs/jakarta-velocity/xdocs/install.xml,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- install.xml 2000/10/14 19:20:43 1.6
+++ install.xml 2000/11/07 02:10:25 1.7
@@ -15,6 +15,11 @@
<s1 title="Installation">
<p>
+ Velocity runs on a variety of platforms that have installed the Java 2 Virtual
Machine.
+ The J2SDK is required for users who want to compile Velocity from its source
code.
+</p>
+
+<p>
Everything required to build Velocity comes with the distribution, which
be obtained via <link
href="http://jakarta.apache.org/getinvolved/cvsindex.html">CVS</link>
or <link
href="http://jakarta.apache.org/builds/jakarta-velocity/nightly/">downloaded</link>.
@@ -25,7 +30,7 @@
<s1 title="Compiling">
<p>
- On Unix/Linux, sh to the velocity/build directory and execute the following
+ On Unix/Linux, sh to the <pre>velocity/build</pre> directory and execute the
following
script:
</p>
@@ -37,7 +42,7 @@
</p>
<p>
- On Windows, execute the following script in the velocity\build directory:
+ On Windows, execute the following script in the <pre>velocity\build</pre>
directory:
</p>
<p>
@@ -48,15 +53,15 @@
</p>
<p>
- Executing this script will create a "bin" directory within the Velocity
- distribution directory. The bin directory will contain the compiled class
- files (inside a "classes" directory) as well as a "velocity.jar" file.
+ Executing this script will create a <pre>bin</pre> directory within the Velocity
+ distribution directory. The <pre>bin</pre> directory will contain the compiled
class
+ files (inside a <pre>classes</pre> directory) as well as a
<pre>velocity.jar</pre> file.
Be sure to update your classpath to include Velocity's .jar file.
</p>
<p>
If you get a compiler error related to one or more packages that could not
- be found, ensure the build-velocity script you are using is edited to
+ be found, ensure the <pre>build-velocity</pre> script you are using is edited
to
properly specify the paths to each of the packages that could not be found.
</p>
@@ -65,7 +70,7 @@
<s1 title="Testing Your Installation">
<p>
- There are testing scripts in the velocity/examples directory.
+ There are testing scripts in the <pre>velocity/examples</pre> directory.
</p>
</s1>