cvs commit: jakarta-commons/jexl/xdocs/reference syntax.xml
dion2004/09/05 02:00:56 Modified:jexl/xdocs/reference syntax.xml Log: Docs on ant-style properties Revision ChangesPath 1.12 +9 -0 jakarta-commons/jexl/xdocs/reference/syntax.xml Index: syntax.xml === RCS file: /home/cvs/jakarta-commons/jexl/xdocs/reference/syntax.xml,v retrieving revision 1.11 retrieving revision 1.12 diff -u -r1.11 -r1.12 --- syntax.xml23 Aug 2004 00:55:09 - 1.11 +++ syntax.xml5 Sep 2004 09:00:55 - 1.12 @@ -57,6 +57,15 @@ liValid: codevar1/code,code_a99/code,code$1/code/li liInvalid: code9v/code,code!a99/code,code1$/code/li /ul +p + JEXL also supports codeant-style/code variables, e.g. sourcemy.dotted.var/source + is a valid variable name. +/p +p + strongNOTE:/strong JEXL does not support variables with hyphens in them, e.g. + sourcecommons-logging/source is not a valid variable, but instead is treated as a + subtraction of the variable codelogging/code from the variable codecommons/code +/p /td /tr tr - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: cvs commit: jakarta-commons/jexl/xdocs/reference syntax.xml
Hi Dion, Just one question: How is it possible to support at the same time variables in ant-style and the syntax to access properties (http://jakarta.apache.org/commons/jexl/reference/examples.html#Example%20Expressions)? How do I make the difference between a variable named x.y and a variable x with a getter getY() ?? I had a problem with this in Maven plugins. I had a bug because I used a dotted variable name. Is there a difference between variables names and properties names ? Arnaud On 5 Sep 2004 09:00:56 -, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: dion2004/09/05 02:00:56 Modified:jexl/xdocs/reference syntax.xml Log: Docs on ant-style properties Revision ChangesPath 1.12 +9 -0 jakarta-commons/jexl/xdocs/reference/syntax.xml Index: syntax.xml === RCS file: /home/cvs/jakarta-commons/jexl/xdocs/reference/syntax.xml,v retrieving revision 1.11 retrieving revision 1.12 diff -u -r1.11 -r1.12 --- syntax.xml23 Aug 2004 00:55:09 - 1.11 +++ syntax.xml5 Sep 2004 09:00:55 - 1.12 @@ -57,6 +57,15 @@ liValid: codevar1/code,code_a99/code,code$1/code/li liInvalid: code9v/code,code!a99/code,code1$/code/li /ul +p + JEXL also supports codeant-style/code variables, e.g. sourcemy.dotted.var/source + is a valid variable name. +/p +p + strongNOTE:/strong JEXL does not support variables with hyphens in them, e.g. + sourcecommons-logging/source is not a valid variable, but instead is treated as a + subtraction of the variable codelogging/code from the variable codecommons/code +/p /td /tr tr - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: cvs commit: jakarta-commons/jexl/xdocs/reference syntax.xml
On Sun, 5 Sep 2004 17:15:50 +0200, Arnaud HERITIER [EMAIL PROTECTED] wrote: Hi Dion, Just one question: How is it possible to support at the same time variables in ant-style and the syntax to access properties Properties will get precedence. How do I make the difference between a variable named x.y and a variable x with a getter getY() ?? There is none. The property will win. I had a problem with this in Maven plugins. I had a bug because I used a dotted variable name. Is there a difference between variables names and properties names ? No The problem you had was with the empty function and dotted variables. This has very recently been fixed in JEXL, and not yet incorporated into Jelly. Once JEXL is released, and Jelly picks up that, your original code will work as you expected. -- http://www.multitask.com.au/people/dion/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: cvs commit: jakarta-commons/jexl/xdocs/reference syntax.xml
Just one question: How is it possible to support at the same time variables in ant-style and the syntax to access properties Properties will get precedence. ok. How do I make the difference between a variable named x.y and a variable x with a getter getY() ?? There is none. The property will win. ok it's logic. I had a problem with this in Maven plugins. I had a bug because I used a dotted variable name. Is there a difference between variables names and properties names ? No The problem you had was with the empty function and dotted variables. This has very recently been fixed in JEXL, and not yet incorporated into Jelly. Once JEXL is released, and Jelly picks up that, your original code will work as you expected. I understand. thanks for the explanation. Arnaud - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-commons/jexl/xdocs/reference syntax.xml
dion2004/08/22 04:54:55 Modified:jexl/xdocs/reference syntax.xml Log: Rename heading Revision ChangesPath 1.8 +2 -2 jakarta-commons/jexl/xdocs/reference/syntax.xml Index: syntax.xml === RCS file: /home/cvs/jakarta-commons/jexl/xdocs/reference/syntax.xml,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- syntax.xml22 Aug 2004 01:59:59 - 1.7 +++ syntax.xml22 Aug 2004 11:54:55 - 1.8 @@ -25,14 +25,14 @@ p This reference is split up into the following sections: ol - lia href=#SyntaxSyntax/a/li + lia href=#Language ElementsLanguage Elements/a/li lia href=#LiteralsLiterals/a/li lia href=#FunctionsFunctions/a/li lia href=#OperatorsOperators/a/li /ol /p /section -section name=Syntax +section name=Language Elements table trthItem/ththDescription/th/tr tr - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-commons/jexl/xdocs/reference syntax.xml
dion2004/08/22 04:57:55 Modified:jexl/xdocs/reference syntax.xml Log: Fix width Revision ChangesPath 1.9 +4 -4 jakarta-commons/jexl/xdocs/reference/syntax.xml Index: syntax.xml === RCS file: /home/cvs/jakarta-commons/jexl/xdocs/reference/syntax.xml,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- syntax.xml22 Aug 2004 11:54:55 - 1.8 +++ syntax.xml22 Aug 2004 11:57:55 - 1.9 @@ -34,7 +34,7 @@ /section section name=Language Elements table -trthItem/ththDescription/th/tr +trth width=15%Item/ththDescription/th/tr tr tdComments/td td @@ -83,7 +83,7 @@ /section section name=Literals table -trthItem/ththDescription/th/tr +trth width=15%Item/ththDescription/th/tr tr tdInteger Literals/td td1 or more digits from code0/code to code9/code/td @@ -122,7 +122,7 @@ /section section name=Functions table -trthFunction/ththDescription/th/tr +trth width=15%Function/ththDescription/th/tr tr tdempty/td td @@ -155,7 +155,7 @@ /section section name=Operators table -trthOperator/ththDescription/th/tr +trth width=15%Operator/ththDescription/th/tr tr tdAssignment/td tdsourcevar1 = var2/source/td - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-commons/jexl/xdocs/reference syntax.xml
dion2004/08/22 07:50:28 Modified:jexl/xdocs/reference syntax.xml Log: Assignment isn't implemented Revision ChangesPath 1.10 +0 -10 jakarta-commons/jexl/xdocs/reference/syntax.xml Index: syntax.xml === RCS file: /home/cvs/jakarta-commons/jexl/xdocs/reference/syntax.xml,v retrieving revision 1.9 retrieving revision 1.10 diff -u -r1.9 -r1.10 --- syntax.xml22 Aug 2004 11:57:55 - 1.9 +++ syntax.xml22 Aug 2004 14:50:28 - 1.10 @@ -73,12 +73,6 @@ A block is simply multiple statements inside curly braces (code{, }/code). /td /tr -tr - tdAssigment/td - td -Assignment sets a variable to a given value using the code=/code operator. - /td -/tr /table /section section name=Literals @@ -156,10 +150,6 @@ section name=Operators table trth width=15%Operator/ththDescription/th/tr -tr - tdAssignment/td - tdsourcevar1 = var2/source/td -/tr tr tdBoolean codeand/code/td td - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-commons/jexl/xdocs/reference syntax.xml
dion2004/08/21 18:53:44 Modified:jexl/xdocs/reference syntax.xml Log: Document most syntax Revision ChangesPath 1.6 +158 -1jakarta-commons/jexl/xdocs/reference/syntax.xml Index: syntax.xml === RCS file: /home/cvs/jakarta-commons/jexl/xdocs/reference/syntax.xml,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- syntax.xml20 Aug 2004 06:09:05 - 1.5 +++ syntax.xml22 Aug 2004 01:53:44 - 1.6 @@ -50,10 +50,35 @@ e.g. ul liValid: codevar1/code,code_a99/code,code$1/code/li - liInalid: code9v/code,code!a99/code,code1$/code/li + liInvalid: code9v/code,code!a99/code,code1$/code/li /ul /td /tr +tr + tdScripts/td + td +A script in Jexl is made up of zero or more statements. + /td +/tr +tr + tdStatements/td + td +A statement can be the empty statement, the semicolon (code;/code) , block, assignment or an expression. +Statements are optionally terminated with a semicolon. + /td +/tr +tr + tdBlock/td + td +A block is simply multiple statements inside curly braces (code{, }/code). + /td +/tr +tr + tdAssigment/td + td +Assignment sets a variable to a given value using the code=/code operator. + /td +/tr /table /section section name=Literals @@ -79,6 +104,20 @@ source'Hello world'/source are equivalent. /td /tr +tr + tdBoolean literals/td + td +The literals codetrue/code and codefalse/code can be used, e.g. +sourceval1 == true/source + /td +/tr +tr + tdNull literal/td + td +The null value is represented as in java using the literal codenull/code, e.g. +sourceval1 == null/source + /td +/tr /table /section section name=Functions @@ -143,6 +182,124 @@ The usual code!/code operator can be used as well as the word codenot/code, e.g. source!cond1/source and sourcenot cond1/source are equivalent + /td +/tr +tr + tdEquality/td + td +The usual code==/code operator can be used as well as the abbreviation codeeq/code. +For example +sourceval1 == val2/source and +sourceval1 eq val2/source are equivalent. +ol + li +codenull/code is only ever equal to null, that is if you compare null +to any non-null value, the result is false. + /li + liEquality uses the java codeequals/code method/li +/ol + /td +/tr +tr + tdInequality/td + td +The usual code!=/code operator can be used as well as the abbreviation codene/code. +For example +sourceval1 != val2/source and +sourceval1 ne val2/source are equivalent. + /td +/tr +tr + tdLess Than/td + td +The usual codelt;/code operator can be used as well as the abbreviation codelt/code. +For example +sourceval1 lt; val2/source and +sourceval1 lt val2/source are equivalent. + /td +/tr +tr + tdLess Than Or Equal To/td + td +The usual codelt;=/code operator can be used as well as the abbreviation codele/code. +For example +sourceval1 lt;= val2/source and +sourceval1 le val2/source are equivalent. + /td +/tr +tr + tdGreater Than/td + td +The usual codegt;/code operator can be used as well as the abbreviation codegt/code. +For example +sourceval1 gt; val2/source and +sourceval1 gt val2/source are equivalent. + /td +/tr +tr + tdGreater Than Or Equal To/td + td +The usual codegt;=/code operator can be used as well as the abbreviation codege/code. +For example +sourceval1 gt;= val2/source and +sourceval1 ge val2/source are equivalent. + /td +/tr +tr + tdAddition/td + td +The usual code+/code operator is used. +For
cvs commit: jakarta-commons/jexl/xdocs/reference syntax.xml
dion2004/08/21 18:59:59 Modified:jexl/xdocs/reference syntax.xml Log: Add array access Revision ChangesPath 1.7 +12 -5 jakarta-commons/jexl/xdocs/reference/syntax.xml Index: syntax.xml === RCS file: /home/cvs/jakarta-commons/jexl/xdocs/reference/syntax.xml,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- syntax.xml22 Aug 2004 01:53:44 - 1.6 +++ syntax.xml22 Aug 2004 01:59:59 - 1.7 @@ -250,7 +250,7 @@ td The usual code+/code operator is used. For example -sourceval1 + val2/source. +sourceval1 + val2/source /td /tr tr @@ -258,7 +258,7 @@ td The usual code-/code operator is used. For example -sourceval1 - val2/source. +sourceval1 - val2/source /td /tr tr @@ -266,7 +266,7 @@ td The usual code*/code operator is used. For example -sourceval1 * val2/source. +sourceval1 * val2/source /td /tr tr @@ -274,7 +274,7 @@ td The usual code//code operator is used. For example -sourceval1 / val2/source. +sourceval1 / val2/source /td /tr tr @@ -299,7 +299,14 @@ td The unary code-/code operator is used. For example -source-12/source. +source-12/source + /td +/tr +tr + tdArray access/td + td +Array elements may be accessed using either square brackets or a dotted numeral, e.g. +sourcearr1[0]/source and sourcearr1.0/source are equivalent /td /tr /table - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-commons/jexl/xdocs/reference syntax.xml
dion2004/08/19 23:09:05 Modified:jexl/xdocs/reference syntax.xml Log: More details Revision ChangesPath 1.5 +67 -16jakarta-commons/jexl/xdocs/reference/syntax.xml Index: syntax.xml === RCS file: /home/cvs/jakarta-commons/jexl/xdocs/reference/syntax.xml,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- syntax.xml20 Aug 2004 05:09:27 - 1.4 +++ syntax.xml20 Aug 2004 06:09:05 - 1.5 @@ -26,7 +26,9 @@ This reference is split up into the following sections: ol lia href=#SyntaxSyntax/a/li + lia href=#LiteralsLiterals/a/li lia href=#FunctionsFunctions/a/li + lia href=#OperatorsOperators/a/li /ol /p /section @@ -41,6 +43,23 @@ /td /tr tr + tdIdentifiers / variables/td + td +Must start with codea-z/code, codeA-Z/code, code_/code or code$/code. +Can then be followed by code0-9/code, codea-z/code, codeA-Z/code, code_/code or code$/code. +e.g. +ul + liValid: codevar1/code,code_a99/code,code$1/code/li + liInalid: code9v/code,code!a99/code,code1$/code/li +/ul + /td +/tr + /table +/section +section name=Literals + table +trthItem/ththDescription/th/tr +tr tdInteger Literals/td td1 or more digits from code0/code to code9/code/td /tr @@ -60,22 +79,6 @@ source'Hello world'/source are equivalent. /td /tr -tr - tdIdentifiers / variables/td - td -Must start with codea-z/code, codeA-Z/code, code_/code or code$/code. -Can then be followed by code0-9/code, codea-z/code, codeA-Z/code, code_/code or code$/code. -e.g. -ul - liValid: codevar1/code,code_a99/code,code$1/code/li - liInalid: code9v/code,code!a99/code,code1$/code/li -/ul - /td -/tr -tr - tdAssignment/td - tdsourcevar1 = var2/source/td -/tr /table /section section name=Functions @@ -92,6 +95,54 @@ liA collection of size zero/li liAn empty map/li /ol +sourceempty(var1)/source + /td +/tr +tr + tdsize/td + td +Returns the information about the expression: +ol + liLength of an array/li + liSize of a List/li + liSize of a Map/li + liSize of a Set/li + liLength of a string/li +/ol +sourcesize(Hello)/source returns 5. + /td +/tr + /table +/section +section name=Operators + table +trthOperator/ththDescription/th/tr +tr + tdAssignment/td + tdsourcevar1 = var2/source/td +/tr +tr + tdBoolean codeand/code/td + td +The usual codeamp;amp;/code operator can be used as well as the word codeand/code, e.g. +sourcecond1 and cond2/source and +sourcecond1 amp;amp; cond2/source are equivalent + /td +/tr +tr + tdBoolean codeor/code/td + td +The usual code||/code operator can be used as well as the word codeor/code, e.g. +sourcecond1 or cond2/source and +sourcecond1 || cond2/source are equivalent + /td +/tr +tr + tdBoolean codenot/code/td + td +The usual code!/code operator can be used as well as the word codenot/code, e.g. +source!cond1/source and +sourcenot cond1/source are equivalent /td /tr /table - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-commons/jexl/xdocs/reference syntax.xml
dion2004/08/19 11:26:07 Modified:jexl/xdocs/reference syntax.xml Log: start on syntax Revision ChangesPath 1.2 +14 -0 jakarta-commons/jexl/xdocs/reference/syntax.xml Index: syntax.xml === RCS file: /home/cvs/jakarta-commons/jexl/xdocs/reference/syntax.xml,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- syntax.xml19 Aug 2004 17:17:52 - 1.1 +++ syntax.xml19 Aug 2004 18:26:07 - 1.2 @@ -22,6 +22,20 @@ body section name=Syntax + table +trthItem/ththDescription/th/tr +tr + tdComments/td + td +Specified using code##/code and extend to the end of line, e.g. +source## This is a comment/source + /td +/tr +tr + tdInteger Literals/td + td1 or more digits from code0/code to code9/code/td +/tr + /table /section /body /document - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-commons/jexl/xdocs/reference syntax.xml
dion2004/08/19 21:40:50 Modified:jexl/xdocs/reference syntax.xml Log: More on syntax Revision ChangesPath 1.3 +24 -0 jakarta-commons/jexl/xdocs/reference/syntax.xml Index: syntax.xml === RCS file: /home/cvs/jakarta-commons/jexl/xdocs/reference/syntax.xml,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- syntax.xml19 Aug 2004 18:26:07 - 1.2 +++ syntax.xml20 Aug 2004 04:40:50 - 1.3 @@ -35,6 +35,30 @@ tdInteger Literals/td td1 or more digits from code0/code to code9/code/td /tr +tr + tdFloating point Literals/td + td +1 or more digits from code0/code to code9/code, followed +by a decimal point and then one or more digits from +code0/code to code9/code. + /td +/tr +tr + tdIdentifier / variable/td + td +Must start with codea-z/code, codeA-Z/code, code_/code or code$/code. +Can then be followed by code0-9/code,codea-z/code, codeA-Z/code, code_/code or code$/code. +e.g. +ul + liValid: codevar1/code,code_a99/code,code$1/code/li + liInalid: code9v/code,code!a99/code,code1$/code/li +/ul + /td +/tr +tr + tdAssignment/td + tdsourcevar1 = var2/source/td +/tr /table /section /body - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-commons/jexl/xdocs/reference syntax.xml
dion2004/08/19 22:09:27 Modified:jexl/xdocs/reference syntax.xml Log: start on syntax Revision ChangesPath 1.4 +37 -2 jakarta-commons/jexl/xdocs/reference/syntax.xml Index: syntax.xml === RCS file: /home/cvs/jakarta-commons/jexl/xdocs/reference/syntax.xml,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- syntax.xml20 Aug 2004 04:40:50 - 1.3 +++ syntax.xml20 Aug 2004 05:09:27 - 1.4 @@ -21,6 +21,15 @@ /properties body +section name=Overview + p +This reference is split up into the following sections: +ol + lia href=#SyntaxSyntax/a/li + lia href=#FunctionsFunctions/a/li +/ol + /p +/section section name=Syntax table trthItem/ththDescription/th/tr @@ -44,10 +53,18 @@ /td /tr tr - tdIdentifier / variable/td + tdString literals/td + td +Can start and end with either code'/code or code/code, e.g. +sourceHello world/source and +source'Hello world'/source are equivalent. + /td +/tr +tr + tdIdentifiers / variables/td td Must start with codea-z/code, codeA-Z/code, code_/code or code$/code. -Can then be followed by code0-9/code,codea-z/code, codeA-Z/code, code_/code or code$/code. +Can then be followed by code0-9/code, codea-z/code, codeA-Z/code, code_/code or code$/code. e.g. ul liValid: codevar1/code,code_a99/code,code$1/code/li @@ -58,6 +75,24 @@ tr tdAssignment/td tdsourcevar1 = var2/source/td +/tr + /table +/section +section name=Functions + table +trthFunction/ththDescription/th/tr +tr + tdempty/td + td +Returns true if the expression following is either: +ol + licodenull/code/li + liAn empty string/li + liAn array of length zero/li + liA collection of size zero/li + liAn empty map/li +/ol + /td /tr /table /section - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]