Vadim Gritsenko wrote:
[EMAIL PROTECTED] wrote:
<action dev="LG" type="add">
+ JXTG: Pluggable expression parser. New expression syntax:
${expr}, #{expr} -> {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 [EMAIL PROTECTED]
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