cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Daniel Fagerstrom <>
Subject Re: Speed of jx-macros compared to FormsTransformer
Date Wed, 18 May 2005 13:13:28 GMT
Vadim Gritsenko wrote:

> Daniel Fagerstrom wrote:
>> Reinhard Poetz wrote:
>>> AFAICS there is a lot of time spent in the macro execution methods 
>>> and especially in 
>>> org.apache.cocoon.template.jxtg.script.Invoker.toDOMNodeList()
>> That is interesting, toDOMNodeList(), seem to be called from the 
>> o.a.c.template.instruction.StartSet (has changed name to Set), which 
>> it only should be for jx:set with non empty body. And there are no 
>> such jx:set in jx-macros.xml.
>> The behaviour of jx:set should IMO be: if there is a value attribute, 
>> that should be evaluated and the value of the var attribute should be 
>> set to it, if there is not a value attribute the body should be 
>> evaluated and used instead. The current behaviour is instead: if 
>> there is a value attribute *and it doesn't evaluates to null* it is 
>> used, otherwise the body is used.
>> This behaviour was in the original JXTG as well. I don't know if it 
>> is by design or if it is a bug, anyway it is far to subtle for my 
>> taste. Having both a value attribute and a body should be considered 
>> as a syntax error.
>> If the null check for value at line 79 in Set is changed to a null 
>> test for this.value we get the behaviour that we should have IMO.
>> I would assume that the various jx:set for helper methods that has 
>> the return type void eavluates to null, and invokes the body 
>> evaluation. It is still strange that doing nothing should take so 
>> long time.
> IMHO, if attribute is present - regardless of whether it evaluates to 
> null or not - body should be ignored. WDYT?

Exactly! Reinhard has updated trunk to this behaviour.


View raw message