cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Leszek Gawron <lgaw...@apache.org>
Subject Re: JXTG macro calling
Date Sat, 26 Feb 2005 14:47:50 GMT
Sylvain Wallez wrote:
>> what do you think about removing the old syntax in 2.2?
>> <d p="foo">
>>     <content b="${1+2}"/>
>> </d>
>> For me it is counter-intuitive and leads to accidental mistakes (not 
>> so easy to find by newbies).
> 
> 
> 
> -1 on removing this syntax, as it prevents writing things such as the 
> CForms template language using JXTG (or CTemplate).
Valid point. I was not aware of the details of form.jx implementation.
> 
> Or if you find this counter-intuitive, maybe we can introduce the 
> concept of "element interceptor" which is a macro that gets called when 
> a particular element is encountered. This makes it explicit that some 
> elements will become macro calls.
> 
> <jx:intercept element="ft:widget">
>  <!-- macro body -->
> </jx:intercept>
+0. Still you have to remember that there are some element names that 
will trigger macro invocation.

>> Another question:
>> Do you think this syntax would be useful?
>> <jx:call macro="${macroName}" p="bar">
>>     <content b="${2+3}"/>
>> </jx:call>
> 
> 
> 
> Do you mean the "p" param as attribute? Yes, it's useful, because IMO 
> <jx:withParam> is just as overly verbose as XSLT, to which JXTG is 
> supposed to provide a simpler replacement ;-)
I have no problem with using jx:withParam just as with "inlining" the 
parameters. A matter of taste.

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

Mime
View raw message