cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Leszek Gawron <>
Subject Re: svn commit: r154841 - in cocoon/trunk/src: blocks/template/java/org/apache/cocoon/components/expression/jexl/ blocks/template/test/org/apache/cocoon/template/jxtg/ java/org/apache/cocoon/environment/
Date Wed, 23 Feb 2005 13:02:57 GMT
Daniel Fagerstrom wrote:
> The main thing left to do in the invoker is to get rid of the code for 
> handling macros in the StartElement part of execute. My idea there is to 
> create a class that implements StartInstruction and contains all the 
> macro creation and execution code. So it is such classes that is stored 
> in the definition map, if a element name is found in the definition map 
> one need just call the execution method on it. By doing like this we get 
> rid of all the refernces to tags from the invoker. Concerning the parser 
> I think we allready have discussed how it can work, check the archive 
> ( seem to be down so I can't give anty detailed 
> refernces right now).

For starters: what do you say if every Event had an execute method and 
we got rid of

} else if (ev instanceof EndCDATA) {
} else if (ev instanceof EndDTD) {
} else if (ev instanceof EndEntity) {
     consumer.endEntity(((EndEntity) ev).getName());
} else if (ev instanceof StartCDATA) {
} else if (ev instanceof StartDTD) {
     StartDTD startDTD = (StartDTD) ev;
     consumer.startDTD(startDTD.getName(), startDTD.getPublicId(),
} else if (ev instanceof StartEntity) {
     consumer.startEntity(((StartEntity) ev).getName());

     // Instructions

Leszek Gawron                            
Project Manager                                    MobileBox sp. z o.o.
+48 (61) 855 06 67                    
mobile: +48 (501) 720 812                       fax: +48 (61) 853 29 65

View raw message