<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | |
<html> | |
<head> | |
<title>Apache Velocity - Glossary</title> | |
<style type="text/css" media="all"> | |
@import url("./css/maven-base.css"); | |
@import url("./css/maven-theme.css"); | |
@import url("./css/site.css"); | |
</style> | |
<link rel="stylesheet" href="./css/print.css" type="text/css" media="print" /> | |
<link rel="alternate" href="http://feeds.feedburner.com/ApacheVelocitySiteNews" type="application/rss+xml" title="Apache Velocity - Glossary News" /> | |
<meta name="author" content="Velocity Documentation Team" /> | |
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> | |
</head> | |
<body class="composite"> | |
<div id="banner"> | |
<a href="../../../" id="bannerLeft"> | |
<img src="images/velocity_project_wide.png" alt="" /> | |
</a> | |
<span id="bannerRight"> | |
<img src="images/velocity-logo.png" alt="" /> | |
</span> | |
<div class="clear"> | |
<hr/> | |
</div> | |
</div> | |
<div id="breadcrumbs"> | |
<div class="xleft"> | |
<a href="http://www.apache.org/">Apache</a> | |
> | |
<a href="../../../">Velocity</a> | |
> | |
Velocity Engine | |
</div> | |
<div class="xright"> <a href="../../devel/">Engine</a> | |
| | |
<a href="../../../tools/devel/">Tools</a> | |
| | |
<a href="../../../anakia/devel/">Anakia</a> | |
| | |
<a href="../../../texen/devel/">Texen</a> | |
| | |
<a href="../../../docbook/">DocBook</a> | |
| | |
<a href="../../../dvsl/devel/">DVSL</a> | |
</div> | |
<div class="clear"> | |
<hr/> | |
</div> | |
</div> | |
<div id="leftColumn"> | |
<div id="navcolumn"> | |
<h5>Velocity</h5> | |
<ul> | |
<li class="none"> | |
<a href="index.html">General</a> | |
</li> | |
<li class="none"> | |
<a href="overview.html">Overview</a> | |
</li> | |
<li class="none"> | |
<a href="getting-started.html">Getting Started</a> | |
</li> | |
<li class="none"> | |
<a href="webapps.html">Web Applications</a> | |
</li> | |
<li class="none"> | |
<a href="../../../download.cgi">Download</a> | |
</li> | |
<li class="none"> | |
<a href="http://wiki.apache.org/velocity/VelocityFAQ">FAQ (Wiki)</a> | |
</li> | |
</ul> | |
<h5>Docs</h5> | |
<ul> | |
<li class="none"> | |
<a href="user-guide.html">User Guide</a> | |
</li> | |
<li class="none"> | |
<a href="developer-guide.html">Developer Guide</a> | |
</li> | |
<li class="none"> | |
<a href="vtl-reference-guide.html">VTL Reference</a> | |
</li> | |
<li class="none"> | |
<strong>Glossary</strong> | |
</li> | |
</ul> | |
<h5>Developers</h5> | |
<ul> | |
<li class="none"> | |
<a href="license.html">License</a> | |
</li> | |
<li class="none"> | |
<a href="apidocs/index.html">Javadoc</a> | |
</li> | |
<li class="none"> | |
<a href="changes-report.html">Changes</a> | |
</li> | |
<li class="none"> | |
<a href="jira-report.html">Resolved Issues</a> | |
</li> | |
<li class="none"> | |
<a href="upgrading.html">Upgrading</a> | |
</li> | |
<li class="none"> | |
<a href="jar-dependencies.html">Dependencies</a> | |
</li> | |
<li class="none"> | |
<a href="http://svn.apache.org/viewvc/velocity/engine/trunk/">Source Code Repository</a> | |
</li> | |
<li class="none"> | |
<a href="build.html">Building from Source</a> | |
</li> | |
</ul> | |
<h5>Community</h5> | |
<ul> | |
<li class="none"> | |
<a href="http://wiki.apache.org/velocity/">Wiki</a> | |
</li> | |
<li class="none"> | |
<a href="../../../news.html">Recent News</a> | |
</li> | |
<li class="none"> | |
<a href="http://wiki.apache.org/velocity/PoweredByVelocity">Powered By Velocity</a> | |
</li> | |
<li class="none"> | |
<a href="http://wiki.apache.org/velocity/VelocityEditors">IDE/Editor Plugins</a> | |
</li> | |
<li class="none"> | |
<a href="http://wiki.apache.org/velocity/PublishedArticlesAndBooks">Articles and Books</a> | |
</li> | |
<li class="none"> | |
<a href="http://wiki.apache.org/velocity/GetInvolved">Get Involved</a> | |
</li> | |
<li class="none"> | |
<a href="../../../contact.html">Mailing Lists</a> | |
</li> | |
</ul> | |
<h5>Velocity Development</h5> | |
<ul> | |
<li class="none"> | |
<a href="http://wiki.apache.org/velocity/RoadMap">Road Map</a> | |
</li> | |
<li class="none"> | |
<a href="http://wiki.apache.org/velocity/CodeStandards">Coding Standards</a> | |
</li> | |
<li class="none"> | |
<a href="http://wiki.apache.org/velocity/DocumentationGuidelines">Documentation Guidelines</a> | |
</li> | |
<li class="none"> | |
<a href="https://issues.apache.org/jira/browse/VELOCITY">Issues</a> | |
</li> | |
<li class="none"> | |
<a href="../../../who-we-are.html">Who we are</a> | |
</li> | |
</ul> | |
<h5>Translations</h5> | |
<ul> | |
<li class="none"> | |
<a href="http://www.jajakarta.org/velocity/">Site (Japanese)</a> | |
</li> | |
<li class="none"> | |
<a href="translations/user-guide_fi.html">User's Guide (Finnish)</a> | |
</li> | |
<li class="none"> | |
<a href="translations/user-guide_fr.html">User's Guide (French)</a> | |
</li> | |
<li class="none"> | |
<a href="translations/user-guide_es.html">User's Guide (Spanish)</a> | |
</li> | |
</ul> | |
<h5>Project Documentation</h5> | |
<ul> | |
<li class="collapsed"> | |
<a href="project-info.html">Project Information</a> | |
</li> | |
<li class="collapsed"> | |
<a href="project-reports.html">Project Reports</a> | |
</li> | |
</ul> | |
<a class="poweredBy" href="../../../" title="Apache Velocity" ><img class="poweredBy" alt="Apache Velocity" src="images/pbv90x30.png" /></a> | |
<a class="poweredBy" href="../../../rss/news.rss" title="Velocity News Feed" ><img class="poweredBy" alt="Velocity News Feed" src="images/feed-icon-24x24.jpg" /></a> | |
<iframe src="http://www.apache.org/ads/buttonbar.html" | |
style="border-width:0; float: left" frameborder="0" scrolling="no" | |
width="135" | |
height="265" ></iframe> | |
</div> | |
</div> | |
<div id="bodyColumn"> | |
<div id="contentBox"> | |
<div class="section"><h2><a name="Velocity_Terms_and_Abbreviations"></a> | |
Velocity Terms and Abbreviations</h2> | |
<dl><dt><a name="anakia">Anakia</a> | |
</dt> | |
<dd>An XML transformation tool that uses JDOM and Velocity to transform | |
XML documents into the format of your choice.</dd> | |
<dt><a name="blockdirective">Block Directive</a> | |
</dt> | |
<dd>A <a href="#directive">directive</a> | |
that spans multiple lines. | |
The block starts with a block directive such as | |
<code><a href="#if">#if</a> | |
</code>, | |
<code><a href="#foreach">#foreach</a> | |
</code>, or | |
<code><a href="#macro">#macro</a> | |
</code> and ends with the | |
<code><a href="#end">#end</a> | |
</code> directive.</dd> | |
<dt><a name="comment">Comment</a> | |
</dt> | |
<dd>Allow descriptive text to be included in the template that will | |
not be placed into the output of the template engine. Single line | |
comments begin with <code>##</code>. Multi-line comments begin with | |
<code>#*</code> and end with <code>*#</code></dd> | |
<dt><a name="context">Context</a> | |
</dt> | |
<dd>A means to import Java objects into a <a href="#velocity">Velocity</a> | |
<a href="#template">template</a> | |
.</dd> | |
<dt><a name="directive">Directive</a> | |
</dt> | |
<dd>Easy to use "active" elements that manipulate template output. | |
There are both <a href="#linedirective">line</a> | |
and | |
<a href="#blockdirective">block</a> | |
directives.</dd> | |
<dt><a name="docbookframework">DocBook Framework</a> | |
</dt> | |
<dd>A framework inteded to help create high quality documentation | |
suitable for online viewing and printing.</dd> | |
<dt><a name="dvsl">DVSL</a> | |
</dt> | |
<dd>Declarative Velocity Style Language. A tool modeled after XSLT | |
that is used for general XML transformations using the | |
<a href="#vtl">VTL</a> | |
as the templating language.</dd> | |
<dt><a name="else">#else</a> | |
</dt> | |
<dd>A <a href="#directive">directive</a> | |
that must be used with | |
an <code><a href="#if">#if</a> | |
</code>. It allows text to be included | |
only if the <code>#if</code> was false.</dd> | |
<dt><a name="elseif">#elseif</a> | |
</dt> | |
<dd>A <a href="#directive">directive</a> | |
that must be used with | |
an <code><a href="#if">#if</a> | |
</code>. It allows text to be included | |
if the <code>#if</code> was false and if its own statement is true.</dd> | |
<dt><a name="equivalentoperator">Equivalence Operator</a> | |
</dt> | |
<dd><code>==</code> Used to directly compare numbers, strings, or objects. | |
If the objects that are being compared are different classes, | |
<code>toString()</code> is called first and then they are compared.</dd> | |
<dt><a name="end">#end</a> | |
</dt> | |
<dd>Ends block <a href="#directive">directives</a> | |
such as | |
<a href="#if">#if</a> | |
, <a href="#foreach">#foreach</a> | |
and | |
<a href="#macro">#macro</a> | |
.</dd> | |
<dt><a name="escaping">Escaping</a> | |
</dt> | |
<dd>Removing the special meaning of a <code>#</code> or <code>$</code> | |
so that you can use these characters without <a href="#velocity">Velocity</a> | |
interpretting it as the start of a <a href="#reference">reference</a> | |
or | |
<a href="#directive">directive</a> | |
. Escaping is done by putting a | |
<code>\</code> character before the <code>#</code> or <code>$</code>.</dd> | |
<dt><a name="foreach">#foreach</a> | |
</dt> | |
<dd>A <a href="#directive">directive</a> | |
that allows you to repeat | |
something on every value in a Collection, Array, Iterable, Map or | |
(as of Velocity 1.6+) object with a <code>public Iterator iterator()</code> | |
method.</dd> | |
<dt><a name="include">#include</a> | |
</dt> | |
<dd>A <a href="#directive">directive</a> | |
that allows the template | |
designer to import a local file, which is then inserted into the | |
location where the <code>#include</code> directive is defined. | |
Multiple files may be included by seperating the file names with | |
commas.</dd> | |
<dt><a name="identifier">Identifier</a> | |
</dt> | |
<dd>The name of a <a href="#variable">variable</a> | |
. Identifiers must | |
start with an alphabetic character (a .. z, A .. Z). The rest of the | |
characters are limited to alphabetic, numberic (0 .. 9), hyphens ("-"), | |
and underscores ("_").</dd> | |
<dt><a name="if">#if</a> | |
</dt> | |
<dd>A <a href="#directive">directive</a> | |
that allows for text to | |
only be included if a statement is true.</dd> | |
<dt><a name="formalreferencenotation">Formal Reference Notation</a> | |
</dt> | |
<dd>A notation for <a href="#reference">references</a> | |
that is more | |
formal than the shorthand. The formal notation consists of a | |
<code>$</code> character followed by a <code>{</code> character and | |
then the identifiers used in the shorthand notation and then a | |
<code>}</code> character. Formal notation is often useful when | |
references are directly adjacent to text in a template.</dd> | |
<dt><a name="lhs">LHS</a> | |
</dt> | |
<dd>Left Hand Side of an assignment</dd> | |
<dt><a name="linedirective">Line Directive</a> | |
</dt> | |
<dd>A <a href="#directive">directive</a> | |
that is done all on one | |
line, such as <code><a href="#set">#set</a> | |
</code>.</dd> | |
<dt><a name="literal">Literal</a> | |
</dt> | |
<dd>A string enclosed in double quotes</dd> | |
<dt><a name="macro">#macro</a> | |
</dt> | |
<dd>See <a href="#velocimacro">Velocimacro</a> | |
.</dd> | |
<dt><a name="method">Method</a> | |
</dt> | |
<dd>A type of <a href="#reference">reference</a> | |
. Methods are | |
defined in the Java code and are capable of doing something useful. | |
The shorthand notation consists of a leading <code>$</code> character | |
followed by an <a href="#identifier">identifier</a> | |
, folowed by a | |
<a href="#vtlmethodbody">VTL Method Body</a> | |
.</dd> | |
<dt><a name="mvc">MVC</a> | |
</dt> | |
<dd>Model-View-Controller design pattern. Allows web page designers | |
to focus on creating a well-designed site and allows programmers to | |
focus on writing good code</dd> | |
<dt><a name="parse">#parse</a> | |
</dt> | |
<dd>A <a href="#directive">directive</a> | |
that includes a local file | |
that contains <a href="#vtl">VTL</a> | |
. <a href="#velocity">Velocity</a> | |
then parses the VTL and renders the template.</dd> | |
<dt><a name="property">Property</a> | |
</dt> | |
<dd>A type of <a href="#reference">reference</a> | |
. The shorthand | |
notation consists of a leading <code>$</code> character followed | |
by an <a href="#identifier">identifier</a> | |
, followed by a | |
<code>.</code> character and another identifier.</dd> | |
<dt><a name="quietreferencenotation">Quiet Reference Notation</a> | |
</dt> | |
<dd>Another notation for <a href="#reference">references</a> | |
. A | |
<code>!</code> character is inserted between the <code>$</code> | |
and the <a href="#identifier">identifier</a> | |
. This overrides | |
<a href="#velocity">Velocity</a> | |
's default behavior if the reference | |
is undefined. Normally, if a reference is undefined, the name of the | |
reference that was given is used instead. With this notation, a blank | |
text field is used.</dd> | |
<dt><a name="reference">Reference</a> | |
</dt> | |
<dd>Begins with <code>$</code> and are used to get something. | |
There are three types: <a href="#variables">variables</a> | |
, | |
<a href="#properties">properties</a> | |
, and | |
<a href="#methods">methods</a> | |
.</dd> | |
<dt><a name="resource">Resource</a> | |
</dt> | |
<dd>A general text resource that can be loaded from a variety | |
of sources using a <a href="#resourceloader">Resource Loader</a> | |
.</dd> | |
<dt><a name="resourceloader">Resource Loader</a> | |
</dt> | |
<dd>A class used by a <a href="#velocityengine">Velocity Engine</a> | |
to load resources from the file system, classpath, URLs or even a | |
database depending on the implementation.</dd> | |
<dt><a name="rhs">RHS</a> | |
</dt> | |
<dd>Right Hand Side of an assignment</dd> | |
<dt><a name="set">#set</a> | |
</dt> | |
<dd>The <a href="#directive">directive</a> | |
that is used for setting | |
the value of a reference.</dd> | |
<dt><a name="stop">#stop</a> | |
</dt> | |
<dd>A <a href="#directive">directive</a> | |
that stops the execution | |
of the template engine. <code>#stop</code> is useful for debugging | |
templates.</dd> | |
<dt><a name="stringinterpolation">String Interpolation</a> | |
</dt> | |
<dd>Using a variable inside of a string. For example, | |
<code>"Hello $name"</code> would be "Hello" and then whatever | |
value is stored in <code>$name</code>.</dd> | |
<dt><a name="template">Template</a> | |
</dt> | |
<dd>A file containing code in a | |
<a href="#template language">template language</a> | |
such as the | |
<a href="#vtl">VTL</a> | |
that can be run through a | |
<a href="#templateengine">template engine</a> | |
like | |
<a href="#velocity">Velocity</a> | |
to produce dynamic output.</dd> | |
<dt><a name="templateengine">Template Engine</a> | |
</dt> | |
<dd>An engine that merges a <a href="#context">context</a> | |
with a | |
<a href="#template">template</a> | |
to produce output.</dd> | |
<dt><a name="templatelanguage">Template Language</a> | |
</dt> | |
<dd>A language such as the <a href="#vtl">VTL</a> | |
that can be used | |
to create <a href="#template">templates</a> | |
.</dd> | |
<dt><a name="texen">Texen</a> | |
</dt> | |
<dd>Texen is a general purpose text generating utility that | |
is driven by Ant.</dd> | |
<dt><a name="tool">Tool</a> | |
</dt> | |
<dd>A plain old Java object that is useful in a template but it | |
is not meant to be rendered in output. Tools are meant to be used | |
but not to be seen.</dd> | |
<dt><a name="turbine">Turbine</a> | |
</dt> | |
<dd>A servlet based framework that allows experienced Java | |
developers to quickly build web applications. Turbine allows | |
you to personalize the web sites and to use user logins to | |
restrict access to parts of your application.</dd> | |
<dt><a name="variable">Variable</a> | |
</dt> | |
<dd>A type of <a href="#reference">reference</a> | |
. Variables | |
represents values that can change. The shorthand notation | |
consists of a leading <code>$</code> character followed by | |
an <a href="#identifier">identifier</a> | |
</dd> | |
<dt><a name="velocimacro">Velocimacro</a> | |
</dt> | |
<dd>The <code><a href="#macro">#macro</a> | |
</code><a href="#directive">directive</a> | |
allows designers to define | |
a repeated segment of template. To create a macro "d", you | |
would use <code>#macro(d)</code> followed by the segment of | |
template followed by <code><a href="#end">#end</a> | |
</code>. | |
Macros can have as many arguments as necessary by adding them | |
inside the parentheses such as <code>#macro(d $arg1 $arg2)</code>.</dd> | |
<dt><a name="velocity">Velocity</a> | |
</dt> | |
<dd>A Java-based <a href="#templateengine">template engine</a> | |
.</dd> | |
<dt><a name="velocityengine">VelocityEngine</a> | |
</dt> | |
<dd>The engine that generates web pages and other output from | |
<a href="#template">templates</a> | |
containing VTL code.</dd> | |
<dt><a name="velocitysingleton">Velocity Singleton</a> | |
</dt> | |
<dd>A singleton wrapper around a | |
<a href="#velocityengine">Velocity engine</a> | |
that is shared | |
across the JVM (or ClassLoader) and may thus be referenced | |
directly without needing to pass an instance around. This allows | |
localized configuration and sharing of resources.</dd> | |
<dt><a name="velocitytools">VelocityTools</a> | |
</dt> | |
<dd>A collection of <a href="#tool">Tools</a> | |
and infrastructure to | |
easily, automatically and transparently make tools and static data | |
available to Velocity templates.</dd> | |
<dt><a name="vtl">VTL</a> | |
</dt> | |
<dd>Velocity Template Language. The powerful template language | |
that is used with <a href="#velocity">Velocity</a> | |
.</dd> | |
<dt><a name="vtlmethodcall">VTL Method Call</a> | |
</dt> | |
<dd>Consists of an <a href="#identifier">identifier</a> | |
followed | |
by a <code>(</code> character, followed by an optional parameter | |
list, followed by a <code>)</code> character. <a href="#vtl">VTL</a> | |
allows template designers to call any public method declared in | |
a public class on values placed in the <a href="#context">context</a> | |
.</dd> | |
</dl> | |
</div> | |
</div> | |
</div> | |
<div class="clear"> | |
<hr/> | |
</div> | |
<div id="footer"> | |
<div class="xright">© | |
2000-2008 | |
The Apache Software Foundation | |
Last Published: 2008-12-15 08:38:22 | |
</div> | |
<div class="clear"> | |
<hr/> | |
</div> | |
</div> | |
</body> | |
</html> |