Author: wglass
Date: Tue Feb 15 00:37:55 2005
New Revision: 153920
URL: http://svn.apache.org/viewcvs?view=rev&rev=153920
Log:
get rid of bad eols. made minor changes to docs, then committed.
http://issues.apache.org/bugzilla/show_bug.cgi?id=33209
Modified:
jakarta/velocity/trunk/xdocs/design.xml
jakarta/velocity/trunk/xdocs/getting-started.xml
jakarta/velocity/trunk/xdocs/migration.xml
jakarta/velocity/trunk/xdocs/specification-ast.xml
jakarta/velocity/trunk/xdocs/specification-bnf.xml
jakarta/velocity/trunk/xdocs/specification.xml
jakarta/velocity/trunk/xdocs/todo.xml
Modified: jakarta/velocity/trunk/xdocs/design.xml
URL:
http://svn.apache.org/viewcvs/jakarta/velocity/trunk/xdocs/design.xml?view=diff&r1=153919&r2=153920
==============================================================================
--- jakarta/velocity/trunk/xdocs/design.xml (original)
+++ jakarta/velocity/trunk/xdocs/design.xml Tue Feb 15 00:37:55 2005
@@ -1,83 +1,84 @@
-<?xml version="1.0"?>
-
-<document>
-
- <properties>
- <title>Velocity Design</title>
- <author email="[EMAIL PROTECTED]">Velocity Documentation Team</author>
- </properties>
-
- <body>
-
- <section name="Design">
-
- <p>
- Velocity is a Java-based template engine. It can be used as a
- standalone utility for generating source code, HTML, reports,
- or it can be combined with other systems to provide template
- services. Velocity will be tightly integrated with the
- <a href="http://java.apache.org/turbine">Turbine</a>
- web application framework. Velocity-Turbine
- provide a template service by which web applications may be
- developed according to a true MVC model.
- </p>
-
- <p>
- Velocity has a myriad of potential uses -- generating SQL, PostScript,
- or Java source code from templates -- but web developers looking for
- a viable alternative to
- <a href="http://www.php.net/">PHP</a> and
- <a href="http://java.sun.com/products/jsp/">Java
- Server Pages</a> (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
- 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
- objects from the Context and insert these into a web page as text
- values. The web designer has some control over looping (for each)
- and conditional statements (if/else).
- </p>
-
- <p>
- Velocity enforces a Model-View-Controller (MVC) style of development
- by separating Java code from HTML template code. Unlike JSPs,
- 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.
- </p>
-
- <p>
- Although MVC-style development can sometimes lead to longer incubation
- periods for web sites, particularly if the developers involved are new
- to MVC, this approach saves time over the long term (believe us, we have
- been doing this for a long time now). The MVC abstraction prevents web page
- designers from messing with a software engineer's Java code, and
- programmers from unduly influencing the look of web sites. Velocity
enforces
- a contract that defines what roles people play in the web site development
- process.
- </p>
-
- <p>
- Velocity uses a grammar-based parser generated by
- <a href="http://www.metamata.com/javacc/">JavaCC</a> (Java Compiler
- Compiler) using the JJTree extension to create an Abstract Syntax Tree.
- </p>
-
- <p>
- Velocity's design concept is borrowed from <a
- href="http://www.webmacro.org/">WebMacro</a>. Those involved in the
- Velocity project acknowledge and appreciate the development and design work
- that went into the WebMacro project.
- </p>
-
-</section>
-
-</body>
-</document>
+<?xml version="1.0"?>
+
+<document>
+
+ <properties>
+ <title>Velocity Design</title>
+ <author email="[EMAIL PROTECTED]">Velocity Documentation Team</author>
+ </properties>
+
+ <body>
+
+
+ <section name="Design">
+
+ <p>
+ Velocity is a Java-based template engine. It can be used as a
+ standalone utility for generating source code, HTML, reports,
+ or it can be combined with other systems to provide template
+ services. Velocity will be tightly integrated with the
+ <a href="http://java.apache.org/turbine">Turbine</a>
+ web application framework. Velocity-Turbine
+ provide a template service by which web applications may be
+ developed according to a true MVC model.
+ </p>
+
+ <p>
+ Velocity has a myriad of potential uses -- generating SQL, PostScript,
+ or Java source code from templates -- but web developers looking for
+ a viable alternative to
+ <a href="http://www.php.net/">PHP</a> and
+ <a href="http://java.sun.com/products/jsp/">Java
+ Server Pages</a> (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
+ 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
+ objects from the Context and insert these into a web page as text
+ values. The web designer has some control over looping (for each)
+ and conditional statements (if/else).
+ </p>
+
+ <p>
+ Velocity enforces a Model-View-Controller (MVC) style of development
+ by separating Java code from HTML template code. Unlike JSPs,
+ 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.
+ </p>
+
+ <p>
+ Although MVC-style development can sometimes lead to longer incubation
+ periods for web sites, particularly if the developers involved are new
+ to MVC, this approach saves time over the long term (believe us, we have
+ been doing this for a long time now). The MVC abstraction prevents web page
+ designers from messing with a software engineer's Java code, and
+ programmers from unduly influencing the look of web sites. Velocity
enforces
+ a contract that defines what roles people play in the web site development
+ process.
+ </p>
+
+ <p>
+ Velocity uses a grammar-based parser generated by
+ <a href="http://www.metamata.com/javacc/">JavaCC</a> (Java Compiler
+ Compiler) using the JJTree extension to create an Abstract Syntax Tree.
+ </p>
+
+ <p>
+ Velocity's design concept is borrowed from <a
+ href="http://www.webmacro.org/">WebMacro</a>. Those involved in the
+ Velocity project acknowledge and appreciate the development and design work
+ that went into the WebMacro project.
+ </p>
+
+</section>
+
+</body>
+</document>
Modified: jakarta/velocity/trunk/xdocs/getting-started.xml
URL:
http://svn.apache.org/viewcvs/jakarta/velocity/trunk/xdocs/getting-started.xml?view=diff&r1=153919&r2=153920
==============================================================================
--- jakarta/velocity/trunk/xdocs/getting-started.xml (original)
+++ jakarta/velocity/trunk/xdocs/getting-started.xml Tue Feb 15 00:37:55 2005
@@ -1,78 +1,79 @@
-<?xml version="1.0"?>
-
-<document>
-
- <properties>
- <title>Velocity Getting Started</title>
- <author email="[EMAIL PROTECTED]">Velocity Documentation Team</author>
- </properties>
-
-<body>
-
-<section name="Getting Started">
-
-<p>
- It's easy to get started with Velocity. The best places to start are
-
- <ul>
- <li>
- The <a href="user-guide.html">User's Guide</a>, which provides a good
- overview of what Velocity templates are all about.
- </li>
- <li>
- The <a href="developer-guide.html">Developer's Guide</a>, which provides
- a good reference and discussion of incorporating Velocity into your Java
- programs and servlets.
- </li>
- <li>
- The <a href="vtl-reference-guide.html">VTL Reference Guide</a>, which is
a reference
- guide for VTL, the Velocity Template Language.
- </li>
- <li>
- The <a href="design.html">Design</a> document, which provides a
high-level overview
- of the how Velocity works, and why it's important.
- </li>
- </ul>
-
- And of course, the best place to start is with the examples provided with
the distribution,
- and the source code itself, which is included.
-</p>
-
-<p>
- Instructions for downloading and installing Velocity can be found on the
- <a href="install.html">Install</a> document.
-</p>
-
-</section>
-
-<section name="API Documentation">
-
-<p>
-Our API documentation is available <a href="api/index.html">online</a>,
-as part of the distribution package, and of course, you can generate it
-yourself from the included sources.
-</p>
-<p>
- If you would like to create a full set
- of detailed API documentation for Velocity, go to the
- <code>build</code> directory and run:
-</p>
-
-<source><![CDATA[
-ant javadocs
-]]></source>
-
-<p>
-The docs will be found in the <code>/docs/apidocs/</code> directory.
-</p>
-
-<p>
-<b>Note:</b> Velocity uses the <a
href="http://jakarta.apache.org/ant/">Jakarta Ant</a>
-build tool for all code and documentation generation, so you will need to have
it
-installed. We strongly endorse this wonderful tool for any Java developer.
- </p>
-
-</section>
-
-</body>
-</document>
+<?xml version="1.0"?>
+
+<document>
+
+ <properties>
+ <title>Velocity Getting Started</title>
+ <author email="[EMAIL PROTECTED]">Velocity Documentation Team</author>
+ </properties>
+
+<body>
+
+
+<section name="Getting Started">
+
+<p>
+ It's easy to get started with Velocity. The best places to start are
+
+ <ul>
+ <li>
+ The <a href="user-guide.html">User's Guide</a>, which provides a good
+ overview of what Velocity templates are all about.
+ </li>
+ <li>
+ The <a href="developer-guide.html">Developer's Guide</a>, which provides
+ a good reference and discussion of incorporating Velocity into your Java
+ programs and servlets.
+ </li>
+ <li>
+ The <a href="vtl-reference-guide.html">VTL Reference Guide</a>, which is
a reference
+ guide for VTL, the Velocity Template Language.
+ </li>
+ <li>
+ The <a href="design.html">Design</a> document, which provides a
high-level overview
+ of the how Velocity works, and why it's important.
+ </li>
+ </ul>
+
+ And of course, the best place to start is with the examples provided with
the distribution,
+ and the source code itself, which is included.
+</p>
+
+<p>
+ Instructions for downloading and installing Velocity can be found on the
+ <a href="install.html">Install</a> document.
+</p>
+
+</section>
+
+<section name="API Documentation">
+
+<p>
+Our API documentation is available <a href="api/index.html">online</a>,
+as part of the distribution package, and of course, you can generate it
+yourself from the included sources.
+</p>
+<p>
+ If you would like to create a full set
+ of detailed API documentation for Velocity, go to the
+ <code>build</code> directory and run:
+</p>
+
+<source><![CDATA[
+ant javadocs
+]]></source>
+
+<p>
+The docs will be found in the <code>/docs/apidocs/</code> directory.
+</p>
+
+<p>
+<b>Note:</b> Velocity uses the <a
href="http://jakarta.apache.org/ant/">Jakarta Ant</a>
+build tool for all code and documentation generation, so you will need to have
it
+installed. We strongly endorse this wonderful tool for any Java developer.
+ </p>
+
+</section>
+
+</body>
+</document>
Modified: jakarta/velocity/trunk/xdocs/migration.xml
URL:
http://svn.apache.org/viewcvs/jakarta/velocity/trunk/xdocs/migration.xml?view=diff&r1=153919&r2=153920
==============================================================================
--- jakarta/velocity/trunk/xdocs/migration.xml (original)
+++ jakarta/velocity/trunk/xdocs/migration.xml Tue Feb 15 00:37:55 2005
@@ -1,72 +1,73 @@
-<?xml version="1.0"?>
-
-<document>
-
- <properties>
- <title>Migration To Velocity</title>
- <author email="[EMAIL PROTECTED]">Velocity Documentation Team</author>
- </properties>
-
-<body>
-
-<section name="Converting Templates">
-
-<p>
- 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>
-
-</section>
-
-<section name="WebMacro to Velocity Template Converter">
-
-<p>
- The <code>convert-wm.sh</code> script in the <code>convert</code>
- directory converts a single WebMacro template (<code>*.wm</code>) to
- a Velocity template (<code>*.vm</code>), or converts an entire
- directory structure of WebMacro templates to Velocity templates.
-</p>
-
-<p>
- The <code>convert-wm.sh</code> script can convert a single WebMacro
- template to a Velocity template.
-</p>
-
-<source><![CDATA[
-./convert-wm.sh template.wm
-]]></source>
-
-<p>
- This will produce a single Velocity template named
- <code>template.vm</code> from the WebMacro template
- <code>template.wm</code>. The original WebMacro template will be
- preserved.
-</p>
-
-<p>
- To convert an entire directory structure of WebMacro templates using
- the <code>convert-wm.sh</code> script, simply include the directory
- name instead of the template name, as indicated below.
-</p>
-
-<source><![CDATA[
-./convert-wm.sh templates
-]]></source>
-
-<p>
- This will produce a directory structure of templates named
- <code>templates/[template].vm</code>. The original WebMacro templates
- will be preserved during the conversion process.
-</p>
-</section>
-
-</body>
-</document>
+<?xml version="1.0"?>
+
+<document>
+
+ <properties>
+ <title>Migration To Velocity</title>
+ <author email="[EMAIL PROTECTED]">Velocity Documentation Team</author>
+ </properties>
+
+<body>
+
+
+<section name="Converting Templates">
+
+<p>
+ 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>
+
+</section>
+
+<section name="WebMacro to Velocity Template Converter">
+
+<p>
+ The <code>convert-wm.sh</code> script in the <code>convert</code>
+ directory converts a single WebMacro template (<code>*.wm</code>) to
+ a Velocity template (<code>*.vm</code>), or converts an entire
+ directory structure of WebMacro templates to Velocity templates.
+</p>
+
+<p>
+ The <code>convert-wm.sh</code> script can convert a single WebMacro
+ template to a Velocity template.
+</p>
+
+<source><![CDATA[
+./convert-wm.sh template.wm
+]]></source>
+
+<p>
+ This will produce a single Velocity template named
+ <code>template.vm</code> from the WebMacro template
+ <code>template.wm</code>. The original WebMacro template will be
+ preserved.
+</p>
+
+<p>
+ To convert an entire directory structure of WebMacro templates using
+ the <code>convert-wm.sh</code> script, simply include the directory
+ name instead of the template name, as indicated below.
+</p>
+
+<source><![CDATA[
+./convert-wm.sh templates
+]]></source>
+
+<p>
+ This will produce a directory structure of templates named
+ <code>templates/[template].vm</code>. The original WebMacro templates
+ will be preserved during the conversion process.
+</p>
+</section>
+
+</body>
+</document>
Modified: jakarta/velocity/trunk/xdocs/specification-ast.xml
URL:
http://svn.apache.org/viewcvs/jakarta/velocity/trunk/xdocs/specification-ast.xml?view=diff&r1=153919&r2=153920
==============================================================================
--- jakarta/velocity/trunk/xdocs/specification-ast.xml (original)
+++ jakarta/velocity/trunk/xdocs/specification-ast.xml Tue Feb 15 00:37:55 2005
@@ -1,170 +1,171 @@
-<?xml version="1.0"?>
-
-<document>
-
- <properties>
- <title>Velocity Specification - AST</title>
- <author email="[EMAIL PROTECTED]">Velocity Documentation Team</author>
- </properties>
-
-<body>
-
-<section name="Velocity Specification - AST">
-
-<p>
-Please note that this is currently out of date and will be updated soon.
-</p>
-
-<source><![CDATA[
-This is tentatively the AST structure for Velocity.
-
-The structure is as would be described using ANTLR
-BNF-style notation. A tree is described by
-#(node node node) where #() represents the tree form.
-The first node is the root of the tree, and following
-nodes are all children.
-
-Visually, #(A B C D E) might look like:
-
- A
- |
- B-C-D-E
-
-Root nodes must always be a terminal node, denoted by
-an all-caps identifier.
-
-Non-root nodes may be either terminal nodes, or sub-rules,
-or inlined sub-trees.
-
-A sub-rule might describe a tree, or simple a node.
-
-
-block
- :
- #( BLOCK
- (statement)*
- )
-
- ;
-statement
- :
- text
- | if_statement
- | foreach_statement
- | include_statement
- | set_statement
- | parse_statement
- | param_statement
- | stop_statement
- | reference
- ;
-
-
-text
- :
- TEXT
- ;
-
-// if/elseif/else chains should be represented solely
-// by <if_statement>. <elseif> is simply an <if_statement>
-// in the false-branch of the preceeding <if_statement>
-// while <else> is simply an <if_statement> where the
-// <expr> evaluates to TRUE always, and no false-branch
-// is provided.
-
-if_statement
- :
- #( IF
- // The expression to test
- expr
-
- // True branch
- block
-
- // False branch
- ( block )?
- )
- ;
-
-foreach_statement
- :
- #( FOREACH
- // Value to assign for each iteration
- reference
- // List of objects to iterator
- reference
- // command-block to execute
- ( block )?
- )
- ;
-
-set_statement
- :
- #( SET
- // Variable to set
- reference
- // Value to assign
- expr
- ;
-
-parse_statement
- :
- #( PARSE
- STRING_LITERAL
- )
- ;
-
-include_statement
- :
- #( INCLUDE
- STRING_LITERAL
- )
- ;
-
-stop_statement
- :
- STOP
- ;
-
-reference
- :
- #( REFERENCE
- postfix
- ;
-
-postfix
- :
- method_call
- |
- member
- |
- identifier
- ;
-
-member
- :
- #( DOT
- identifier
- ( primary
- | method_call
- )
- ;
-
-primary
- :
- IDENTIFIER
- ;
-
-method_call
- #( CALL
- postfix
- // The argument list
- ( expr ) *
- )
- ;
-]]></source>
-
-</section>
-
-</body>
-</document>
+<?xml version="1.0"?>
+
+<document>
+
+ <properties>
+ <title>Velocity Specification - AST</title>
+ <author email="[EMAIL PROTECTED]">Velocity Documentation Team</author>
+ </properties>
+
+
+<body>
+
+<section name="Velocity Specification - AST">
+
+<p>
+Please note that this is currently out of date and will be updated soon.
+</p>
+
+<source><![CDATA[
+This is tentatively the AST structure for Velocity.
+
+The structure is as would be described using ANTLR
+BNF-style notation. A tree is described by
+#(node node node) where #() represents the tree form.
+The first node is the root of the tree, and following
+nodes are all children.
+
+Visually, #(A B C D E) might look like:
+
+ A
+ |
+ B-C-D-E
+
+Root nodes must always be a terminal node, denoted by
+an all-caps identifier.
+
+Non-root nodes may be either terminal nodes, or sub-rules,
+or inlined sub-trees.
+
+A sub-rule might describe a tree, or simple a node.
+
+
+block
+ :
+ #( BLOCK
+ (statement)*
+ )
+
+ ;
+statement
+ :
+ text
+ | if_statement
+ | foreach_statement
+ | include_statement
+ | set_statement
+ | parse_statement
+ | param_statement
+ | stop_statement
+ | reference
+ ;
+
+
+text
+ :
+ TEXT
+ ;
+
+// if/elseif/else chains should be represented solely
+// by <if_statement>. <elseif> is simply an <if_statement>
+// in the false-branch of the preceeding <if_statement>
+// while <else> is simply an <if_statement> where the
+// <expr> evaluates to TRUE always, and no false-branch
+// is provided.
+
+if_statement
+ :
+ #( IF
+ // The expression to test
+ expr
+
+ // True branch
+ block
+
+ // False branch
+ ( block )?
+ )
+ ;
+
+foreach_statement
+ :
+ #( FOREACH
+ // Value to assign for each iteration
+ reference
+ // List of objects to iterator
+ reference
+ // command-block to execute
+ ( block )?
+ )
+ ;
+
+set_statement
+ :
+ #( SET
+ // Variable to set
+ reference
+ // Value to assign
+ expr
+ ;
+
+parse_statement
+ :
+ #( PARSE
+ STRING_LITERAL
+ )
+ ;
+
+include_statement
+ :
+ #( INCLUDE
+ STRING_LITERAL
+ )
+ ;
+
+stop_statement
+ :
+ STOP
+ ;
+
+reference
+ :
+ #( REFERENCE
+ postfix
+ ;
+
+postfix
+ :
+ method_call
+ |
+ member
+ |
+ identifier
+ ;
+
+member
+ :
+ #( DOT
+ identifier
+ ( primary
+ | method_call
+ )
+ ;
+
+primary
+ :
+ IDENTIFIER
+ ;
+
+method_call
+ #( CALL
+ postfix
+ // The argument list
+ ( expr ) *
+ )
+ ;
+]]></source>
+
+</section>
+
+</body>
+</document>
Modified: jakarta/velocity/trunk/xdocs/specification-bnf.xml
URL:
http://svn.apache.org/viewcvs/jakarta/velocity/trunk/xdocs/specification-bnf.xml?view=diff&r1=153919&r2=153920
==============================================================================
--- jakarta/velocity/trunk/xdocs/specification-bnf.xml (original)
+++ jakarta/velocity/trunk/xdocs/specification-bnf.xml Tue Feb 15 00:37:55 2005
@@ -1,171 +1,172 @@
-<?xml version="1.0"?>
-
-<document>
-
- <properties>
- <title>Velocity Specification - BNF</title>
- <author email="[EMAIL PROTECTED]">Velocity Documentation Team</author>
- </properties>
-
-<body>
-
-<section name="Velocity Specification - BNF">
-
-<p>
-Please note that this is currently out of date and will be updated soon.
-</p>
-
-<source><![CDATA[
-This is a tentative BNF for Velocity, right now this is
-pretty much the WM syntax. This might change, as arithmetic
-might not make it into the syntax, and the future
-velocity syntax will more then likely remove block
-markers and instead use an "#end" token to signify
-the end of a directive.
-
-
-<statement>
-
- ::= <text>
- | <block>
- | <if-statement>
- | <else-if-statement>
- | <foreach-statement>
- | <include-statement>
- | <set-statement>
- | <parse-statement>
- | <param-statment>
- | <stop-statement>
- | <reference>
-
-<block>
-
- ::= "#begin" { <expresion> } "#end"
-
-<if-statement>
-
- ::= "#if" "(" <expresion> ")" <statement> [ <else-statement> ]
-
-
-<else-if-statement>
-
- ::= "#elseif" "(" <expresion> ")" <statement> [ <else-statement> ]
-
-<foreach-statement>
-
- ::= "#foreach" <reference> "in" <reference> <statement>
-
-<include-statement>
-
- ::= "#include" <string-literal>
-
-<set-statement>
-
- ::= "#set" <reference> "=" <expression>
-
-<parse-statement>
-
- ::= "#parse" <string-literal>
-
-<param-statment>
-
- ::= "#param" <reference> "=" <string-literal>
-
-<stop-statement>
-
- ::= "#stop"
-
-<reference>
-
- ::= "$" <identifier> { "." <method> | <identifier> }
-
-<method>
-
- ::= <identifier> "(" [ <parameter> { "," <parameter> } ] ")"
-
-<parameter>
-
- ::= <reference> | <string-literal>
-
-<alpha-char>
-
- ::= "a..z, A..Z"
-
-<identifier-char>
-
- ::= "a..z, A..Z ,0..9 ,- ,_"
-
-<identifier>
-
- ::= <alpha-char> { <identifier-char> }
-
-<expression>
-
- ::= <true>
- | <false>
- | <primary-expression> "=" <assignment>
- | <conditional-or-expression>
-
-<assignment>
-
- ::= <primary-expression> "=" <assignment>
-
-<conditional-or-expression>
-
- ::= <conditional-and-expression> { "||" <conditional-and-expression> }
-
-<conditional-and-expression>
-
- ::= <equality-expression> { "&&" <equality-expression> }
-
-<equality-expression>
-
- ::= <relational-expression>
- { "==" <relational-expression>
- | "!=" <relational-expression>
- }
-
-<relational-expression>
-
- ::= <additive-expression>
- {
- "<" <additive-expression>
- | ">" <additive-expression>
- | "<=" <additive-expression>
- | ">=" <additive-expression>
- }
-
-<additive-expression>
-
- ::= <multiplicative-expression>
- {
- "+" <multiplicative-expression>
- | "-" <multiplicative-expression>
- }
-
-<multiplicative-expression>
-
- ::= <unary-expression>
- {
- "*" <unary-expression>
- | "/" <unary-expression>
- | "%" <unary-expression>
- }
-
-<unary-expression>
-
- ::= "!" <unary-expression> | <primary-expression>
-
-<primary-expression>
-
- ::= <string-literal>
- | <number-literal>
- | <reference>
- | "(" <expression> ")"
-
-]]></source>
-
-</section>
-
-</body>
-</document>
+<?xml version="1.0"?>
+
+<document>
+
+ <properties>
+ <title>Velocity Specification - BNF</title>
+ <author email="[EMAIL PROTECTED]">Velocity Documentation Team</author>
+ </properties>
+
+<body>
+
+
+<section name="Velocity Specification - BNF">
+
+<p>
+Please note that this is currently out of date and will be updated soon.
+</p>
+
+<source><![CDATA[
+This is a tentative BNF for Velocity, right now this is
+pretty much the WM syntax. This might change, as arithmetic
+might not make it into the syntax, and the future
+velocity syntax will more then likely remove block
+markers and instead use an "#end" token to signify
+the end of a directive.
+
+
+<statement>
+
+ ::= <text>
+ | <block>
+ | <if-statement>
+ | <else-if-statement>
+ | <foreach-statement>
+ | <include-statement>
+ | <set-statement>
+ | <parse-statement>
+ | <param-statment>
+ | <stop-statement>
+ | <reference>
+
+<block>
+
+ ::= "#begin" { <expresion> } "#end"
+
+<if-statement>
+
+ ::= "#if" "(" <expresion> ")" <statement> [ <else-statement> ]
+
+
+<else-if-statement>
+
+ ::= "#elseif" "(" <expresion> ")" <statement> [ <else-statement> ]
+
+<foreach-statement>
+
+ ::= "#foreach" <reference> "in" <reference> <statement>
+
+<include-statement>
+
+ ::= "#include" <string-literal>
+
+<set-statement>
+
+ ::= "#set" <reference> "=" <expression>
+
+<parse-statement>
+
+ ::= "#parse" <string-literal>
+
+<param-statment>
+
+ ::= "#param" <reference> "=" <string-literal>
+
+<stop-statement>
+
+ ::= "#stop"
+
+<reference>
+
+ ::= "$" <identifier> { "." <method> | <identifier> }
+
+<method>
+
+ ::= <identifier> "(" [ <parameter> { "," <parameter> } ] ")"
+
+<parameter>
+
+ ::= <reference> | <string-literal>
+
+<alpha-char>
+
+ ::= "a..z, A..Z"
+
+<identifier-char>
+
+ ::= "a..z, A..Z ,0..9 ,- ,_"
+
+<identifier>
+
+ ::= <alpha-char> { <identifier-char> }
+
+<expression>
+
+ ::= <true>
+ | <false>
+ | <primary-expression> "=" <assignment>
+ | <conditional-or-expression>
+
+<assignment>
+
+ ::= <primary-expression> "=" <assignment>
+
+<conditional-or-expression>
+
+ ::= <conditional-and-expression> { "||" <conditional-and-expression> }
+
+<conditional-and-expression>
+
+ ::= <equality-expression> { "&&" <equality-expression> }
+
+<equality-expression>
+
+ ::= <relational-expression>
+ { "==" <relational-expression>
+ | "!=" <relational-expression>
+ }
+
+<relational-expression>
+
+ ::= <additive-expression>
+ {
+ "<" <additive-expression>
+ | ">" <additive-expression>
+ | "<=" <additive-expression>
+ | ">=" <additive-expression>
+ }
+
+<additive-expression>
+
+ ::= <multiplicative-expression>
+ {
+ "+" <multiplicative-expression>
+ | "-" <multiplicative-expression>
+ }
+
+<multiplicative-expression>
+
+ ::= <unary-expression>
+ {
+ "*" <unary-expression>
+ | "/" <unary-expression>
+ | "%" <unary-expression>
+ }
+
+<unary-expression>
+
+ ::= "!" <unary-expression> | <primary-expression>
+
+<primary-expression>
+
+ ::= <string-literal>
+ | <number-literal>
+ | <reference>
+ | "(" <expression> ")"
+
+]]></source>
+
+</section>
+
+</body>
+</document>
Modified: jakarta/velocity/trunk/xdocs/specification.xml
URL:
http://svn.apache.org/viewcvs/jakarta/velocity/trunk/xdocs/specification.xml?view=diff&r1=153919&r2=153920
==============================================================================
--- jakarta/velocity/trunk/xdocs/specification.xml (original)
+++ jakarta/velocity/trunk/xdocs/specification.xml Tue Feb 15 00:37:55 2005
@@ -1,28 +1,29 @@
-<?xml version="1.0"?>
-
-<document>
-
- <properties>
- <title>Velocity Specification</title>
- <author email="[EMAIL PROTECTED]">Velocity Documentation Team</author>
- </properties>
-
-<body>
-
-<section name="Velocity Specification">
-
-<p>
-This document will eventually describe the Velocity Specification.
-For now, we have links to our outdated BNF and AST specifications.
-They will be updated soon.
-</p>
-
-<ul>
-<li><a href="./specification-bnf.html">BNF Specification</a></li>
-<li><a href="./specification-ast.html">AST Specification</a></li>
-</ul>
-
-</section>
-
-</body>
-</document>
+<?xml version="1.0"?>
+
+<document>
+
+ <properties>
+ <title>Velocity Specification</title>
+ <author email="[EMAIL PROTECTED]">Velocity Documentation Team</author>
+ </properties>
+
+<body>
+
+
+<section name="Velocity Specification">
+
+<p>
+This document will eventually describe the Velocity Specification.
+For now, we have links to our outdated BNF and AST specifications.
+They will be updated soon.
+</p>
+
+<ul>
+<li><a href="./specification-bnf.html">BNF Specification</a></li>
+<li><a href="./specification-ast.html">AST Specification</a></li>
+</ul>
+
+</section>
+
+</body>
+</document>
Modified: jakarta/velocity/trunk/xdocs/todo.xml
URL:
http://svn.apache.org/viewcvs/jakarta/velocity/trunk/xdocs/todo.xml?view=diff&r1=153919&r2=153920
==============================================================================
--- jakarta/velocity/trunk/xdocs/todo.xml (original)
+++ jakarta/velocity/trunk/xdocs/todo.xml Tue Feb 15 00:37:55 2005
@@ -1,134 +1,135 @@
-<?xml version="1.0"?>
-
-<document>
-
- <properties>
- <title>Velocity Todo</title>
- <author email="[EMAIL PROTECTED]">Velocity Documentation Team</author>
- </properties>
-
-<body>
-
-<section name="Todo">
-
-<p>
-This is an informal document describing what needs to
-be done in the Velocity code base and the
-Velocity documentation. If you need more detailed help, or have specific
-questions, please send mail to the mailing list
-(<a
href="mailto:[email protected]">[email protected]</a>).
-The Todo list that follows is roughly in order of importance.
-</p>
-
-</section>
-
-<section name="The List">
-
- <p>
- <strong>Directive Interface</strong>
- <br/>
- Right now there is a very thin interface for directives, but
- some knowledge of JavaCC is required. The directive
- interface is not intended to be used outside core Velocity
- developers (it is not intended to be a public API), but it
- probably makes sense to shield directive creators from JavaCC.
- </p>
-
- <p>
- <strong>Caching</strong>
- <br/>
- It would be good to have a discussion about how objects
- in the context should be cached, how the caching
- should be specified, and who should control the
- caching: the designer, by specifying something in the template;
- the developer,
- by placing expiry times on objects placed in the context;
- or a third party, such as a content manager. For example,
- say an array consisting of a top 10 list of books is
- placed in the context. This top 10 list might be valid
- for a 24 hour period: how should that be specified? Say
- a content manager later decides this list will be valid
- for a week. Do they tell the designer, who in turn changes
- the template, or could we provide a mechanism that would
- allow a content manager to change the default expiry time
- for that particular context object with the aid of a webapp
- of some sort? The groundwork has be laid for a flexible
- caching system in Velocity, but this discussion would be
- one of usage and policy.
- </p>
-
- <p>
- <strong>UML Overview</strong>
- <br/>
- It would great to include a set of comprehensive
- UML diagrams that describe Velocity. This would
- allow new developers to get up to speed quickly.
- </p>
-
- <p>
- <strong>Velocity Profiling</strong>
- <br/>
- If someone is handy with one of the standard profilers,
- it would be great to start hunting for bottlenecks. No
- serious optimization has been started. But in conjuction
- with the presence of a JUnit test suite, optimization
- changes could be made with confidence. It would be nice
- to have a configuration of a setup for a common profiler
- so that anyone who wanted to do some profiling could do
- so in a consistent manner.
- </p>
-
- <p>
- <strong>Syntax Dumper</strong>
- <br/>
- Right now there is a primitive syntax dumper in the Velocity
- code base, and it could be improved. This tool is very helpful
- in debugging, and it is also good for creating directives.
- It basically has a simple dump method that is used for all
- the AST node types. It would be good to tailor dump methods
- for particular AST node types so that the structure produced
- is a little clearer.
- </p>
-
- <p>
- <strong>Syntax Checker</strong>
- <br/>
- It would be good to have a standard syntax checker, something
- that would find all syntax errors and report them to the
- designer in some intelligible format. This tool could be
- hooked into various designer tools like DreamWeaver.
- </p>
-
- <p>
- <strong>Compiler</strong>
- <br/>
- It would be great to have a template compiler. There is a great
- utility called JavaClass that provides a very clean and simple way
- to create class files, and there is also some byte code generating
- code present in the DynamicJava package that could be utilized.
- </p>
-
- <p>
- <strong>IDE Integration</strong>
- <br/>
- How could Velocity be integrated into standard IDEs like
- JBuilder and VisualAge?
- </p>
-
- <p>
- <strong>Scripting Language Integration</strong>
- <br/>
- This is something that has been discussed on the Turbine
- list. Allowing Context building classes to be written
- in JPython, Rhino or other scripting languages would
- dramatically improve development time and might allow technically
- proficient web designers who are familiar JavaScript to create
- an entire servlet solution with Velocity. As most of these
- scripting solutions provide a compiler, performance would still
- remain at an acceptable level.
- </p>
-
-</section>
-
-</body>
-</document>
+<?xml version="1.0"?>
+
+<document>
+
+ <properties>
+ <title>Velocity Todo</title>
+ <author email="[EMAIL PROTECTED]">Velocity Documentation Team</author>
+ </properties>
+
+<body>
+
+
+<section name="Todo">
+
+<p>
+This is an informal document describing what needs to
+be done in the Velocity code base and the
+Velocity documentation. If you need more detailed help, or have specific
+questions, please send mail to the mailing list
+(<a
href="mailto:[email protected]">[email protected]</a>).
+The Todo list that follows is roughly in order of importance.
+</p>
+
+</section>
+
+<section name="The List">
+
+ <p>
+ <strong>Directive Interface</strong>
+ <br/>
+ Right now there is a very thin interface for directives, but
+ some knowledge of JavaCC is required. The directive
+ interface is not intended to be used outside core Velocity
+ developers (it is not intended to be a public API), but it
+ probably makes sense to shield directive creators from JavaCC.
+ </p>
+
+ <p>
+ <strong>Caching</strong>
+ <br/>
+ It would be good to have a discussion about how objects
+ in the context should be cached, how the caching
+ should be specified, and who should control the
+ caching: the designer, by specifying something in the template;
+ the developer,
+ by placing expiry times on objects placed in the context;
+ or a third party, such as a content manager. For example,
+ say an array consisting of a top 10 list of books is
+ placed in the context. This top 10 list might be valid
+ for a 24 hour period: how should that be specified? Say
+ a content manager later decides this list will be valid
+ for a week. Do they tell the designer, who in turn changes
+ the template, or could we provide a mechanism that would
+ allow a content manager to change the default expiry time
+ for that particular context object with the aid of a webapp
+ of some sort? The groundwork has be laid for a flexible
+ caching system in Velocity, but this discussion would be
+ one of usage and policy.
+ </p>
+
+ <p>
+ <strong>UML Overview</strong>
+ <br/>
+ It would great to include a set of comprehensive
+ UML diagrams that describe Velocity. This would
+ allow new developers to get up to speed quickly.
+ </p>
+
+ <p>
+ <strong>Velocity Profiling</strong>
+ <br/>
+ If someone is handy with one of the standard profilers,
+ it would be great to start hunting for bottlenecks. No
+ serious optimization has been started. But in conjuction
+ with the presence of a JUnit test suite, optimization
+ changes could be made with confidence. It would be nice
+ to have a configuration of a setup for a common profiler
+ so that anyone who wanted to do some profiling could do
+ so in a consistent manner.
+ </p>
+
+ <p>
+ <strong>Syntax Dumper</strong>
+ <br/>
+ Right now there is a primitive syntax dumper in the Velocity
+ code base, and it could be improved. This tool is very helpful
+ in debugging, and it is also good for creating directives.
+ It basically has a simple dump method that is used for all
+ the AST node types. It would be good to tailor dump methods
+ for particular AST node types so that the structure produced
+ is a little clearer.
+ </p>
+
+ <p>
+ <strong>Syntax Checker</strong>
+ <br/>
+ It would be good to have a standard syntax checker, something
+ that would find all syntax errors and report them to the
+ designer in some intelligible format. This tool could be
+ hooked into various designer tools like DreamWeaver.
+ </p>
+
+ <p>
+ <strong>Compiler</strong>
+ <br/>
+ It would be great to have a template compiler. There is a great
+ utility called JavaClass that provides a very clean and simple way
+ to create class files, and there is also some byte code generating
+ code present in the DynamicJava package that could be utilized.
+ </p>
+
+ <p>
+ <strong>IDE Integration</strong>
+ <br/>
+ How could Velocity be integrated into standard IDEs like
+ JBuilder and VisualAge?
+ </p>
+
+ <p>
+ <strong>Scripting Language Integration</strong>
+ <br/>
+ This is something that has been discussed on the Turbine
+ list. Allowing Context building classes to be written
+ in JPython, Rhino or other scripting languages would
+ dramatically improve development time and might allow technically
+ proficient web designers who are familiar JavaScript to create
+ an entire servlet solution with Velocity. As most of these
+ scripting solutions provide a compiler, performance would still
+ remain at an acceptable level.
+ </p>
+
+</section>
+
+</body>
+</document>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]