You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by di...@apache.org on 2004/09/05 11:00:56 UTC

cvs commit: jakarta-commons/jexl/xdocs/reference syntax.xml

dion        2004/09/05 02:00:56

  Modified:    jexl/xdocs/reference syntax.xml
  Log:
  Docs on ant-style properties
  
  Revision  Changes    Path
  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.xml	23 Aug 2004 00:55:09 -0000	1.11
  +++ syntax.xml	5 Sep 2004 09:00:55 -0000	1.12
  @@ -57,6 +57,15 @@
                 <li>Valid: <code>var1</code>,<code>_a99</code>,<code>$1</code></li>
                 <li>Invalid: <code>9v</code>,<code>!a99</code>,<code>1$</code></li>
               </ul>
  +            <p>
  +              JEXL also supports <code>ant-style</code> variables, e.g. <source>my.dotted.var</source>
  +              is a valid variable name.
  +            </p>
  +            <p>
  +              <strong>NOTE:</strong> JEXL does not support variables with hyphens in them, e.g.
  +              <source>commons-logging</source> is not a valid variable, but instead is treated as a
  +              subtraction of the variable <code>logging</code> from the variable <code>commons</code>
  +            </p>
             </td>
           </tr>
           <tr>
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Re: cvs commit: jakarta-commons/jexl/xdocs/reference syntax.xml

Posted by Arnaud HERITIER <ah...@gmail.com>.
> > 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: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Re: cvs commit: jakarta-commons/jexl/xdocs/reference syntax.xml

Posted by Dion Gillard <di...@gmail.com>.
On Sun, 5 Sep 2004 17:15:50 +0200, Arnaud HERITIER <ah...@gmail.com> 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: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Re: cvs commit: jakarta-commons/jexl/xdocs/reference syntax.xml

Posted by Arnaud HERITIER <ah...@gmail.com>.
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 -0000, dion@apache.org <di...@apache.org> wrote:
> dion        2004/09/05 02:00:56
> 
>  Modified:    jexl/xdocs/reference syntax.xml
>  Log:
>  Docs on ant-style properties
> 
>  Revision  Changes    Path
>  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.xml        23 Aug 2004 00:55:09 -0000      1.11
>  +++ syntax.xml        5 Sep 2004 09:00:55 -0000       1.12
>  @@ -57,6 +57,15 @@
>                 <li>Valid: <code>var1</code>,<code>_a99</code>,<code>$1</code></li>
>                 <li>Invalid: <code>9v</code>,<code>!a99</code>,<code>1$</code></li>
>               </ul>
>  +            <p>
>  +              JEXL also supports <code>ant-style</code> variables, e.g. <source>my.dotted.var</source>
>  +              is a valid variable name.
>  +            </p>
>  +            <p>
>  +              <strong>NOTE:</strong> JEXL does not support variables with hyphens in them, e.g.
>  +              <source>commons-logging</source> is not a valid variable, but instead is treated as a
>  +              subtraction of the variable <code>logging</code> from the variable <code>commons</code>
>  +            </p>
>             </td>
>           </tr>
>           <tr>
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: commons-dev-help@jakarta.apache.org
> 
>

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org