cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Daniel Fagerstrom <>
Subject Re: JXTG macro calling
Date Sat, 26 Feb 2005 13:42:32 GMT
Sylvain Wallez wrote:

> Leszek Gawron 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). 

Seem like a strong enough reason.

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

WDYT about requiring the intercepted elements to lie whithin a certain 
name space? I.e. somthing like:

<jx:intercept ns="http://..../FormsTransformer/1.0">
  <!-- macro bodies for forms -->

By requiring the macros to lie within predifined namespaces it will be 
easier to see what is macros and what is not. We can also make it an 
error to use elements whithin an intercepted name space that doesn't 
have a macro definition. And it makes it possible to have schemes for 
the different name spaces and to make tool support possible.


View raw message