You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@cocoon.apache.org by lg...@apache.org on 2005/09/07 11:33:25 UTC

svn commit: r279283 - /cocoon/trunk/status.xml

Author: lgawron
Date: Wed Sep  7 02:33:17 2005
New Revision: 279283

URL: http://svn.apache.org/viewcvs?rev=279283&view=rev
Log:
status update

Modified:
    cocoon/trunk/status.xml

Modified: cocoon/trunk/status.xml
URL: http://svn.apache.org/viewcvs/cocoon/trunk/status.xml?rev=279283&r1=279282&r2=279283&view=diff
==============================================================================
--- cocoon/trunk/status.xml (original)
+++ cocoon/trunk/status.xml Wed Sep  7 02:33:17 2005
@@ -198,6 +198,10 @@
   <changes>
   <release version="@version@" date="@date@">
     <action dev="LG" type="add">
+      JXTG: Pluggable expression parser. New expression syntax: ${expr}, #{expr} -&gt; {jexl:expr}, {jxpath:expr}.
+      This is a target syntax for CTemplate.
+    </action>
+    <action dev="LG" type="add">
       support for following use cases: &lt;jx:out value=&quot;${xmlString}&quot; xmlize=&quot;true&quot; strip-root=&quot;true&quot;/&gt;
       and &lt;jx:out value=&quot;${domDocument}&quot; strip-root=&quot;true&quot;/&gt;
     </action>



Re: Identifying expression language, Re: svn commit: r279283 - /cocoon/trunk/status.xml

Posted by Leszek Gawron <lg...@mobilebox.pl>.
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

Re: Identifying expression language, Re: svn commit: r279283 - /cocoon/trunk/status.xml

Posted by Vadim Gritsenko <va...@reverycodes.com>.
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 :)

Vadim

Re: Identifying expression language, Re: svn commit: r279283 - /cocoon/trunk/status.xml

Posted by Leszek Gawron <lg...@mobilebox.pl>.
Carsten Ziegeler wrote:
> Leszek Gawron wrote:
> 
>>It is not hardcoded, see
>>src\blocks\template\trunk\WEB-INF\xconf\cocoon-template-expression.xconf:
>>
>><expression-compilers>
>><component-instance 
>>class="org.apache.cocoon.components.expression.jxpath.JXPathCompiler" 
>>name="default"/>
>><component-instance 
>>class="org.apache.cocoon.components.expression.jexl.JexlCompiler" 
>>name="jexl"/>
>><component-instance 
>>class="org.apache.cocoon.components.expression.jxpath.JXPathCompiler" 
>>name="jxpath"/>
>></expression-compilers>
>>
>>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.
>>
> 
> Ok, you *can* change the prefixes but overall it's not a good idea. If
> you are using the preconfigured values everyone knows what {jexl:ddd}
> means, if you change the prefix to something else, you first have to
> search through the xconf and see what the prefix means.
> 
> On the same topic, what about defining the default on a per template
> base? For example havign a "default-expression-language-prefix" element
> on top of the template?
Doable. There is one small but for all settings like this: the jx:import 
behaviour.

-- 
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

Re: Identifying expression language, Re: svn commit: r279283 - /cocoon/trunk/status.xml

Posted by Carsten Ziegeler <cz...@apache.org>.
Leszek Gawron wrote:
> It is not hardcoded, see
> src\blocks\template\trunk\WEB-INF\xconf\cocoon-template-expression.xconf:
> 
> <expression-compilers>
> <component-instance 
> class="org.apache.cocoon.components.expression.jxpath.JXPathCompiler" 
> name="default"/>
> <component-instance 
> class="org.apache.cocoon.components.expression.jexl.JexlCompiler" 
> name="jexl"/>
> <component-instance 
> class="org.apache.cocoon.components.expression.jxpath.JXPathCompiler" 
> name="jxpath"/>
> </expression-compilers>
> 
> 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.
> 
Ok, you *can* change the prefixes but overall it's not a good idea. If
you are using the preconfigured values everyone knows what {jexl:ddd}
means, if you change the prefix to something else, you first have to
search through the xconf and see what the prefix means.

On the same topic, what about defining the default on a per template
base? For example havign a "default-expression-language-prefix" element
on top of the template?

Carsten

-- 
Carsten Ziegeler - Open Source Group, S&N AG
http://www.s-und-n.de
http://www.osoco.org/weblogs/rael/

Re: Identifying expression language, Re: svn commit: r279283 - /cocoon/trunk/status.xml

Posted by Leszek Gawron <lg...@mobilebox.pl>.
Vadim Gritsenko wrote:
> lgawron@apache.org wrote:
> 
>>      <action dev="LG" type="add">
>> +      JXTG: Pluggable expression parser. New expression syntax: 
>> ${expr}, #{expr} -&gt; {jexl:expr}, {jxpath:expr}.
>> +      This is a target syntax for CTemplate.
>> +    </action>
> 
> 
> Got couple of ideas:
> 
>   * Can we use something shorter than {jexl:expr}, {jxpath:expr}?
>     For example, {jxl:expr}, {jxp:expr}. It's tiring to look
>     at {jxpath:expr}, not to mention typing it all the time...
> 
>   * 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:

<expression-compilers>
<component-instance 
class="org.apache.cocoon.components.expression.jxpath.JXPathCompiler" 
name="default"/>
<component-instance 
class="org.apache.cocoon.components.expression.jexl.JexlCompiler" 
name="jexl"/>
<component-instance 
class="org.apache.cocoon.components.expression.jxpath.JXPathCompiler" 
name="jxpath"/>
</expression-compilers>

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.

> And the fun idea,
> 
>   * Should we configure 'expression language character', so that it
>     possible to add new language and character for it (or change default\
>     character for jxpath or jexl), example:
> 
>         @{expr}, &{expr}
LOL

-- 
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

Identifying expression language, Re: svn commit: r279283 - /cocoon/trunk/status.xml

Posted by Vadim Gritsenko <va...@reverycodes.com>.
lgawron@apache.org wrote:
>      <action dev="LG" type="add">
> +      JXTG: Pluggable expression parser. New expression syntax: ${expr}, #{expr} -&gt; {jexl:expr}, {jxpath:expr}.
> +      This is a target syntax for CTemplate.
> +    </action>

Got couple of ideas:

   * Can we use something shorter than {jexl:expr}, {jxpath:expr}?
     For example, {jxl:expr}, {jxp:expr}. It's tiring to look
     at {jxpath:expr}, not to mention typing it all the time...

   * Should this prefix be configurable (in cocoon.xconf) instead of
     being hard-coded?

And the fun idea,

   * Should we configure 'expression language character', so that it
     possible to add new language and character for it (or change default\
     character for jxpath or jexl), example:

         @{expr}, &{expr}

     :-)


Vadim