cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Leszek Gawron <lgaw...@apache.org>
Subject Re: [RT] CTemplate
Date Sat, 26 Feb 2005 15:06:39 GMT
Vadim Gritsenko wrote:
> Daniel Fagerstrom wrote:
> 
> <snip/>
> 
>> We need to decide if JXPath or Jexl should be the default EL, so that 
>> one just need to write:
>>
>> {$a+$b}
>>
>> for the default EL ;).
> 
> 
> jx:language="jxpath" on the root element can specify the default for a 
> page. IIRC, default on generator level was deemed not granular enough.
and if there is:

<root param="{variable}" jx:language="jxpath">
</root>
would you first check if there is a jx:language attribute

I'd prefer <jx:processing-instruction name="language" value="jxpath"/>

Moreover:
if we use jx:import src="othertemplate.jx" that other template might 
have a different default language.

> 
> 
>> We should also IMO remove the Java package mechanism from the 
>> environment in CTemplate, i.e. the possibillity to do:
>>
>> ${java.util.HashMap()}
> 
> 
> Does it mean you'd remove support for Packages.java.util.HashMap as well?
Yes he does. This is the same mechanism used.
> 
> 
>> set
>> ---
>>
>> The current behaviour of set is somewhat weird as it works as an 
>> asignement in the current context but you cannot affect a variable 
>> that is created outside the current context, e.g. outside a loop (see 
>> http://marc.theaimsgroup.com/?a=103818032900001&r=1&w=2 and the end of 
>> http://marc.theaimsgroup.com/?t=110623014500003&r=1&w=2 for examples 
>> and discussion).
>>
>> There are two reasonable solutions:
>>
>> * Having it declarative and replace set with a let (or declare, 
>> define, variable etc) that just defines the variable, no assignement 
>> anymore (like in e.g. XSLT).
> 
> 
> +1 :-)
Seems like I'm in minority. How would you solve the "looping" problem then?

> 
> 
>> * Replacing set with declare and assign, where the first introduces a 
>> variable with possibly an initial value and an assign that change the 
>> value of an allready existing variable.
>>
>> I prefer the first solution.
> 
> 
> <snip/>
> 
>> attribute
>> ---------
>>
>> An xsl:attribute like construction would be usefull. Seem tricky to 
>> implement though.
> 
> 
> It can be implemented with limitations - if those limitations are 
> clearly documented, it's ok with me.
> 
> 
>> caching directives
>> ------------------
>>
>> Have not spent much thought about caching directives.
> 
> 
> It must support caching in one way or another, otherwise it's use will 
> be limited to non caching pipelines only...
Already working. Still I do not know if there is anyone else but me that 
has ever used it :)

-- 
Leszek Gawron                                                 MobileBox
lgawron@apache.org                              http://www.mobilebox.pl

Mime
View raw message