cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Leszek Gawron <lgaw...@mobilebox.pl>
Subject Re: Identifying expression language, Re: svn commit: r279283 - /cocoon/trunk/status.xml
Date Fri, 09 Sep 2005 20:21:25 GMT
Vadim Gritsenko wrote:
> Leszek Gawron wrote:
> 
>> Vadim Gritsenko wrote:
>>
>>>   * Should this prefix be configurable (in cocoon.xconf) instead of
>>>     being hard-coded?
>>
>>
>> It is not hardcoded, see
>> src\blocks\template\trunk\WEB-INF\xconf\cocoon-template-expression.xconf:
> 
> 
> ...
> 
>> So you can choose whatever prefix you like. Moreover you are are 
>> allowed to use {expr} which will use default expression compiler. 
>> You've got it even shorter than before.
> 
> 
> Oh, great. I guess I got that wrong impression from JXPATH and JEXL 
> constants :)
Those constants are there only in current 
DefaultJXTExpressionCompiler.java (name will change) for keeping 
backward functionality.

NewStyleJXTExpressionCompiler.java (name will change) resolves 
expressions using ExpressionFactory.getExpression:

public Expression getExpression(String expression) throws 
ExpressionException {
     String language = DEFAULT_EXPRESSION_LANGUAGE;
     int end = expression.indexOf(':');
     if (end != -1) {
         language = expression.substring(0, end);
         expression = expression.substring(end+1);
     }
     return getExpression(language, expression);
}

-- 
Leszek Gawron                                      lgawron@mobilebox.pl
IT Manager                                         MobileBox sp. z o.o.
+48 (61) 855 06 67                              http://www.mobilebox.pl
mobile: +48 (501) 720 812                       fax: +48 (61) 853 29 65

Mime
View raw message