cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefano Mazzocchi <stef...@apache.org>
Subject Re: Expression languages (was Re: [RT] StringTemplate: The answer to our templating needs?)
Date Fri, 29 Oct 2004 17:51:11 GMT
Sylvain Wallez wrote:

> Carsten Ziegeler wrote:
> 
>> Sylvain Wallez wrote:
>>
>>  
>>
>>> XPath is a must-have when you deal with XML documents while Jexl is 
>>> mostly useless in that case but is straightforward when you deal with 
>>> JavaBeans. I also agree that understanding the difference between 
>>> "${continuation.id}" and "#{$continuation/id}" is less than evident.
>>>
>>> So what about a unified syntax for expansion tokens, within which 
>>> different languages could be used. Example:
>>> - ${continuation.id} // Jexl, default syntax
>>> - ${xpath:$continuation/id} // xpath
>>> - ${im:defaults:skin} // input-module
>>> - ${ognl:$continuation.id} // OGNL [1]
>>>
>>>   
>>
>> Hmm, one of the things I really don't like with JXTG is that you
>> have to different expression languages. You never know which to
>> use and some things work only with one specific language.
>> And for me this comes near to FS :)
>>  
>>
> 
> Agree, but considering the wide variety of applications contexts where 
> Cocoon is used, I don't think there can be a single "one-size-fits-all" 
> language.
> 
> There are also a number of places in Cocoon where we need to evaluate 
> expressions: templates, sitemap, form validators, form bindings, etc, 
> which are currently implemented separately with different syntaxes. We 
> need a common expression evaluation component.
> 
>> So, let's decide on one language that we think is the best, but
>> let's provide a hook so others can plugin their language if *they*
>> want to.
>>  
>>
> 
> That's exactly what I suggest above: we choose a standard default 
> language, but open the possibility to plug in new ones. XPath is a 
> must-have, Jexl and IM have very valid use cases which IMO justify them 
> to be provided by Cocoon. Other languages are just a possibility that we 
> offer _if_ people want to add their own language.

Excuse my ignorance, but can you outline the pro/cons of each path 
language, along with what it can't be done with it that can be done with 
others?

I guess that would be helpful for people to decide.

-- 
Stefano.


Mime
View raw message