You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by se...@apache.org on 2009/08/01 22:25:38 UTC

svn commit: r799919 - /commons/proper/jexl/branches/2.0/xdocs/reference/syntax.xml

Author: sebb
Date: Sat Aug  1 20:25:38 2009
New Revision: 799919

URL: http://svn.apache.org/viewvc?rev=799919&view=rev
Log:
JEXL-50 - correct DIV documentation
JEXL-64 - clarify allowable variable names

Modified:
    commons/proper/jexl/branches/2.0/xdocs/reference/syntax.xml

Modified: commons/proper/jexl/branches/2.0/xdocs/reference/syntax.xml
URL: http://svn.apache.org/viewvc/commons/proper/jexl/branches/2.0/xdocs/reference/syntax.xml?rev=799919&r1=799918&r2=799919&view=diff
==============================================================================
--- commons/proper/jexl/branches/2.0/xdocs/reference/syntax.xml (original)
+++ commons/proper/jexl/branches/2.0/xdocs/reference/syntax.xml Sat Aug  1 20:25:38 2009
@@ -60,8 +60,19 @@
               <li>Invalid: <code>9v</code>,<code>!a99</code>,<code>1$</code></li>
             </ul>
             <p>
+            Variable names are case-sensitive, e.g. <code>var1</code> and <code>Var1</code> are different variables. 
+            </p>
+            <p>
               JEXL also supports <code>ant-style</code> variables, e.g. <source>my.dotted.var</source>
               is a valid variable name.
+              <br/>
+              N.B. the following keywords are reserved, and cannot be used as a variable name or property when using the dot operator:
+              <code>or and eq ne lt gt le ge div mod not null true false new</code>
+              For example, 
+              <code>my.new.dotted.var</code>
+              is invalid.
+              In such cases, the [ ] operator can be used, for example:
+              <code>my.['new'].dotted.var</code>
             </p>
             <p>
               <strong>NOTE:</strong> JEXL does not support variables with hyphens in them, e.g.
@@ -306,17 +317,11 @@
         <tr>
           <td>Division</td>
           <td>
-            The usual <code>/</code> operator is used.
+            The usual <code>/</code> operator is used, or one can use the <code>div</code> operator.
             For example
             <source>val1 / val2</source>
-          </td>
-        </tr>
-        <tr>
-          <td>Integer Division</td>
-          <td>
-            The <code>div</code> operator is used.
-            For example
-            <source>4 div 3</source> gives 1.
+            or
+            <source>val1 div val2</source>
           </td>
         </tr>
         <tr>